New issue
Advanced search Search tips

Issue 866647 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 854195



Sign in to add a comment

[BGPT/SPv2] Create transform node for replaced contents with object-fit

Project Member Reported by trchen@chromium.org, Jul 23

Issue description

A few tests with directly composited images fails in BGPT due to not having the scaling transform on the layer.

Also a few SPv2 tests failed for not sizing the foreign layers for replaced contents correctly.

This can be fixed by creating a transform node that maps the replaced content's intrinsic sizing to the replaced content box (computed with respect to CSS object-fit).

This is a follow-up for  crbug.com/730284  where we created clip node for replaced contents.
 
Blocking: 854195
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/06ce866c79f2b887d3d368a4319752c45d7103b5

commit 06ce866c79f2b887d3d368a4319752c45d7103b5
Author: Tien-Ren Chen <trchen@chromium.org>
Date: Tue Jul 31 15:54:48 2018

[Blink] Rename SvgLocalToBorderBoxTransform to ReplacedContentTransform

This CL renames SvgLocalToBorderBoxTransform to ReplacedContentTransform
and moved its application from SVGRootPainter to ReplacedPainter.

This CL itself should introduce no behavior changes. The purpose of this
CL is in preparation to use transform nodes to implement CSS object-fit
for other type of replaced elements than <svg>.

BUG= 866647 

Cq-Include-Trybots: luci.chromium.try:linux-blink-gen-property-trees;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I8b6fa6eae7f852a2c275a09836f2fa60334ccbbf
Reviewed-on: https://chromium-review.googlesource.com/1155792
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579418}
[modify] https://crrev.com/06ce866c79f2b887d3d368a4319752c45d7103b5/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/relative-sized-document-scrollbars-expected.txt
[modify] https://crrev.com/06ce866c79f2b887d3d368a4319752c45d7103b5/third_party/WebKit/LayoutTests/paint/invalidation/svg/absolute-sized-document-no-scrollbars-expected.txt
[modify] https://crrev.com/06ce866c79f2b887d3d368a4319752c45d7103b5/third_party/WebKit/LayoutTests/paint/invalidation/svg/relative-sized-document-scrollbars-expected.txt
[modify] https://crrev.com/06ce866c79f2b887d3d368a4319752c45d7103b5/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-expected.txt
[modify] https://crrev.com/06ce866c79f2b887d3d368a4319752c45d7103b5/third_party/blink/renderer/core/paint/find_properties_needing_update.h
[modify] https://crrev.com/06ce866c79f2b887d3d368a4319752c45d7103b5/third_party/blink/renderer/core/paint/object_paint_properties.h
[modify] https://crrev.com/06ce866c79f2b887d3d368a4319752c45d7103b5/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
[modify] https://crrev.com/06ce866c79f2b887d3d368a4319752c45d7103b5/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc
[modify] https://crrev.com/06ce866c79f2b887d3d368a4319752c45d7103b5/third_party/blink/renderer/core/paint/paint_property_tree_printer.cc
[modify] https://crrev.com/06ce866c79f2b887d3d368a4319752c45d7103b5/third_party/blink/renderer/core/paint/replaced_painter.cc
[modify] https://crrev.com/06ce866c79f2b887d3d368a4319752c45d7103b5/third_party/blink/renderer/core/paint/svg_paint_context.h
[modify] https://crrev.com/06ce866c79f2b887d3d368a4319752c45d7103b5/third_party/blink/renderer/core/paint/svg_root_painter.cc

Status: Fixed (was: Assigned)
Discussed with pdr@ offline, we decided to only create transform node for SVG root and directly composited images.

It is because all non-composited painters already implemented scaling, and except for images, their directly composited version already have integrated scaling.

All replaced elements should be properly scaled and clip in both modes now.
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/33bd66429e8ff2131e908b6cbddbd7cf0410965e

commit 33bd66429e8ff2131e908b6cbddbd7cf0410965e
Author: Tien-Ren Chen <trchen@chromium.org>
Date: Wed Aug 22 16:36:34 2018

[Blink/BGPT] Add tests for canvas with overflowing object-fit

This CL adds a few layout tests for canvas with overflowing object-fit.
Blink is expected to scale the contents properly and clip the overflow
to to the content box.

Composited version of the test doesn't work currently, but will be fixed
by BGPT.

There is a video counterpart in media/video-object-fit.html, which also
will be fixed by BGPT.

Also did minor code cleanup and updated comment that most code path
don't use transform nodes for object-fit. No behavior change is
expected.

BUG= 400829 , 866647 

Cq-Include-Trybots: luci.chromium.try:linux-blink-gen-property-trees;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iaa9bf18fc23b7b2309e5f46dea145eaa33a8e0f6
Reviewed-on: https://chromium-review.googlesource.com/1179278
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585062}
[modify] https://crrev.com/33bd66429e8ff2131e908b6cbddbd7cf0410965e/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees
[modify] https://crrev.com/33bd66429e8ff2131e908b6cbddbd7cf0410965e/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/33bd66429e8ff2131e908b6cbddbd7cf0410965e/third_party/WebKit/LayoutTests/compositing/composited-canvas-with-overflowing-object-fit-expected.html
[add] https://crrev.com/33bd66429e8ff2131e908b6cbddbd7cf0410965e/third_party/WebKit/LayoutTests/compositing/composited-canvas-with-overflowing-object-fit.html
[add] https://crrev.com/33bd66429e8ff2131e908b6cbddbd7cf0410965e/third_party/WebKit/LayoutTests/fast/canvas/canvas-with-overflowing-object-fit-expected.html
[add] https://crrev.com/33bd66429e8ff2131e908b6cbddbd7cf0410965e/third_party/WebKit/LayoutTests/fast/canvas/canvas-with-overflowing-object-fit.html
[modify] https://crrev.com/33bd66429e8ff2131e908b6cbddbd7cf0410965e/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
[modify] https://crrev.com/33bd66429e8ff2131e908b6cbddbd7cf0410965e/third_party/blink/renderer/core/paint/replaced_painter.cc

Labels: -Pri-3 Pri-2
Owner: wangxianzhu@chromium.org
Status: Assigned (was: Fixed)
There are still two tests failing and associated with this bug:

 crbug.com/866647  fast/borders/border-radius-mask-video-ratio.html [ Failure ]
 crbug.com/866647  fast/borders/border-radius-mask-video-shadow.html [ Failure ]

It seems that some clip is incorrect.
Status: Fixed (was: Assigned)
The remaining failures are not related.

Sign in to add a comment