Commit 1d2bbd2f authored by Chris Harrelson's avatar Chris Harrelson Committed by Commit Bot

[Regression] Force subtree paint property update on scroll of

fragmented content.

This is necessary because overflow-scrolled content can be placed
into a non-visible fragment clip. When scrolling into view, those
clips need to be adjusted to allow the content to be visible.

Long-term we can remove this slow path.

Bug: 903287

Change-Id: Ia237d72f91084aa4ef125a9ba765b5d00143f48b
Reviewed-on: https://chromium-review.googlesource.com/c/1344219
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610684}
parent 6e821a78
...@@ -1474,6 +1474,7 @@ crbug.com/591099 virtual/layout_ng_experimental/printing/thead-repeats-with-tran ...@@ -1474,6 +1474,7 @@ crbug.com/591099 virtual/layout_ng_experimental/printing/thead-repeats-with-tran
crbug.com/591099 virtual/layout_ng_experimental/printing/thead-under-multicol.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/printing/thead-under-multicol.html [ Failure ]
crbug.com/829804 virtual/layout_ng_experimental/printing/webgl-oversized-printing.html [ Skip ] crbug.com/829804 virtual/layout_ng_experimental/printing/webgl-oversized-printing.html [ Skip ]
crbug.com/824918 virtual/layout_ng_experimental/printing/width-overflow.html [ Failure ] crbug.com/824918 virtual/layout_ng_experimental/printing/width-overflow.html [ Failure ]
Bug(none) virtual/layout_ng_experimental/fragmentation/scrolling-contents-scroll.html [ Crash Failure ]
# Flexbox in NG # Flexbox in NG
# #
......
<!doctype HTML>
<style>
::-webkit-scrollbar {
display: none;
}
</style>
<div style="column-count: 2; width: 800px; height: 300px;">
First column. Green should show on scroll.
<div id="scroller" style="width: 400px; height: 250px; overflow-y: auto;">
<div style="width: 300px; height: 300px; background: green"></div>
</div>
Second column.
</div>
<!doctype HTML>
<script src="../resources/run-after-layout-and-paint.js"></script>
<style>
::-webkit-scrollbar {
display: none;
}
</style>
<div style="column-count: 2; width: 800px; height: 300px;">
First column. Green should show on scroll.
<div id="scroller" style="width: 400px; height: 250px; overflow-y: auto;">
<div style="width: 300px; height: 300px; background: red"></div>
<div style="width: 300px; height: 300px; background: green"></div>
</div>
Second column.
</div>
<script>
if (window.testRunner)
window.testRunner.waitUntilDone();
runAfterLayoutAndPaint(() => {
scroller.scrollBy(0, 300);
if (window.testRunner)
window.testRunner.notifyDone();
});
</script>
...@@ -512,6 +512,11 @@ void PaintLayerScrollableArea::InvalidatePaintForScrollOffsetChange() { ...@@ -512,6 +512,11 @@ void PaintLayerScrollableArea::InvalidatePaintForScrollOffsetChange() {
box->SetSubtreeShouldCheckForPaintInvalidation(); box->SetSubtreeShouldCheckForPaintInvalidation();
} }
// TODO(chrishtr): remove this slow path once crbug.com/906885 is fixed.
// See also https://bugs.chromium.org/p/chromium/issues/detail?id=903287#c10.
if (Layer()->EnclosingPaginationLayer())
box->SetSubtreeShouldCheckForPaintInvalidation();
// If not composited, background always paints into the main graphics layer. // If not composited, background always paints into the main graphics layer.
bool background_paint_in_graphics_layer = true; bool background_paint_in_graphics_layer = true;
bool background_paint_in_scrolling_contents = false; bool background_paint_in_scrolling_contents = false;
......
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