[webkit-changes] [WebKit/WebKit] d1ac2b: [UI-side compositing] Have pinch zoom constrain zo...

Nikos Mouchtaris noreply at github.com
Sat Mar 4 12:32:21 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d1ac2b0c842b877514d0109437565162ebf7272b
      https://github.com/WebKit/WebKit/commit/d1ac2b0c842b877514d0109437565162ebf7272b
  Author: Nikolaos Mouchtaris <nmouchtaris at apple.com>
  Date:   2023-03-04 (Sat, 04 Mar 2023)

  Changed paths:
    M Source/WebCore/page/scrolling/ScrollingTree.cpp
    M Source/WebCore/page/scrolling/ScrollingTree.h
    M Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.h
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm
    M Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.mm
    M Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

  Log Message:
  -----------
  [UI-side compositing] Have pinch zoom constrain zoom origin in commitTransientZoom
https://bugs.webkit.org/show_bug.cgi?id=252345
rdar://105515035

Reviewed by Simon Fraser.

Mirror TiledCoreAnimationDrawingArea code by constraining the zoom origin to prevent
view jumping after commiting a zoom in certain scenarios. We do this by querying
the root frame scrolling node about certain state to pass to the ScrollableArea
static function constrainScrollPositionForOverhang(). We also pass this constrained
origin to the WebProcess. We also add several functions to ScrollingTree and
RemoteScrollingCoordinatorProxy to retreive root node state while holding the tree
lock. It was also necessary to change ScrollingTree::mainFrameScrollPosition to use
the root node's scroll position rather than mainFrameScrollPosition since that
member does not appear to be updated with UI-side compositing on.

* Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxyMac::commitTransientZoom):
* Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.mm:
(WebKit::RemoteLayerTreeDrawingAreaMac::commitTransientZoom):

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




More information about the webkit-changes mailing list