Title: [243468] trunk/Source/WebKit
Revision
243468
Author
[email protected]
Date
2019-03-25 16:11:09 -0700 (Mon, 25 Mar 2019)

Log Message

Zoom on macOS is centered around a point lower than the cursor
https://bugs.webkit.org/show_bug.cgi?id=196225
rdar://problem/49213574

Reviewed by Tim Horton.

The origin handed to ViewGestureController::handleMagnificationGestureEvent is in WKWebView
coordinates, but we end up setting the transform on the RenderView's layer, so we need
to subtract the topContentInset.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::handleMagnificationGestureEvent):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (243467 => 243468)


--- trunk/Source/WebKit/ChangeLog	2019-03-25 22:40:58 UTC (rev 243467)
+++ trunk/Source/WebKit/ChangeLog	2019-03-25 23:11:09 UTC (rev 243468)
@@ -1,3 +1,18 @@
+2019-03-25  Simon Fraser  <[email protected]>
+
+        Zoom on macOS is centered around a point lower than the cursor
+        https://bugs.webkit.org/show_bug.cgi?id=196225
+        rdar://problem/49213574
+
+        Reviewed by Tim Horton.
+        
+        The origin handed to ViewGestureController::handleMagnificationGestureEvent is in WKWebView
+        coordinates, but we end up setting the transform on the RenderView's layer, so we need
+        to subtract the topContentInset.
+
+        * UIProcess/mac/ViewGestureControllerMac.mm:
+        (WebKit::ViewGestureController::handleMagnificationGestureEvent):
+
 2019-03-25  Alex Christensen  <[email protected]>
 
         Do not terminate the NetworkProcess if a third party application sends a NSCredential with a SecIdentityRef

Modified: trunk/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm (243467 => 243468)


--- trunk/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm	2019-03-25 22:40:58 UTC (rev 243467)
+++ trunk/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm	2019-03-25 23:11:09 UTC (rev 243468)
@@ -134,6 +134,8 @@
 
 void ViewGestureController::handleMagnificationGestureEvent(NSEvent *event, FloatPoint origin)
 {
+    origin.setY(origin.y() - m_webPageProxy.topContentInset());
+
     ASSERT(m_activeGestureType == ViewGestureType::None || m_activeGestureType == ViewGestureType::Magnification);
 
     if (m_activeGestureType == ViewGestureType::None) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to