haikuwebkit/LayoutTests/scrollingcoordinator/mac
Cameron McCormack f7dff2cb78 Prevent background-attachment:fixed from causing slow scrolling when in a position:fixed layer
https://bugs.webkit.org/show_bug.cgi?id=226399

Reviewed by Simon Fraser.

Source/WebCore:

Tests: scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-1.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-async.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-sync.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-async.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-sync.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-4.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-async.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-sync.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-6.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-7.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-async.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-sync.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-async.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-sync.html

We move responsbility for managing the HasSlowRepaintObjects
synchronous scrolling reason on the root scrolling node from
ScrollingCoordinator to RenderLayerCompositor, which is where it's
handled for all other scrolling nodes.

If a slow repaint object (i.e. a background-attachment:fixed element) is
present in a non-root async scrolling layer, then it continues to add
HasSlowRepaintObjects to the scrolling node's synchronous scrolling
reasons. But we now no longer add HasSlowRepaintObjects to the root
scrolling node's synchronous scrolling reasons if its containing async
scrolling layer "behaves as fixed", i.e. won't move while scrolling the
viewport.

* page/FrameView.cpp:
(WebCore::FrameView::addSlowRepaintObject): No longer need to inform
the ScrollingCoordinator since the RenderLayerCompositor now handles
HasSlowRepaintObjects synchronous scroling reason updates for the root.
(WebCore::FrameView::removeSlowRepaintObject): Ditto.
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::synchronousScrollingReasons const):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
Preserve the current value of HasSlowRepaintObjects when updating
synchronous scrolling reasons.
(WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously const):
(WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText const):
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::synchronousScrollingReasons const):
(WebCore::ScrollingCoordinator::hasSynchronousScrollingReasons const):
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::propagateSynchronousScrollingReasons):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateSynchronousScrollingNodes):
Take responsibility for managing HasSlowRepaintObjects on the root
scroll tree node. Only add HasSlowRepaintObjects on the root if not
in a fixed position layer.

LayoutTests:

* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-in-iframe-expected.txt:
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-1-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-1.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-async-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-async.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-sync-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-sync.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-async-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-async.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-sync-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-sync.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-4-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-4.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-async-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-async.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-sync-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-sync.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-6-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-6.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-7-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-7.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-async-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-async.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-sync-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-sync.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-async-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-async.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-sync-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-sync.html: Added.


Canonical link: https://commits.webkit.org/238443@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278419 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-03 21:26:29 +00:00
..
fixed-backgrounds Prevent background-attachment:fixed from causing slow scrolling when in a position:fixed layer 2021-06-03 21:26:29 +00:00
latching
fixed-scrolled-body-expected.html
fixed-scrolled-body.html
multiple-fixed-expected.html
multiple-fixed.html
nested-sticky-expected.html
nested-sticky.html
programmatic-frame-scroll-expected.html
programmatic-frame-scroll.html
programmatic-overflow-scroll-expected.html
programmatic-overflow-scroll.html
reveal-selection-tile-coverage-expected.txt REGRESSION(r261985): Unable to respond to large comments on Bugzilla with always-on scrollbars 2020-06-13 06:13:12 +00:00
reveal-selection-tile-coverage.html
rtl-programmatic-overflow-scroll-expected.html
rtl-programmatic-overflow-scroll.html
top-content-inset-to-zero-expected.html
top-content-inset-to-zero.html