Commit 4646c300 authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

Ensure negative z index children are painted in scrollers

[1] ensured kPaintLayerPaintingOverflowContents was cleared
when painting a new root but failed to clear
kPaintLayerPaintingCompositingScrollingPhase as well. This
caused a regression where negative z index children of a
scrolled and transformed paint layer would not paint.

This patch fixes and tests the regression from [1], as well
as passing one additional test with root layer scrolling.

[1] https://crrev.com/19f7cb8adfd015bef06b08d0c02eb5a528e8c885

Bug: 779885
Change-Id: Id73ae360000efe866fd9c9c7c1dade186d547cac
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/749059Reviewed-by: default avatarTien-Ren Chen <trchen@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513276}
parent fe47ac22
......@@ -193,7 +193,6 @@ crbug.com/417782 paint/invalidation/caret-subpixel.html [ Failure ]
crbug.com/417782 paint/invalidation/caret-with-composited-scroll.html [ Failure ]
crbug.com/417782 paint/invalidation/change-text-content-and-background-color.html [ Failure ]
crbug.com/417782 paint/invalidation/details-open-repaint.html [ Failure ]
crbug.com/417782 paint/invalidation/fixed-child-of-transformed-move-after-scroll.html [ Failure ]
crbug.com/417782 paint/invalidation/invalidate-caret-in-composited-scrolling-container.html [ Failure ]
crbug.com/417782 paint/invalidation/invalidate-caret-in-non-composited-scrolling-container.html [ Failure ]
crbug.com/417782 paint/invalidation/multi-layout-one-frame.html [ Failure ]
......
<!doctype html>
This test passes if there is a green box.
<div style="width: 100px; height: 100px; background: green;"></div>
<!doctype html>
<style>
::-webkit-scrollbar {
display: none;
}
#scroller {
position: absolute;
width: 400px;
height: 400px;
overflow-y: scroll;
will-change: transform;
}
#container {
transform: translate(0, 0);
}
#rect {
width: 100px;
height: 100px;
background: green;
position: absolute;
z-index: -5;
}
</style>
This test passes if there is a green box.
<div id="scroller">
<div id="container">
<div id="rect"></div>
</div>
<div id="forcescroll" style="height: 1000px;"></div>
</div>
......@@ -858,6 +858,7 @@ PaintResult PaintLayerPainter::PaintFragmentByApplyingTransform(
paint_flags &= ~kPaintLayerPaintingSkipRootBackground;
// When painting a new root we are no longer painting overflow contents.
paint_flags &= ~kPaintLayerPaintingOverflowContents;
paint_flags &= ~kPaintLayerPaintingCompositingScrollingPhase;
}
return PaintLayerContentsCompositingAllPhases(
......
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