[webkit-changes] [WebKit/WebKit] 47115d: [UI-side compositing] Have pinch zoom run "snap-ba...

Nikos Mouchtaris noreply at github.com
Sat Feb 11 14:54:49 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 47115d5fb5b3ffa21f51b31049870299ff5d194c
      https://github.com/WebKit/WebKit/commit/47115d5fb5b3ffa21f51b31049870299ff5d194c
  Author: Nikolaos Mouchtaris <nmouchtaris at apple.com>
  Date:   2023-02-11 (Sat, 11 Feb 2023)

  Changed paths:
    M Source/WebKit/SourcesCocoa.txt
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    A Source/WebKit/WebProcess/WebPage/Cocoa/DrawingAreaCocoa.mm
    M Source/WebKit/WebProcess/WebPage/DrawingArea.h
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
    M Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

  Log Message:
  -----------
  [UI-side compositing] Have pinch zoom run "snap-back" animation in commitTransientZoom
https://bugs.webkit.org/show_bug.cgi?id=251968
rdar://105203991

Reviewed by Simon Fraser.

When the user has pinch zoomed beyond the minimum or maximum scale allowed, we
need to perform a snap-back animation, like we do in non ui-side compositing
mode. To do this we create a CAAnimation with a transform to the clipped scale
and origin. We also add the WebPage commitTransientZoom IPC to a completion block
to be run after the animation finishes. We still need to figure out how to properly
constrain the origin as we do in TiledCoreAnimationDrawingArea. This will need to
involve some way of getting web process state into the UI process, including the
visibleContentRect and several different FrameView members.

* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm:
(WebKit::transientZoomSnapAnimationForKeyPath):
(WebKit::RemoteLayerTreeDrawingAreaProxyMac::commitTransientZoom):
* Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):

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




More information about the webkit-changes mailing list