Commit 473d101b authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

[SPv175] Correct ForegroundLayer state if there is no ScrollingLayer

If there is no ScrollingLayer, ForegroundLayer is in the same
coordinates as the main graphics layer, so it should use the
container state instead of the contents state.

Bug: 771643
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie28ab43803f1ffb3a4bacb80c9bea9c71e19068c
Reviewed-on: https://chromium-review.googlesource.com/825442
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523974}
parent 62d0093b
...@@ -75,9 +75,7 @@ crbug.com/769942 virtual/spv175/paint/invalidation/svg/image-with-clip-path.svg ...@@ -75,9 +75,7 @@ crbug.com/769942 virtual/spv175/paint/invalidation/svg/image-with-clip-path.svg
crbug.com/769942 virtual/spv175/paint/invalidation/svg/js-late-clipPath-and-object-creation.svg [ Failure ] crbug.com/769942 virtual/spv175/paint/invalidation/svg/js-late-clipPath-and-object-creation.svg [ Failure ]
crbug.com/769942 virtual/spv175/paint/invalidation/svg/js-late-clipPath-creation.svg [ Failure ] crbug.com/769942 virtual/spv175/paint/invalidation/svg/js-late-clipPath-creation.svg [ Failure ]
crbug.com/771643 virtual/spv175/compositing/geometry/repaint-foreground-layer.html [ Crash ]
crbug.com/771643 virtual/spv175/compositing/overflow/nested-border-radius-clipping.html [ Failure ] crbug.com/771643 virtual/spv175/compositing/overflow/nested-border-radius-clipping.html [ Failure ]
crbug.com/771643 virtual/spv175/compositing/overflow/scroll-neg-z-index-and-composited-child.html [ Failure ]
crbug.com/771643 virtual/spv175/compositing/squashing/squash-overflow-hidden-scrolltop.html [ Failure ] crbug.com/771643 virtual/spv175/compositing/squashing/squash-overflow-hidden-scrolltop.html [ Failure ]
crbug.com/771643 virtual/spv175/compositing/squashing/squash-with-ancestor-reflection.html [ Failure ] crbug.com/771643 virtual/spv175/compositing/squashing/squash-with-ancestor-reflection.html [ Failure ]
crbug.com/771643 virtual/spv175/compositing/visibility/visibility-image-layers.html [ Failure Pass ] crbug.com/771643 virtual/spv175/compositing/visibility/visibility-image-layers.html [ Failure Pass ]
......
...@@ -49,16 +49,20 @@ void CompositingLayerPropertyUpdater::Update(const LayoutObject& object) { ...@@ -49,16 +49,20 @@ void CompositingLayerPropertyUpdater::Update(const LayoutObject& object) {
SetContainerLayerState(mapping->BackgroundLayer()); SetContainerLayerState(mapping->BackgroundLayer());
SetContainerLayerState(mapping->ChildClippingMaskLayer()); SetContainerLayerState(mapping->ChildClippingMaskLayer());
auto SetContentsLayerState = if (mapping->ScrollingContentsLayer()) {
[&fragment_data, &snapped_paint_offset](GraphicsLayer* graphics_layer) { auto SetContentsLayerState = [&fragment_data, &snapped_paint_offset](
if (graphics_layer) { GraphicsLayer* graphics_layer) {
graphics_layer->SetLayerState( if (graphics_layer) {
fragment_data.ContentsProperties(), graphics_layer->SetLayerState(
snapped_paint_offset + graphics_layer->OffsetFromLayoutObject()); fragment_data.ContentsProperties(),
} snapped_paint_offset + graphics_layer->OffsetFromLayoutObject());
}; }
SetContentsLayerState(mapping->ScrollingContentsLayer()); };
SetContentsLayerState(mapping->ForegroundLayer()); SetContentsLayerState(mapping->ScrollingContentsLayer());
SetContentsLayerState(mapping->ForegroundLayer());
} else {
SetContainerLayerState(mapping->ForegroundLayer());
}
if (auto* squashing_layer = mapping->SquashingLayer()) { if (auto* squashing_layer = mapping->SquashingLayer()) {
squashing_layer->SetLayerState( squashing_layer->SetLayerState(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment