Changeset 243468 in webkit


Ignore:
Timestamp:
Mar 25, 2019 4:11:09 PM (5 years ago)
Author:
Simon Fraser
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):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r243465 r243468  
     12019-03-25  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Zoom on macOS is centered around a point lower than the cursor
     4        https://bugs.webkit.org/show_bug.cgi?id=196225
     5        rdar://problem/49213574
     6
     7        Reviewed by Tim Horton.
     8       
     9        The origin handed to ViewGestureController::handleMagnificationGestureEvent is in WKWebView
     10        coordinates, but we end up setting the transform on the RenderView's layer, so we need
     11        to subtract the topContentInset.
     12
     13        * UIProcess/mac/ViewGestureControllerMac.mm:
     14        (WebKit::ViewGestureController::handleMagnificationGestureEvent):
     15
    1162019-03-25  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm

    r241349 r243468  
    135135void ViewGestureController::handleMagnificationGestureEvent(NSEvent *event, FloatPoint origin)
    136136{
     137    origin.setY(origin.y() - m_webPageProxy.topContentInset());
     138
    137139    ASSERT(m_activeGestureType == ViewGestureType::None || m_activeGestureType == ViewGestureType::Magnification);
    138140
Note: See TracChangeset for help on using the changeset viewer.