New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 638091 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression
Team-Accessibility



Sign in to add a comment

Regression: Blank search results page is seen on adding High Contrast extension

Project Member Reported by sc00335...@techmahindra.com, Aug 16 2016

Issue description

Version:  54.0.2829.0 dev
OS: Ubuntu 14.04, windows

Test URL: https://chrome.google.com/webstore/detail/high-contrast/djcfdncoelnlbldjfhinnjlhdjlikmph

What steps will reproduce the problem?
(1) Launch chrome and add above extension. Now search anything[ex: google] in omnibox and observe for search results

Expected: Search results should be seen even after adding extension.
Actual: Instead blank page is seen on adding extesnion.

This is a regression issue broken in M54. Will provide bisect info soon.
 
Labels: OS-Mac
Able to reproduce the issue on Mac 10.11.6 using chrome version 54.0.2829.0.

Sindhu@ Please update bisect information.

Thanks,
Labels: -Needs-Bisect hasbisect
Owner: senorblanco@chromium.org
Status: Assigned (was: Unconfirmed)
Good Build:54.0.2826.0 dev
Bad Build:54.0.2827.0 dev

CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/65ae2bba5625bc75256123ee8ee955ecc38db9e3..711409eabeacb27e2debfd5a7be631a1967f500f

Suspecting https://codereview.chromium.org/2230593002 from changelog.

@senorblanco: Please confirm the issue and help in re-assigning if it is not related to your change.
Still able to reproduce the issue on windows 7 using chrome version 54.0.2836.0.

senorblanco@ Could you please look into this issue.

Thanks,

Comment 4 by ajha@chromium.org, Aug 24 2016

Cc: chrishtr@chromium.org
Cc'ing chrishtr@ as well for more updates on this.

Could anyone please review this as we approach the branched date and this being marked as Beta blocker. 
Labels: -ReleaseBlock-Beta ReleaseBlock-Stable
Since it requires an extension, I don't think this should be a beta blocker. I'm marking it as a stable blocker instead.

Feel free to update if you disagree.
Cc: f...@opera.com
Investigation notes:

This seems to occur because the Google results page (and google.com) has a child at (-10000, -10000), which throws off the filter region calculation in the non-composited case.

Attached are some repro cases; both should give a 100x100 yellow box on top of a magenta box.

filter-parent-negative-top-child.html has a parent div with a filter, and a child div with top: -100px (similar to the reported bug). This fails in tip-of-tree, but passes with my change reverted.

filter-parent-negative-top-composited-child.html is the same as the above, but with a composited child. This passes in tip of tree, but fails with my change reverted.

I also tried a partial revert, setting the origin of the filter region to 0, 0 always, and only using the size() from physicalBoundingBoxIncludingReflectionAndStackingChildren() (as it was before my change), but this also causes the second test to fail.

It's as if the compositing path currently requires a different filter region (including the negative offset) than the software path (which wants the filter region at the origin).
filter-parent-negative-top-child.html
633 bytes View Download
filter-parent-negative-top-composited-child.html
659 bytes View Download
More notes:

It seems that the compositing path does the right thing with negatively-offset filters because it applies the opposite offset in the CTM. Skia then applies this offset to the crop rect, yielding the correct result in the composited case. This is likely the right thing to do, and the software path doesn't seem to do it.

This can be see in the attached test case, with a negatively-offset child and a lighting filter on the parent. The light should be positioned at the origin of the parent, but it's offset to the child's top instead. This is broken with or without my previous change, so I think this was an existing bug.
filter-parent-negative-top-child-lighting.html
917 bytes View Download

Comment 8 by f...@opera.com, Aug 25 2016

Could this be a discrepancy between the rect used to resolve the filter region and the one passed to the (Begin)FilterDisplayItem? IIRC, the latter one does not include composited descendants (and might have an "incompatible" origin.)
Re: #8: yes, I think that might be related. There's another call to  layer.physicalBoundingBoxIncludingReflectionAndStackingChildren(offsetFromRoot) in FilterPainter's constructor, but it seems to give absolute, rather than relative coords; not sure why yet. I'm not sure how this doesn't break other tests, e.g., the lighting tests in css3/filters/effect-reference.html.
Project Member

Comment 10 by bugdroid1@chromium.org, Aug 30 2016

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

commit 5941ecb0aea741b27fea283065b25428588dbe43
Author: Stephen White <senorblanco@chromium.org>
Date: Tue Aug 30 01:28:24 2016

Fix CSS reference filters with negative transformed children.

The software raster path for filters had always used the
bounds top-left corner as the origin for filters. This
doesn't work if the filtered primitive contains a
negative-transformed child, since the saveLayer() bounds
should be negative (non-zero) with respect to the
primitive.

The solution is to pass through the origin explicitly, and
translate to that rather than the bounds origin before
applying the filter. This will determine the origin for
crop rects, lighting positions, etc.

It turns out that there are certain CSS properties (e.g., "outline") which affect the size of the layer, but are not
supposed to affect layout. In cc, we had previously been
using the layer's src_rect origin to offset filter
parameters in order to compensate for clipping, etc, but
this is insufficient to handle "outset", which shows up
in the layer position but shouldn't affect filter origin.

The offset that we want was already being computed
for us in GraphicsLayer::setOffsetFromLayoutObject()),
but not forwarded to cc. I've done so, with the
attendant changes to WebLayer, WebLayerImpl, mojo bindings, struct_traits, cc::Layer, cc::LayerImpl, EffectNode,
RenderSurfaceImpl, and RenderPassDrawQuad. (I wish I
was kidding.)

BUG= 638091 
R=ajuma@chromium.org, chrishtr@chromium.org, mbarbella@chromium.org, sky@chromium.org, wkorman@chromium.org
TBR=sky@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review URL: https://codereview.chromium.org/2278273004 .

Cr-Commit-Position: refs/heads/master@{#415043}

[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/blink/web_display_item_list_impl.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/blink/web_display_item_list_impl.h
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/blink/web_layer_impl.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/blink/web_layer_impl.h
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/ipc/cc_param_traits_macros.h
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/ipc/cc_param_traits_unittest.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/ipc/quads.mojom
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/ipc/quads_struct_traits.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/ipc/quads_struct_traits.h
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/ipc/struct_traits_unittest.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/layers/layer.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/layers/layer.h
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/layers/layer_impl_test_properties.h
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/layers/render_surface_impl.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/layers/render_surface_impl.h
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/output/gl_renderer.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/output/overlay_unittest.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/output/renderer_pixeltest.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/output/software_renderer.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/playback/display_item_list_unittest.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/playback/filter_display_item.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/playback/filter_display_item.h
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/playback/largest_display_item.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/quads/draw_quad_unittest.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/quads/render_pass_draw_quad.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/quads/render_pass_draw_quad.h
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/quads/render_pass_unittest.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/surfaces/surface_aggregator.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/test/render_pass_test_utils.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/test/surface_aggregator_test_helpers.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/test/surface_hittest_test_helpers.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/trees/effect_node.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/trees/effect_node.h
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/trees/layer_tree_host_pixeltest_filters.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/cc/trees/property_tree_builder.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/services/ui/ws/frame_generator.cc
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/third_party/WebKit/LayoutTests/css3/filters/filter-region-negative-transformed-child-expected.html
[add] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/third_party/WebKit/LayoutTests/css3/filters/filter-region-negative-transformed-child.html
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/third_party/WebKit/Source/core/paint/FilterPainter.cpp
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.cpp
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.h
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/third_party/WebKit/public/platform/WebDisplayItemList.h
[modify] https://crrev.com/5941ecb0aea741b27fea283065b25428588dbe43/third_party/WebKit/public/platform/WebLayer.h

Project Member

Comment 11 by bugdroid1@chromium.org, Aug 30 2016

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

commit 03f47b2fb0334b6274be2fcce827d28793e32b65
Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org>
Date: Tue Aug 30 02:18:45 2016

Auto-rebaseline for r415043

https://chromium.googlesource.com/chromium/src/+/5941ecb0a

BUG= 638091 
TBR=senorblanco@chromium.org

Review URL: https://codereview.chromium.org/2292793002 .

Cr-Commit-Position: refs/heads/master@{#415044}

[modify] https://crrev.com/03f47b2fb0334b6274be2fcce827d28793e32b65/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/03f47b2fb0334b6274be2fcce827d28793e32b65/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-transformed-expected.png
[modify] https://crrev.com/03f47b2fb0334b6274be2fcce827d28793e32b65/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-transformed2-expected.png
[modify] https://crrev.com/03f47b2fb0334b6274be2fcce827d28793e32b65/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-transformed-expected.png
[modify] https://crrev.com/03f47b2fb0334b6274be2fcce827d28793e32b65/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-transformed2-expected.png
[modify] https://crrev.com/03f47b2fb0334b6274be2fcce827d28793e32b65/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-transformed-expected.png
[modify] https://crrev.com/03f47b2fb0334b6274be2fcce827d28793e32b65/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-transformed2-expected.png

Status: Fixed (was: Assigned)
Should be fixed as of the above change. Will wait a few days, then mark for merge to M54.
Labels: Merge-Request-54
Was merged to master at r415044, and Canary is at r415522. Requesting merge to M54.

Comment 14 by dimu@chromium.org, Aug 31 2016

Labels: -Merge-Request-54 Merge-Approved-54 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M54 (branch: 2840)
Project Member

Comment 15 by bugdroid1@chromium.org, Aug 31 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/df20db6b63fb755924ee7540b9b4e0671ebe550b

commit df20db6b63fb755924ee7540b9b4e0671ebe550b
Author: Stephen White <senorblanco@chromium.org>
Date: Wed Aug 31 21:55:55 2016

Fix CSS reference filters with negative transformed children.

[M54 cherry-pick of 5941ecb0aea741b27fea283065b25428588dbe43.]

The software raster path for filters had always used the
bounds top-left corner as the origin for filters. This
doesn't work if the filtered primitive contains a
negative-transformed child, since the saveLayer() bounds
should be negative (non-zero) with respect to the
primitive.

The solution is to pass through the origin explicitly, and
translate to that rather than the bounds origin before
applying the filter. This will determine the origin for
crop rects, lighting positions, etc.

It turns out that there are certain CSS properties (e.g., "outline") which affect the size of the layer, but are not
supposed to affect layout. In cc, we had previously been
using the layer's src_rect origin to offset filter
parameters in order to compensate for clipping, etc, but
this is insufficient to handle "outset", which shows up
in the layer position but shouldn't affect filter origin.

The offset that we want was already being computed
for us in GraphicsLayer::setOffsetFromLayoutObject()),
but not forwarded to cc. I've done so, with the
attendant changes to WebLayer, WebLayerImpl, mojo bindings, struct_traits, cc::Layer, cc::LayerImpl, EffectNode,
RenderSurfaceImpl, and RenderPassDrawQuad. (I wish I
was kidding.)

BUG= 638091 
TRR=ajuma@chromium.org, chrishtr@chromium.org, mbarbella@chromium.org, sky@chromium.org, wkorman@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review URL: https://codereview.chromium.org/2297213003 .

Cr-Commit-Position: refs/branch-heads/2840@{#82}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/blink/web_display_item_list_impl.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/blink/web_display_item_list_impl.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/blink/web_layer_impl.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/blink/web_layer_impl.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/ipc/cc_param_traits_macros.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/ipc/cc_param_traits_unittest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/ipc/quads.mojom
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/ipc/quads_struct_traits.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/ipc/quads_struct_traits.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/ipc/struct_traits_unittest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/layers/layer.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/layers/layer.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/layers/layer_impl_test_properties.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/layers/render_surface_impl.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/layers/render_surface_impl.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/output/gl_renderer.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/output/overlay_unittest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/output/renderer_pixeltest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/output/software_renderer.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/playback/display_item_list_unittest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/playback/filter_display_item.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/playback/filter_display_item.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/playback/largest_display_item.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/quads/draw_quad_unittest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/quads/render_pass_draw_quad.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/quads/render_pass_draw_quad.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/quads/render_pass_unittest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/surfaces/surface_aggregator.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/test/render_pass_test_utils.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/test/surface_aggregator_test_helpers.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/test/surface_hittest_test_helpers.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/trees/effect_node.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/trees/effect_node.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/trees/layer_tree_host_pixeltest_filters.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/trees/property_tree_builder.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/services/ui/ws/frame_generator.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/LayoutTests/css3/filters/filter-region-negative-transformed-child-expected.html
[add] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/LayoutTests/css3/filters/filter-region-negative-transformed-child.html
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/Source/core/paint/FilterPainter.cpp
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.cpp
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/public/platform/WebDisplayItemList.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/public/platform/WebLayer.h

Labels: TE-Verified-54.0.2840.8 TE-Verified-M54
Verified the issue on Mac 10.11.6,Ubuntu 14.04 and Windows 10 using 54.0.2840.8 and its working fine now.Hence added the respective TE-Verified labels.
Please find the screen cast for the same.
638091_Sep_1.mp4
569 KB View Download
Project Member

Comment 17 by bugdroid1@chromium.org, Oct 27 2016

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

commit df20db6b63fb755924ee7540b9b4e0671ebe550b
Author: Stephen White <senorblanco@chromium.org>
Date: Wed Aug 31 21:55:55 2016

Fix CSS reference filters with negative transformed children.

[M54 cherry-pick of 5941ecb0aea741b27fea283065b25428588dbe43.]

The software raster path for filters had always used the
bounds top-left corner as the origin for filters. This
doesn't work if the filtered primitive contains a
negative-transformed child, since the saveLayer() bounds
should be negative (non-zero) with respect to the
primitive.

The solution is to pass through the origin explicitly, and
translate to that rather than the bounds origin before
applying the filter. This will determine the origin for
crop rects, lighting positions, etc.

It turns out that there are certain CSS properties (e.g., "outline") which affect the size of the layer, but are not
supposed to affect layout. In cc, we had previously been
using the layer's src_rect origin to offset filter
parameters in order to compensate for clipping, etc, but
this is insufficient to handle "outset", which shows up
in the layer position but shouldn't affect filter origin.

The offset that we want was already being computed
for us in GraphicsLayer::setOffsetFromLayoutObject()),
but not forwarded to cc. I've done so, with the
attendant changes to WebLayer, WebLayerImpl, mojo bindings, struct_traits, cc::Layer, cc::LayerImpl, EffectNode,
RenderSurfaceImpl, and RenderPassDrawQuad. (I wish I
was kidding.)

BUG= 638091 
TRR=ajuma@chromium.org, chrishtr@chromium.org, mbarbella@chromium.org, sky@chromium.org, wkorman@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review URL: https://codereview.chromium.org/2297213003 .

Cr-Commit-Position: refs/branch-heads/2840@{#82}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/blink/web_display_item_list_impl.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/blink/web_display_item_list_impl.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/blink/web_layer_impl.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/blink/web_layer_impl.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/ipc/cc_param_traits_macros.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/ipc/cc_param_traits_unittest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/ipc/quads.mojom
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/ipc/quads_struct_traits.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/ipc/quads_struct_traits.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/ipc/struct_traits_unittest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/layers/layer.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/layers/layer.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/layers/layer_impl_test_properties.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/layers/render_surface_impl.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/layers/render_surface_impl.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/output/gl_renderer.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/output/overlay_unittest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/output/renderer_pixeltest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/output/software_renderer.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/playback/display_item_list_unittest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/playback/filter_display_item.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/playback/filter_display_item.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/playback/largest_display_item.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/quads/draw_quad_unittest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/quads/render_pass_draw_quad.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/quads/render_pass_draw_quad.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/quads/render_pass_unittest.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/surfaces/surface_aggregator.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/test/render_pass_test_utils.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/test/surface_aggregator_test_helpers.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/test/surface_hittest_test_helpers.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/trees/effect_node.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/trees/effect_node.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/trees/layer_tree_host_pixeltest_filters.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/cc/trees/property_tree_builder.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/services/ui/ws/frame_generator.cc
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/LayoutTests/css3/filters/filter-region-negative-transformed-child-expected.html
[add] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/LayoutTests/css3/filters/filter-region-negative-transformed-child.html
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/Source/core/paint/FilterPainter.cpp
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.cpp
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/public/platform/WebDisplayItemList.h
[modify] https://crrev.com/df20db6b63fb755924ee7540b9b4e0671ebe550b/third_party/WebKit/public/platform/WebLayer.h

Sign in to add a comment