Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7b60c3fdb55b5f2e81bf69e96b41f6c98ddfe8ca
https://github.com/WebKit/WebKit/commit/7b60c3fdb55b5f2e81bf69e96b41f6c98ddfe8ca
Author: Lily Spiniolas <[email protected]>
Date: 2026-01-28 (Wed, 28 Jan 2026)
Changed paths:
M Source/WebCore/page/PointerCaptureController.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
M Source/WebKit/UIProcess/ios/WKTouchEventsGestureRecognizer.mm
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Log Message:
-----------
[iOS] Active pointer map may fail to clear in presence of external gesture
recognizer
https://bugs.webkit.org/show_bug.cgi?id=306373
rdar://159227684
Reviewed by Abrar Rahman Protyasha.
When a WKWebView is the subview of a parent view which itself has a custom
gesture recognizer, the custom gesture recognizer may block gestures in such
a way that `touchesBegan` fires for WebKit's touch gesture recognizer, but
not `touchesEnded` or `touchesCancelled`. When this happens, we add an active
pointer to the map in PointerCaptureController but never clear it since we
never received a notification that the touch ended or was otherwise cancelled.
When an active touch is present in the map, we do not create pointer events
in `PointerCaptureController::pointerEventForMouseEvent`, so if the parent
view later stops blocking touch gestures, WebKit may continue to fail to
dispatch pointer and click events afterward.
Resolve this by clearing the active pointer map when `reset` is called for
`WKTouchEventsGestureRecognizer`.
* Source/WebCore/page/PointerCaptureController.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetPointerCapture):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _touchEventsGestureRecognizerReset]):
* Source/WebKit/UIProcess/ios/WKTouchEventsGestureRecognizer.mm:
(-[WKTouchEventsGestureRecognizer reset]):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::resetPointerCapture):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
Canonical link: https://commits.webkit.org/306362@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications