Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION (282524@main) (iOS): Tap and click events unresponsive aft…
…er closing Safari and coming back https://bugs.webkit.org/show_bug.cgi?id=279146 rdar://135211157 Reviewed by Abrar Rahman Protyasha. In `PointerCaptureController`, there is logic which tries to not execute a mouse or pointer event if there is a capturing event whose state is "Ready". However, prior to 282524@main, this logic only worked to not execute pointer events, but would still in fact execute mouse events. After 282524@main, since click, auxclick, and contextmenu are now pointer events, the `PointerCaptureController` logic is now successful in preventing both mouse _and_ pointer events. This in itself isn't a problem, and is the desired behavior when there is an active capture state. However, in some cases (such as dismissing Safari), a touch event ends up beginning but never getting cancelled properly. Specifically, while a `pointercancel` event is dispatched, the associated capture data's state was never properly updated. Fix this by calling `cancelPointer`, which properly updates the state and also more closely adheres to the pointer event specification with regards to which events should be dispatched. Fixing this then in turn fixes the original issue, since now there will no erroneous states which are active. A test will be added in a follow up. * Source/WebCore/page/PointerCaptureController.cpp: (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex): (WebCore::PointerCaptureController::cancelPointer): * Source/WebCore/page/PointerCaptureController.h: Canonical link: https://commits.webkit.org/283187@main
- Loading branch information