Changeset 249431 in webkit
- Timestamp:
- Sep 3, 2019 9:38:09 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r249426 r249431 1 2019-09-03 Antoine Quint <graouts@apple.com> 2 3 [iOS] Treat a two-finger single tap as if the user tapped with the Cmd key pressed 4 https://bugs.webkit.org/show_bug.cgi?id=201420 5 <rdar://problem/53207786> 6 7 Reviewed by Simon Fraser. 8 9 Add a new event that checks that a two-finger single tap on a clickable element yields a "click" event with the metaKey flag set to true. 10 11 * fast/events/ios/click-event-two-finger-single-tap-meta-key-expected.txt: Added. 12 * fast/events/ios/click-event-two-finger-single-tap-meta-key.html: Added. 13 1 14 2019-09-03 Rob Buis <rbuis@igalia.com> 2 15 -
trunk/Source/WebKit/ChangeLog
r249430 r249431 1 2019-09-03 Antoine Quint <graouts@apple.com> 2 3 [iOS] Treat a two-finger single tap as if the user tapped with the Cmd key pressed 4 https://bugs.webkit.org/show_bug.cgi?id=201420 5 <rdar://problem/53207786> 6 7 Reviewed by Simon Fraser. 8 9 Set the metaKey modifier to true when generating a click event based on a two-finger single tap. This is important so that sites like Google and DuckDuckGo 10 correctly open links in their search results page in a new tab in Safari on iOS. This currently doesn't work because those sites will call preventDefault() 11 if the metaKey flag isn't set on a "click" event, and if it is set, they let the browser handle the navigation themselves. 12 13 * UIProcess/ios/WKContentViewInteraction.mm: 14 (-[WKContentView _twoFingerSingleTapGestureRecognized:]): 15 1 16 2019-08-28 Brent Fulgham <bfulgham@apple.com> 2 17 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r249368 r249431 2404 2404 _isTapHighlightIDValid = YES; 2405 2405 _isExpectingFastSingleTapCommit = YES; 2406 _page->handleTwoFingerTapAtPoint(WebCore::roundedIntPoint(gestureRecognizer.centroid), WebKit::webEventModifierFlags(gestureRecognizerModifierFlags(gestureRecognizer) ), ++_latestTapID);2406 _page->handleTwoFingerTapAtPoint(WebCore::roundedIntPoint(gestureRecognizer.centroid), WebKit::webEventModifierFlags(gestureRecognizerModifierFlags(gestureRecognizer) | UIKeyModifierCommand), ++_latestTapID); 2407 2407 } 2408 2408 -
trunk/Tools/ChangeLog
r249425 r249431 1 2019-09-03 Antoine Quint <graouts@apple.com> 2 3 [iOS] Treat a two-finger single tap as if the user tapped with the Cmd key pressed 4 https://bugs.webkit.org/show_bug.cgi?id=201420 5 <rdar://problem/53207786> 6 7 Reviewed by Simon Fraser. 8 9 Add a new twoFingerSingleTapAtPoint() method to UIScriptController, which just calls into the existing (but unused) 10 -[HIDEventGenerator twoFingerTap:completionBlock:]. 11 12 * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: 13 * TestRunnerShared/UIScriptContext/UIScriptController.h: 14 (WTR::UIScriptController::twoFingerSingleTapAtPoint): 15 * WebKitTestRunner/ios/UIScriptControllerIOS.h: 16 * WebKitTestRunner/ios/UIScriptControllerIOS.mm: 17 (WTR::UIScriptControllerIOS::twoFingerSingleTapAtPoint): 18 1 19 2019-09-03 Zan Dobersek <zdobersek@igalia.com> 2 20 -
trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
r249125 r249431 60 60 void singleTapAtPoint(long x, long y, object callback); 61 61 void singleTapAtPointWithModifiers(long x, long y, object modifierArray, object callback); 62 void twoFingerSingleTapAtPoint(long x, long y, object callback); 62 63 void doubleTapAtPoint(long x, long y, float delay, object callback); 63 64 void dragFromPointToPoint(long startX, long startY, long endX, long endY, double durationSeconds, object callback); -
trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
r249125 r249431 138 138 virtual void singleTapAtPoint(long x, long y, JSValueRef callback) { notImplemented(); } 139 139 virtual void singleTapAtPointWithModifiers(long x, long y, JSValueRef modifierArray, JSValueRef callback) { notImplemented(); } 140 virtual void twoFingerSingleTapAtPoint(long x, long y, JSValueRef callback) { notImplemented(); } 140 141 virtual void doubleTapAtPoint(long x, long y, float delay, JSValueRef callback) { notImplemented(); } 141 142 virtual void dragFromPointToPoint(long startX, long startY, long endX, long endY, double durationSeconds, JSValueRef callback) { notImplemented(); } -
trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.h
r249125 r249431 54 54 void singleTapAtPoint(long x, long y, JSValueRef) override; 55 55 void singleTapAtPointWithModifiers(long x, long y, JSValueRef modifierArray, JSValueRef) override; 56 void twoFingerSingleTapAtPoint(long x, long y, JSValueRef callback) override; 56 57 void doubleTapAtPoint(long x, long y, float delay, JSValueRef) override; 57 58 void stylusDownAtPoint(long x, long y, float azimuthAngle, float altitudeAngle, float pressure, JSValueRef) override; -
trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm
r249125 r249431 273 273 } 274 274 275 void UIScriptControllerIOS::twoFingerSingleTapAtPoint(long x, long y, JSValueRef callback) 276 { 277 unsigned callbackID = m_context->prepareForAsyncTask(callback, CallbackTypeNonPersistent); 278 279 auto location = globalToContentCoordinates(webView(), x, y); 280 [[HIDEventGenerator sharedHIDEventGenerator] twoFingerTap:location completionBlock:^{ 281 if (!m_context) 282 return; 283 m_context->asyncTaskComplete(callbackID); 284 }]; 285 } 286 275 287 void UIScriptControllerIOS::singleTapAtPointWithModifiers(long x, long y, JSValueRef modifierArray, JSValueRef callback) 276 288 {
Note: See TracChangeset
for help on using the changeset viewer.