DescriptionMerge 99752 - REGRESSION (r93614): Content remains despite parent element being scrolled off page using javascript.
https://bugs.webkit.org/show_bug.cgi?id=71550
Reviewed by Simon Fraser.
Source/WebCore:
Tests: fast/repaint/overflow-auto-in-overflow-auto-scrolled.html
fast/repaint/overflow-hidden-in-overflow-hidden-scrolled.html
fast/repaint/overflow-scroll-in-overflow-scroll-scrolled.html
fast/repaint/scroll-inside-table-cell.html
fast/repaint/scroll-relative-table-inside-table-cell.html
fast/repaint/table-overflow-auto-in-overflow-auto-scrolled.html
fast/repaint/table-overflow-hidden-in-overflow-hidden-scrolled.html
fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled.html
The issue was that updateLayerPositionsAfterScroll would not update some layer's
repaint rectangles. Thus we would not properly repaint (if at all).
The optimization added in 93614 was short-sighted and missed the fact that tables are a
special case when it comes to updating the repaint rectangles. When we scroll a layer
with an overflow clip, most layers *do* need to update their repaint rectangles.
This changes keeps the optimization for cells as this is the hotest case for tables
with overflow: hidden on cells but is much more conservative: if we encounter an
overflow clip, we update the descendant's repaint rectangles.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateLayerPositionsAfterScroll):
Refactored the code to use some flags (HasSeenFixedPositionedAncestor and
HasSeenAncestorWithOverflowClip). Also added an exception if
m_canSkipRepaintRectsUpdateOnScroll is set.
* rendering/RenderLayer.h:
Added a new field when it is fine to not update our repaint rects on scroll.
LayoutTests:
Added some repaint tests on the same idea (overflow: scroll / auto / hidden +/- table).
* fast/repaint/overflow-auto-in-overflow-auto-scrolled-expected.txt: Added.
* fast/repaint/overflow-auto-in-overflow-auto-scrolled.html: Added.
* fast/repaint/overflow-hidden-in-overflow-hidden-scrolled-expected.png: Added.
* fast/repaint/overflow-hidden-in-overflow-hidden-scrolled-expected.txt: Added.
* fast/repaint/overflow-hidden-in-overflow-hidden-scrolled.html: Added.
* fast/repaint/overflow-scroll-in-overflow-scroll-scrolled-expected.txt: Added.
* fast/repaint/overflow-scroll-in-overflow-scroll-scrolled.html: Added.
* fast/repaint/scroll-inside-table-cell-expected.txt: Added.
* fast/repaint/scroll-inside-table-cell.html: Added.
* fast/repaint/scroll-relative-table-inside-table-cell-expected.txt: Added.
* fast/repaint/scroll-relative-table-inside-table-cell.html: Added.
* fast/repaint/table-overflow-auto-in-overflow-auto-scrolled-expected.txt: Added.
* fast/repaint/table-overflow-auto-in-overflow-auto-scrolled.html: Added.
* fast/repaint/table-overflow-hidden-in-overflow-hidden-scrolled-expected.txt: Added.
* fast/repaint/table-overflow-hidden-in-overflow-hidden-scrolled.html: Added.
* fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled-expected.txt: Added.
* fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled.html: Added.
* platform/chromium-linux/fast/repaint/overflow-auto-in-overflow-auto-scrolled-expected.png: Added.
* platform/chromium-linux/fast/repaint/overflow-scroll-in-overflow-scroll-scrolled-expected.png: Added.
* platform/chromium-linux/fast/repaint/scroll-inside-table-cell-expected.png: Added.
* platform/chromium-linux/fast/repaint/scroll-relative-table-inside-table-cell-expected.png: Added.
* platform/chromium-linux/fast/repaint/table-overflow-auto-in-overflow-auto-scrolled-expected.png: Added.
* platform/chromium-linux/fast/repaint/table-overflow-hidden-in-overflow-hidden-scrolled-expected.png: Added.
* platform/chromium-linux/fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled-expected.png: Added.
TBR=jchaffraix@webkit.org
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=100351
Patch Set 1 #Messages
Total messages: 1 (0 generated)
|