[Async overflow scrolling] Absolute positioned element inside async overflow scroll...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 May 2019 15:01:14 +0000 (15:01 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 May 2019 15:01:14 +0000 (15:01 +0000)
commitcda3c1895261a59654230ebfe3145ff9ed80fff1
treeaff0c8c02fd26a87423798b29c9cd34a10e5895b
parent98a7cf64893d7b0c70c1c9194a0b26cffb81e82a
[Async overflow scrolling] Absolute positioned element inside async overflow scroll didn't get composited sometimes
https://bugs.webkit.org/show_bug.cgi?id=198237

Reviewed by Antti Koivisto.

Source/WebCore:

The logic in requiresCompositingForIndirectReason() that decides if we need to do
compositing for a layer that needs to move independently of its enclosing scroller
was wrong.

Instead of asking question about the enclosing compositing layer, it needs to ask
whether it has different positioning behavior from the layer that it would
otherwise paint into, which is its paint-order parent.

"paintsIntoProvidedBacking" already does a containing-block check against the
scroller, so we know we don't have to do the check in that case.

Test: scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::enclosingCompositedScrollingLayer):
(WebCore::isScrolledByOverflowScrollLayer):
(WebCore::isNonScrolledLayerInsideScrolledCompositedAncestor):
(WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
* rendering/RenderLayerCompositor.h:

LayoutTests:

* platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt: Added.
* scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt: Added.
* scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt [new file with mode: 0644]
LayoutTests/scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt [new file with mode: 0644]
LayoutTests/scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h