haikuwebkit/LayoutTests/pointerevents/ios/pointer-events-for-double-t...

4 lines
127 B
Plaintext
Raw Permalink Normal View History

REGRESSION (r251320): Can't double tap to select word in Notes on iCloud.com https://bugs.webkit.org/show_bug.cgi?id=207239 <rdar://problem/58686015> Reviewed by Tim Horton. Source/WebKit: Following r251320, all synthetic mouse events on iOS additionally dispatched corresponding pointer events. This led to duplicate "pointerdown"/"pointerup" events dispatched with every tap. r253878 fixed this by avoiding pointer event dispatch for synthetically generated mouse events (and made this determination by consulting `syntheticClickType()`). However, in the case where we're synthesizing a mouse event for a "dblclick" event handler (after a double- tap), we currently pass `NoTap` as the synthetic click event type when creating the mouse event. This causes additional pointer events to be synthesized and dispatched during a double tap, which creates three pairs of "pointerdown"/"pointerup" events upon double-tap. This subsequently confuses iCloud Notes' web app when double tapping to select a word. Fix this by passing in `OneFingerTap` as the synthetic click type instead (since two-finger double taps should already be handled by the two-finger double-tap magnification gesture). Test: pointerevents/ios/pointer-events-for-double-tap.html * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleDoubleTapForDoubleClickAtPoint): LayoutTests: Add a test to verify that performing a double tap on an element with a dblclick handler results in the following sequence of events: `[ "pointerdown", "pointerup", "pointerdown", "pointerup", "dblclick" ]`. * pointerevents/ios/pointer-events-for-double-tap-expected.txt: Added. * pointerevents/ios/pointer-events-for-double-tap.html: Added. * pointerevents/utils.js: (const.ui.new.UIController.prototype.doubleTap): Add a helper method to simulate a double-tap gesture. Canonical link: https://commits.webkit.org/220234@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-05 04:32:18 +00:00
PASS Verifies that two pairs of pointerup and pointerdown events are dispatched in an element with a dblclick event handler.
REGRESSION (r251320): Can't double tap to select word in Notes on iCloud.com https://bugs.webkit.org/show_bug.cgi?id=207239 <rdar://problem/58686015> Reviewed by Tim Horton. Source/WebKit: Following r251320, all synthetic mouse events on iOS additionally dispatched corresponding pointer events. This led to duplicate "pointerdown"/"pointerup" events dispatched with every tap. r253878 fixed this by avoiding pointer event dispatch for synthetically generated mouse events (and made this determination by consulting `syntheticClickType()`). However, in the case where we're synthesizing a mouse event for a "dblclick" event handler (after a double- tap), we currently pass `NoTap` as the synthetic click event type when creating the mouse event. This causes additional pointer events to be synthesized and dispatched during a double tap, which creates three pairs of "pointerdown"/"pointerup" events upon double-tap. This subsequently confuses iCloud Notes' web app when double tapping to select a word. Fix this by passing in `OneFingerTap` as the synthetic click type instead (since two-finger double taps should already be handled by the two-finger double-tap magnification gesture). Test: pointerevents/ios/pointer-events-for-double-tap.html * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleDoubleTapForDoubleClickAtPoint): LayoutTests: Add a test to verify that performing a double tap on an element with a dblclick handler results in the following sequence of events: `[ "pointerdown", "pointerup", "pointerdown", "pointerup", "dblclick" ]`. * pointerevents/ios/pointer-events-for-double-tap-expected.txt: Added. * pointerevents/ios/pointer-events-for-double-tap.html: Added. * pointerevents/utils.js: (const.ui.new.UIController.prototype.doubleTap): Add a helper method to simulate a double-tap gesture. Canonical link: https://commits.webkit.org/220234@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-05 04:32:18 +00:00