Title: [271216] trunk/Source/WebCore
- Revision
- 271216
- Author
- [email protected]
- Date
- 2021-01-06 15:28:43 -0800 (Wed, 06 Jan 2021)
Log Message
[iOS] REGRESSION(r265088): "pointerdown" doesn't fire using a trackpad after double-tapping
https://bugs.webkit.org/show_bug.cgi?id=220072
Reviewed by Antoine Quint.
r265088 made it such that pointer events are not created for mouse events if there is an
existing entry for any touch event in `m_activePointerIdsToCapturingData`. Unfortunately,
entries only appear to be removed from `m_activePointerIdsToCapturingData` from three places:
- when the single tap gesture recognizer resets (`-[WKContentView _singleTapDidReset:]`)
- if a potential tap cannot be committed (`-[WKContentView _commitPotentialTapFailed]`)
- after a synthetic click (`-[WKContentView _didCompleteSyntheticClick]`)
AFAICT (and seeing how there's a gesture recognizer for double-tap, long press, etc.), this
does not include other situations like the second tap of a double-tap. In order to fix this:
- eagerly `touchWithIdentifierWasRemoved` when dispatching `"pointerup"` for a touch event
- (just in case) don't prevent the pointer event for mouse events if the existing touch
event has been cancelled or is not currently pressed
* page/PointerCaptureController.cpp:
(WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
(WebCore::PointerCaptureController::pointerEventForMouseEvent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (271215 => 271216)
--- trunk/Source/WebCore/ChangeLog 2021-01-06 23:11:38 UTC (rev 271215)
+++ trunk/Source/WebCore/ChangeLog 2021-01-06 23:28:43 UTC (rev 271216)
@@ -1,3 +1,26 @@
+2021-01-06 Devin Rousso <[email protected]>
+
+ [iOS] REGRESSION(r265088): "pointerdown" doesn't fire using a trackpad after double-tapping
+ https://bugs.webkit.org/show_bug.cgi?id=220072
+
+ Reviewed by Antoine Quint.
+
+ r265088 made it such that pointer events are not created for mouse events if there is an
+ existing entry for any touch event in `m_activePointerIdsToCapturingData`. Unfortunately,
+ entries only appear to be removed from `m_activePointerIdsToCapturingData` from three places:
+ - when the single tap gesture recognizer resets (`-[WKContentView _singleTapDidReset:]`)
+ - if a potential tap cannot be committed (`-[WKContentView _commitPotentialTapFailed]`)
+ - after a synthetic click (`-[WKContentView _didCompleteSyntheticClick]`)
+ AFAICT (and seeing how there's a gesture recognizer for double-tap, long press, etc.), this
+ does not include other situations like the second tap of a double-tap. In order to fix this:
+ - eagerly `touchWithIdentifierWasRemoved` when dispatching `"pointerup"` for a touch event
+ - (just in case) don't prevent the pointer event for mouse events if the existing touch
+ event has been cancelled or is not currently pressed
+
+ * page/PointerCaptureController.cpp:
+ (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
+ (WebCore::PointerCaptureController::pointerEventForMouseEvent):
+
2021-01-06 Andy Estes <[email protected]>
[Mac] Replace most uses of HAVE(MT_PLUGIN_FORMAT_READER) with ENABLE(WEBM_FORMAT_READER)
Modified: trunk/Source/WebCore/page/PointerCaptureController.cpp (271215 => 271216)
--- trunk/Source/WebCore/page/PointerCaptureController.cpp 2021-01-06 23:11:38 UTC (rev 271215)
+++ trunk/Source/WebCore/page/PointerCaptureController.cpp 2021-01-06 23:28:43 UTC (rev 271216)
@@ -295,6 +295,8 @@
dispatchOverOrOutEvent(eventNames().pointeroutEvent, currentTarget.get());
dispatchEnterOrLeaveEvent(eventNames().pointerleaveEvent);
capturingData.previousTarget = nullptr;
+
+ touchWithIdentifierWasRemoved(pointerEvent->pointerId());
}
}
#endif
@@ -304,7 +306,7 @@
// If we already have known touches then we cannot dispatch a mouse event,
// for instance in the case of a long press to initiate a system drag.
for (auto& capturingData : m_activePointerIdsToCapturingData.values()) {
- if (capturingData.pointerType == PointerEvent::touchPointerType())
+ if (capturingData.pointerType == PointerEvent::touchPointerType() && capturingData.pointerIsPressed && !capturingData.cancelled)
return nullptr;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes