Title: [264882] trunk
Revision
264882
Author
[email protected]
Date
2020-07-24 20:52:47 -0700 (Fri, 24 Jul 2020)

Log Message

REGRESSION (r264690): [ iOS wk2 ] editing/selection/shift-click-includes-existing-selection.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=214688
<rdar://problem/65993683>

Reviewed by Megan Gardner.

Source/WebKit:

Add more logging to try and see why this test is failing on some post-commit iOS bots. In particular, these logs
should test a theory that it's possible for `UIScriptControllerIOS::singleTapAtPointWithModifiers` to try and
synthesize and send HID events for the tap before GraphicsServices has registered the fact that a modifier key
is being held, which would lead to a regular tap instead of a shift-tap in this test.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _singleTapIdentified:]):
(-[WKContentView _singleTapRecognized:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::commitPotentialTap):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):

Tools:

* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::singleTapAtPointWithModifiers):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (264881 => 264882)


--- trunk/Source/WebKit/ChangeLog	2020-07-25 03:21:38 UTC (rev 264881)
+++ trunk/Source/WebKit/ChangeLog	2020-07-25 03:52:47 UTC (rev 264882)
@@ -1,3 +1,24 @@
+2020-07-24  Wenson Hsieh  <[email protected]>
+
+        REGRESSION (r264690): [ iOS wk2 ] editing/selection/shift-click-includes-existing-selection.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=214688
+        <rdar://problem/65993683>
+
+        Reviewed by Megan Gardner.
+
+        Add more logging to try and see why this test is failing on some post-commit iOS bots. In particular, these logs
+        should test a theory that it's possible for `UIScriptControllerIOS::singleTapAtPointWithModifiers` to try and
+        synthesize and send HID events for the tap before GraphicsServices has registered the fact that a modifier key
+        is being held, which would lead to a regular tap instead of a shift-tap in this test.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _singleTapIdentified:]):
+        (-[WKContentView _singleTapRecognized:]):
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::commitPotentialTap):
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::handleSyntheticClick):
+
 2020-07-24  Brady Eidson  <[email protected]>
 
         Hard code some MFi controller devices instead of dynamically managing HID vs GameController.framework.

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (264881 => 264882)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-07-25 03:21:38 UTC (rev 264881)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-07-25 03:52:47 UTC (rev 264882)
@@ -2736,6 +2736,7 @@
     if (shouldRequestMagnificationInformation)
         RELEASE_LOG(ViewGestures, "Single tap identified. Request details on potential zoom. (%p)", self);
 
+    WTFLogAlways("%s - modifier flags: 0x%02x", __PRETTY_FUNCTION__, WebEvent.modifierFlags);
     _page->potentialTapAtPosition(gestureRecognizer.location, shouldRequestMagnificationInformation, ++_latestTapID);
     _potentialTapInProgress = YES;
     _isTapHighlightIDValid = YES;
@@ -2828,6 +2829,7 @@
         pointerId = [singleTapTouchIdentifier unsignedIntValue];
         m_commitPotentialTapPointerId = pointerId;
     }
+    WTFLogAlways("%s - modifier flags: 0x%02x", __PRETTY_FUNCTION__, WebEvent.modifierFlags);
     _page->commitPotentialTap(WebKit::webEventModifierFlags(gestureRecognizerModifierFlags(gestureRecognizer)), _layerTreeTransactionIdAtLastInteractionStart, pointerId);
 
     if (!_isExpectingFastSingleTapCommit)

Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (264881 => 264882)


--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2020-07-25 03:21:38 UTC (rev 264881)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2020-07-25 03:52:47 UTC (rev 264882)
@@ -895,6 +895,7 @@
 
 void WebPageProxy::commitPotentialTap(OptionSet<WebEvent::Modifier> modifiers, TransactionID layerTreeTransactionIdAtLastTouchStart, WebCore::PointerID pointerId)
 {
+    WTFLogAlways("Committing potential tap with modifiers: 0x%02x", modifiers.toRaw());
     send(Messages::WebPage::CommitPotentialTap(modifiers, layerTreeTransactionIdAtLastTouchStart, pointerId));
 }
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (264881 => 264882)


--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2020-07-25 03:21:38 UTC (rev 264881)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2020-07-25 03:52:47 UTC (rev 264882)
@@ -718,6 +718,7 @@
 
 void WebPage::handleSyntheticClick(Node& nodeRespondingToClick, const WebCore::FloatPoint& location, OptionSet<WebEvent::Modifier> modifiers, WebCore::PointerID pointerId)
 {
+    WTFLogAlways("Handling synthetic click at (%.0f, %.0f) with modifiers: 0x%02x", location.x(), location.y(), modifiers.toRaw());
     auto& respondingDocument = nodeRespondingToClick.document();
     auto isFirstSyntheticClickOnPage = !m_hasHandledSyntheticClick;
     m_hasHandledSyntheticClick = true;

Modified: trunk/Tools/ChangeLog (264881 => 264882)


--- trunk/Tools/ChangeLog	2020-07-25 03:21:38 UTC (rev 264881)
+++ trunk/Tools/ChangeLog	2020-07-25 03:52:47 UTC (rev 264882)
@@ -1,3 +1,14 @@
+2020-07-24  Wenson Hsieh  <[email protected]>
+
+        REGRESSION (r264690): [ iOS wk2 ] editing/selection/shift-click-includes-existing-selection.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=214688
+        <rdar://problem/65993683>
+
+        Reviewed by Megan Gardner.
+
+        * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
+        (WTR::UIScriptControllerIOS::singleTapAtPointWithModifiers):
+
 2020-07-24  Beth Dakin  <[email protected]>
 
         Adopt inclusive WKBrowsingContextGroup SPI in the API tests

Modified: trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm (264881 => 264882)


--- trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm	2020-07-25 03:21:38 UTC (rev 264881)
+++ trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm	2020-07-25 03:52:47 UTC (rev 264882)
@@ -300,9 +300,15 @@
 
     waitForSingleTapToReset();
 
+    if (!modifierFlags.isEmpty())
+        WTFLogAlways("Synthesizing modifier key events.");
+
     for (auto& modifierFlag : modifierFlags)
         [[HIDEventGenerator sharedHIDEventGenerator] keyDown:modifierFlag];
 
+    if (!modifierFlags.isEmpty())
+        WTFLogAlways("Synthesizing tap.");
+
     [[HIDEventGenerator sharedHIDEventGenerator] tap:globalToContentCoordinates(webView(), location.x(), location.y()) completionBlock:[this, protectedThis = makeRefPtr(*this), modifierFlags = WTFMove(modifierFlags), block = WTFMove(block)] () mutable {
         if (!m_context)
             return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to