Changeset 271216 in webkit
- Timestamp:
- Jan 6, 2021, 3:28:43 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
page/PointerCaptureController.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r271214 r271216 1 2021-01-06 Devin Rousso <drousso@apple.com> 2 3 [iOS] REGRESSION(r265088): "pointerdown" doesn't fire using a trackpad after double-tapping 4 https://bugs.webkit.org/show_bug.cgi?id=220072 5 6 Reviewed by Antoine Quint. 7 8 r265088 made it such that pointer events are not created for mouse events if there is an 9 existing entry for any touch event in `m_activePointerIdsToCapturingData`. Unfortunately, 10 entries only appear to be removed from `m_activePointerIdsToCapturingData` from three places: 11 - when the single tap gesture recognizer resets (`-[WKContentView _singleTapDidReset:]`) 12 - if a potential tap cannot be committed (`-[WKContentView _commitPotentialTapFailed]`) 13 - after a synthetic click (`-[WKContentView _didCompleteSyntheticClick]`) 14 AFAICT (and seeing how there's a gesture recognizer for double-tap, long press, etc.), this 15 does not include other situations like the second tap of a double-tap. In order to fix this: 16 - eagerly `touchWithIdentifierWasRemoved` when dispatching `"pointerup"` for a touch event 17 - (just in case) don't prevent the pointer event for mouse events if the existing touch 18 event has been cancelled or is not currently pressed 19 20 * page/PointerCaptureController.cpp: 21 (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex): 22 (WebCore::PointerCaptureController::pointerEventForMouseEvent): 23 1 24 2021-01-06 Andy Estes <aestes@apple.com> 2 25 -
trunk/Source/WebCore/page/PointerCaptureController.cpp
r270582 r271216 296 296 dispatchEnterOrLeaveEvent(eventNames().pointerleaveEvent); 297 297 capturingData.previousTarget = nullptr; 298 299 touchWithIdentifierWasRemoved(pointerEvent->pointerId()); 298 300 } 299 301 } … … 305 307 // for instance in the case of a long press to initiate a system drag. 306 308 for (auto& capturingData : m_activePointerIdsToCapturingData.values()) { 307 if (capturingData.pointerType == PointerEvent::touchPointerType() )309 if (capturingData.pointerType == PointerEvent::touchPointerType() && capturingData.pointerIsPressed && !capturingData.cancelled) 308 310 return nullptr; 309 311 }
Note:
See TracChangeset
for help on using the changeset viewer.