Commit 9e9e7a27 authored by Vladimir Levin's avatar Vladimir Levin Committed by Commit Bot

SubtreeVisibility: Ensure that paint layers don't recurse into locked trees.

This patch ensures that we don't recurse into paint layers that have
display locked subtrees. We need to do this since the subtrees don't paint
and might not have up-to-date layout information, which is needed to
calculate their rects.

R=chrishtr@chromium.org

Fixed: 1059330
Change-Id: I832dfed1a47fba090c6e3ddd92de1846a47c3f98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2091599Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747879}
parent 52c96a13
...@@ -2711,6 +2711,14 @@ void PaintLayer::ExpandRectForStackingChildren( ...@@ -2711,6 +2711,14 @@ void PaintLayer::ExpandRectForStackingChildren(
const PaintLayer& composited_layer, const PaintLayer& composited_layer,
PhysicalRect& result, PhysicalRect& result,
PaintLayer::CalculateBoundsOptions options) const { PaintLayer::CalculateBoundsOptions options) const {
// If we're locked, th en the subtree does not contribute painted output.
// Furthermore, we might not have up-to-date sizing and position information
// in the subtree, so skip recursing into the subtree.
if (GetLayoutObject().PaintBlockedByDisplayLock(
DisplayLockLifecycleTarget::kChildren)) {
return;
}
PaintLayerPaintOrderIterator iterator(*this, kAllChildren); PaintLayerPaintOrderIterator iterator(*this, kAllChildren);
while (PaintLayer* child_layer = iterator.Next()) { while (PaintLayer* child_layer = iterator.Next()) {
// Here we exclude both directly composited layers and squashing layers // Here we exclude both directly composited layers and squashing layers
......
...@@ -183,7 +183,6 @@ crbug.com/807395 fast/multicol/mixed-opacity-test.html [ Failure ] ...@@ -183,7 +183,6 @@ crbug.com/807395 fast/multicol/mixed-opacity-test.html [ Failure ]
########## display-lock failures ########## ########## display-lock failures ##########
wpt_internal/display-lock/css-subtree-visibility/subtree-visibility-047.html [ Failure ] wpt_internal/display-lock/css-subtree-visibility/subtree-visibility-047.html [ Failure ]
wpt_internal/display-lock/css-subtree-visibility/subtree-visibility-008.html [ Pass Failure Crash ]
########## Ref tests can't be rebaselined ########## ########## Ref tests can't be rebaselined ##########
crbug.com/504613 crbug.com/524248 [ Mac ] paint/images/image-backgrounds-not-antialiased.html [ Failure ] crbug.com/504613 crbug.com/524248 [ Mac ] paint/images/image-backgrounds-not-antialiased.html [ Failure ]
......
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