[webkit-changes] [WebKit/WebKit] 7fe0d6: [UI-side compositing] Scrolling triggers more layo...

Simon Fraser noreply at github.com
Fri Mar 10 09:21:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7fe0d61af3920c468be5647625f59343f30aa253
      https://github.com/WebKit/WebKit/commit/7fe0d61af3920c468be5647625f59343f30aa253
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-03-10 (Fri, 10 Mar 2023)

  Changed paths:
    A LayoutTests/fast/scrolling/mac/scrolling-triggerered-layouts-expected.txt
    A LayoutTests/fast/scrolling/mac/scrolling-triggerered-layouts.html
    M Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.h
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.messages.in
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm

  Log Message:
  -----------
  [UI-side compositing] Scrolling triggers more layouts via updating the layout viewport
https://bugs.webkit.org/show_bug.cgi?id=253690
rdar://106535756

Reviewed by Ryosuke Niwa.

With UI-side compositing, we see more layouts happening while scrolling than before. These layouts
are triggered by FrameView::updateLayoutViewport() when it computes a new layout viewport origin.

With the non-UI-side configuration, this doesn't happen because we get a new layout viewport origin
from the scrolling tree via AsyncScrollingCoordinator::applyScrollPositionUpdate() and
updateScrollPositionAfterAsyncScroll(), and apply this in reconcileScrollingState() with a
FrameView::TriggerLayoutOrNot::No flag.

To fix this for UI-side compositing, we can simply pass the new layout viewport origin from the
scrolling tree in the UI process back to the web process, and follow the same code path.

* LayoutTests/fast/scrolling/mac/scrolling-triggerered-layouts-expected.txt: Added.
* LayoutTests/fast/scrolling/mac/scrolling-triggerered-layouts.html: Added.
* Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h: Drive-by enum size fix.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::sendScrollingTreeNodeDidScroll):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.h:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.messages.in:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):

Canonical link: https://commits.webkit.org/261504@main




More information about the webkit-changes mailing list