Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c763056577cb27c4f34bb791c41d291c1fbf9da7
https://github.com/WebKit/WebKit/commit/c763056577cb27c4f34bb791c41d291c1fbf9da7
Author: Abrar Rahman Protyasha <[email protected]>
Date: 2026-08-25 (Tue, 25 Aug 2026)
Changed paths:
M Source/WebKit/Shared/mac/WebEventFactory.h
M Source/WebKit/Shared/mac/WebEventFactory.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
M Source/WebKit/UIProcess/API/mac/WKView.mm
M Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm
M Source/WebKit/UIProcess/mac/WebViewImpl.h
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
Log Message:
-----------
[AppKit Gestures] Notify the client of unhandled magnification gestures
https://bugs.webkit.org/show_bug.cgi?id=322478
rdar://184773360
Reviewed by Richard Robinson.
gestureEventWasNotHandledByWebCore can only tell the client about
unhandled gestures in the presence of a backing NSEvent. Gesture events
constructed under UseAppKitGestureForGestureEvents do not have one, and
so we never end up informing the client of this signal.
We add an adjacent SPI -_magnificationGestureEventWasNotHandled...,
shaped similarly to the existing -_gestureEventWasNotHandledByWebCore:
method. In this SPI, we simply launder the necessary state clients would
want to know (magnification, window location, and phase) off from the
gesture recognition path.
To aid our changes, we also refactor a few things; namely, add two phase
conversion helpers to WebEventFactory, with phaseForEvent now delegating
to one of them, and rename magnificationGestureWasNotHandledByWebCore...
to applyNativeMagnification. This method now has two callers, and
"FromViewOnly" described its caller rather than itself, so it was a
misnomer with the new SPI.
* Source/WebKit/Shared/mac/WebEventFactory.h:
* Source/WebKit/Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::phaseForEvent):
(WebKit::WebEventFactory::phaseForNativeEventPhase):
(WebKit::WebEventFactory::toNativeEventPhase):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/API/mac/WKView.mm:
(-[WKView
_web_magnificationGestureEventWasNotHandledByWebCoreWithPhase:magnification:locationInWindow:]):
* Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView
_web_magnificationGestureEventWasNotHandledByWebCoreWithPhase:magnification:locationInWindow:]):
(-[WKWebView
_magnificationGestureEventWasNotHandledByWebCoreWithPhase:magnification:locationInWindow:]):
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::magnifyWithEvent):
(WebKit::WebViewImpl::smartMagnifyWithEvent):
(WebKit::WebViewImpl::setLastMouseDownEvent):
(WebKit::WebViewImpl::magnificationGestureWasNotHandledByWebCoreFromViewOnly):
Deleted.
Canonical link: https://commits.webkit.org/319829@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications