Changeset 255786 in webkit
- Timestamp:
- Feb 4, 2020 8:32:18 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r255783 r255786 1 2020-02-04 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 REGRESSION (r251320): Can't double tap to select word in Notes on iCloud.com 4 https://bugs.webkit.org/show_bug.cgi?id=207239 5 <rdar://problem/58686015> 6 7 Reviewed by Tim Horton. 8 9 Add a test to verify that performing a double tap on an element with a dblclick handler results in the following 10 sequence of events: `[ "pointerdown", "pointerup", "pointerdown", "pointerup", "dblclick" ]`. 11 12 * pointerevents/ios/pointer-events-for-double-tap-expected.txt: Added. 13 * pointerevents/ios/pointer-events-for-double-tap.html: Added. 14 * pointerevents/utils.js: 15 (const.ui.new.UIController.prototype.doubleTap): 16 17 Add a helper method to simulate a double-tap gesture. 18 1 19 2020-02-04 Ryan Haddad <ryanhaddad@apple.com> 2 20 -
trunk/LayoutTests/pointerevents/utils.js
r253878 r255786 133 133 { 134 134 return this._run(`uiController.singleTapAtPoint(${options.x}, ${options.y})`); 135 } 136 137 doubleTap(options) 138 { 139 return this._run(`uiController.doubleTapAtPoint(${options.x}, ${options.y}, 0, () => uiController.uiScriptComplete())`); 135 140 } 136 141 -
trunk/Source/WebKit/ChangeLog
r255785 r255786 1 2020-02-04 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 REGRESSION (r251320): Can't double tap to select word in Notes on iCloud.com 4 https://bugs.webkit.org/show_bug.cgi?id=207239 5 <rdar://problem/58686015> 6 7 Reviewed by Tim Horton. 8 9 Following r251320, all synthetic mouse events on iOS additionally dispatched corresponding pointer events. This 10 led to duplicate "pointerdown"/"pointerup" events dispatched with every tap. r253878 fixed this by avoiding 11 pointer event dispatch for synthetically generated mouse events (and made this determination by consulting 12 `syntheticClickType()`). 13 14 However, in the case where we're synthesizing a mouse event for a "dblclick" event handler (after a double- 15 tap), we currently pass `NoTap` as the synthetic click event type when creating the mouse event. This causes 16 additional pointer events to be synthesized and dispatched during a double tap, which creates three pairs of 17 "pointerdown"/"pointerup" events upon double-tap. This subsequently confuses iCloud Notes' web app when double 18 tapping to select a word. 19 20 Fix this by passing in `OneFingerTap` as the synthetic click type instead (since two-finger double taps should 21 already be handled by the two-finger double-tap magnification gesture). 22 23 Test: pointerevents/ios/pointer-events-for-double-tap.html 24 25 * WebProcess/WebPage/ios/WebPageIOS.mm: 26 (WebKit::WebPage::handleDoubleTapForDoubleClickAtPoint): 27 1 28 2020-02-01 Darin Adler <darin@apple.com> 2 29 -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r255710 r255786 834 834 bool metaKey = modifiers.contains(WebEvent::Modifier::MetaKey); 835 835 auto roundedAdjustedPoint = roundedIntPoint(adjustedPoint); 836 nodeRespondingToDoubleClick->document().frame()->eventHandler().handleMousePressEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MousePressed, 2, shiftKey, ctrlKey, altKey, metaKey, WallTime::now(), 0, WebCore:: NoTap));836 nodeRespondingToDoubleClick->document().frame()->eventHandler().handleMousePressEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MousePressed, 2, shiftKey, ctrlKey, altKey, metaKey, WallTime::now(), 0, WebCore::OneFingerTap)); 837 837 if (m_isClosed) 838 838 return; 839 nodeRespondingToDoubleClick->document().frame()->eventHandler().handleMouseReleaseEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MouseReleased, 2, shiftKey, ctrlKey, altKey, metaKey, WallTime::now(), 0, WebCore:: NoTap));839 nodeRespondingToDoubleClick->document().frame()->eventHandler().handleMouseReleaseEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MouseReleased, 2, shiftKey, ctrlKey, altKey, metaKey, WallTime::now(), 0, WebCore::OneFingerTap)); 840 840 } 841 841
Note: See TracChangeset
for help on using the changeset viewer.