Make reconcileViewportConstrainedLayerPositions start from a specified scrolling...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2018 21:22:02 +0000 (21:22 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2018 21:22:02 +0000 (21:22 +0000)
commit02efd8505784a38766fddba2ef5c12f489386c77
tree7a557913396bef19ef50f5710c58b9c2eb1eebc5
parent102c17c987a5720163ee68113a355a8e7001d3d5
Make reconcileViewportConstrainedLayerPositions start from a specified scrolling node
https://bugs.webkit.org/show_bug.cgi?id=180002

Patch by Frederic Wang <fwang@igalia.com> on 2018-11-29
Reviewed by Simon Fraser.

For non-programmatic scrolling of frames, AsyncScrollingCoordinator::reconcileScrollingState
currently always call reconcileViewportConstrainedLayerPositions for the main frame
since async subframe scrolling is not supported yet (bug 171667 and bug 149264). This
function in turn calls reconcileLayerPositionForViewportRect on the whole scrolling tree to
readjust position of fixed/sticky descendants. This patch refactors a bit the code so that
the operation is actually only applied to the descendants of the frame's scrolling node,
which would mean a small optimization when subframe are asynchronously scrollable. The code
is already covered by reconcile-layer-position-recursive.html.

No new tests, behavior unchanged and already covered by existing tests.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState): Pass the frame's scrolling
node id.
(WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions): Start
reconciliation from the specified scrolling node and log its ID.
* page/scrolling/AsyncScrollingCoordinator.h: Add ScrollingNodeID parameter.
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::reconcileViewportConstrainedLayerPositions): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
Source/WebCore/page/scrolling/ScrollingCoordinator.h