Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3807854541383b0fe6b7ac5115fd2859aedac5a1
      
https://github.com/WebKit/WebKit/commit/3807854541383b0fe6b7ac5115fd2859aedac5a1
  Author: Abrar Rahman Protyasha <[email protected]>
  Date:   2026-08-06 (Thu, 06 Aug 2026)

  Changed paths:
    M Source/WebKit/Shared/WebEvent.serialization.in
    A Source/WebKit/Shared/WebEventPhase.h
    M Source/WebKit/Shared/WebWheelEvent.h
    M Source/WebKit/Shared/mac/WebEventFactory.h
    M Source/WebKit/Shared/mac/WebEventFactory.mm
    M Source/WebKit/Shared/mac/WebGestureEvent.h
    M Source/WebKit/UIProcess/ViewGestureController.h
    M Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm

  Log Message:
  -----------
  ViewGestureController magnification gesture handling should not need to be 
fed a NSEvent instance
https://bugs.webkit.org/show_bug.cgi?id=321134
rdar://184167170

Reviewed by Richard Robinson.

The ViewGestureController::handleMagnificationGesture[Event] entry point
for gesture handling currently takes an NSEvent argument, but really it
only does so to read off the magnification, phase, and type fields of
the event. As such, we change this method so that callers have to pass
in these individual bits.

This will aid us in a forthcoming change where we need to bring up
support for gesture handling without a backing NSEvent.

Another noteworthy refactor in this patch is to pull out WebWheelEvent's
phase enum into a standalone WebEventPhase enum, which both wheel and
gesture events can adopt.

* Source/WebKit/Shared/WebEvent.serialization.in:
* Source/WebKit/Shared/WebEventPhase.h:
* Source/WebKit/Shared/WebWheelEvent.h:
* Source/WebKit/Shared/mac/WebEventFactory.h:
* Source/WebKit/Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::phaseForEvent):
(WebKit::phaseForEvent): Deleted.
* Source/WebKit/Shared/mac/WebGestureEvent.h:
* Source/WebKit/UIProcess/ViewGestureController.h:
* Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::gestureEventWasNotHandledByWebCore):
(WebKit::ViewGestureController::handleMagnificationGesture):
(WebKit::ViewGestureController::handleMagnificationGestureEvent): Deleted.
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::magnifyWithEvent):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::setPageScaleFactor):

Drop the now misnamed ViewGestureController method reference and instead
just mention the relevant codepath.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to