Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0d001d95a9c01896139caafb68eb6914980fec0e
      
https://github.com/WebKit/WebKit/commit/0d001d95a9c01896139caafb68eb6914980fec0e
  Author: Abrar Rahman Protyasha <[email protected]>
  Date:   2025-12-01 (Mon, 01 Dec 2025)

  Changed paths:
    M Source/WebKit/UIProcess/mac/WKPanGestureController.h
    M Source/WebKit/UIProcess/mac/WKPanGestureController.mm
    M Source/WebKit/UIProcess/mac/WebViewImpl.h
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm

  Log Message:
  -----------
  [AppKit Gestures] UseAppKitGestures toggle need not require a new UI process 
for behavior change
https://bugs.webkit.org/show_bug.cgi?id=303233
rdar://165522233

Reviewed by Wenson Hsieh.

Right now, we gate WKPanGestureController creation behind the value of
UseAppKitGestures at WebViewImpl creation time, meaning the preference
change is only respected at UI process initialization. This makes local
debugging cumbersome.

Instead, in this patch, we start unconditionally creating the pan
gesture controller. Then, we teach WebViewImpl::preferencesDidChange()
to call into -[WKPanGestureController enablePanGestureIfNeeded:], where
we reflect the preference value in the tracked pan gesture's `enabled`
property.

* Source/WebKit/UIProcess/mac/WKPanGestureController.h:
* Source/WebKit/UIProcess/mac/WKPanGestureController.mm:
(-[WKPanGestureController initWithPage:viewImpl:]):
(-[WKPanGestureController enablePanGestureIfNeeded]):
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::m_flagsChangedEventMonitorTrackingArea):
(WebKit::WebViewImpl::updateNeedsViewFrameInWindowCoordinatesIfNeeded):
(WebKit::WebViewImpl::preferencesDidChange):
(WebKit::WebViewImpl::configurePanGestureRecognizerIfNeeded): Deleted.

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



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

Reply via email to