Title: [265441] trunk
Revision
265441
Author
[email protected]
Date
2020-08-10 12:29:28 -0700 (Mon, 10 Aug 2020)

Log Message

Add more logging to diagnose editing/selection/ios/select-all-non-editable-text-using-keyboard.html
https://bugs.webkit.org/show_bug.cgi?id=215089
<rdar://problem/66282806>

Reviewed by Tim Horton.

Source/WebKit:

Remove some unnecessary declarations that were only used for debug logging in WebKitTestRunner, and add some
more logging to check whether the web view is even getting a call to select all from UIKit.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView selectAllForWebView:]):

Tools:

* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::keyDown):
* WebKitTestRunner/ios/mainIOS.mm:
(-[WebKitTestRunnerApp handleKeyHIDEvent:]): Deleted.

LayoutTests:

* editing/selection/ios/select-all-non-editable-text-using-keyboard-expected.txt:
* editing/selection/ios/select-all-non-editable-text-using-keyboard.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (265440 => 265441)


--- trunk/LayoutTests/ChangeLog	2020-08-10 19:29:03 UTC (rev 265440)
+++ trunk/LayoutTests/ChangeLog	2020-08-10 19:29:28 UTC (rev 265441)
@@ -1,3 +1,14 @@
+2020-08-10  Wenson Hsieh  <[email protected]>
+
+        Add more logging to diagnose editing/selection/ios/select-all-non-editable-text-using-keyboard.html
+        https://bugs.webkit.org/show_bug.cgi?id=215089
+        <rdar://problem/66282806>
+
+        Reviewed by Tim Horton.
+
+        * editing/selection/ios/select-all-non-editable-text-using-keyboard-expected.txt:
+        * editing/selection/ios/select-all-non-editable-text-using-keyboard.html:
+
 2020-08-10  Chris Dumez  <[email protected]>
 
         Align existing AudioParam API with the specification

Modified: trunk/LayoutTests/editing/selection/ios/select-all-non-editable-text-using-keyboard-expected.txt (265440 => 265441)


--- trunk/LayoutTests/editing/selection/ios/select-all-non-editable-text-using-keyboard-expected.txt	2020-08-10 19:29:03 UTC (rev 265440)
+++ trunk/LayoutTests/editing/selection/ios/select-all-non-editable-text-using-keyboard-expected.txt	2020-08-10 19:29:28 UTC (rev 265441)
@@ -1,3 +1,5 @@
+CONSOLE MESSAGE: Triggering 'select all' via key command.
+CONSOLE MESSAGE: Done waiting for selectionchange.
 Tests pressing Command + a to select all non-editable text.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

Modified: trunk/LayoutTests/editing/selection/ios/select-all-non-editable-text-using-keyboard.html (265440 => 265441)


--- trunk/LayoutTests/editing/selection/ios/select-all-non-editable-text-using-keyboard.html	2020-08-10 19:29:03 UTC (rev 265440)
+++ trunk/LayoutTests/editing/selection/ios/select-all-non-editable-text-using-keyboard.html	2020-08-10 19:29:28 UTC (rev 265441)
@@ -29,7 +29,9 @@
 {
     toggleOnlyShowTestContainer();
 
+    console.log("Triggering 'select all' via key command.");
     await UIHelper.callFunctionAndWaitForEvent(() => window.testRunner && UIHelper.keyDown("a", ["metaKey"]) , document, "selectionchange");
+    console.log("Done waiting for selectionchange.");
     shouldBeEqualToString("window.getSelection().toString()", "Here's to the crazy ones.\n\nThe misfits.\n\nThe rebels.");
 
     toggleOnlyShowTestContainer();

Modified: trunk/Source/WebKit/ChangeLog (265440 => 265441)


--- trunk/Source/WebKit/ChangeLog	2020-08-10 19:29:03 UTC (rev 265440)
+++ trunk/Source/WebKit/ChangeLog	2020-08-10 19:29:28 UTC (rev 265441)
@@ -1,3 +1,18 @@
+2020-08-10  Wenson Hsieh  <[email protected]>
+
+        Add more logging to diagnose editing/selection/ios/select-all-non-editable-text-using-keyboard.html
+        https://bugs.webkit.org/show_bug.cgi?id=215089
+        <rdar://problem/66282806>
+
+        Reviewed by Tim Horton.
+
+        Remove some unnecessary declarations that were only used for debug logging in WebKitTestRunner, and add some
+        more logging to check whether the web view is even getting a call to select all from UIKit.
+
+        * Platform/spi/ios/UIKitSPI.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView selectAllForWebView:]):
+
 2020-08-10  Sihui Liu  <[email protected]>
 
         Always suspend IDB work when network process is prepared to suspend

Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (265440 => 265441)


--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2020-08-10 19:29:03 UTC (rev 265440)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2020-08-10 19:29:28 UTC (rev 265441)
@@ -195,7 +195,6 @@
 - (void)_enqueueHIDEvent:(IOHIDEventRef)event;
 - (void)_handleHIDEvent:(IOHIDEventRef)event;
 - (void)handleKeyUIEvent:(UIEvent *)event;
-- (void)handleKeyHIDEvent:(IOHIDEventRef)event;
 - (BOOL)_appAdoptsUISceneLifecycle;
 @end
 
@@ -1241,10 +1240,6 @@
 - (void)didEndScrollingOrZooming;
 @end
 
-@interface UIApplication (IPI)
-- (GSKeyboardRef)_hardwareKeyboard:(BOOL)createIfNeeded;
-@end
-
 @interface UITextInteraction (IPI)
 @property (nonatomic, readonly) BOOL inGesture;
 @end

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (265440 => 265441)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-08-10 19:29:03 UTC (rev 265440)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-08-10 19:29:28 UTC (rev 265441)
@@ -3581,6 +3581,7 @@
 
 - (void)selectAllForWebView:(id)sender
 {
+    WTFLogAlways("%s", __PRETTY_FUNCTION__);
     [_textInteractionAssistant selectAll:sender];
     _page->selectAll();
 }

Modified: trunk/Tools/ChangeLog (265440 => 265441)


--- trunk/Tools/ChangeLog	2020-08-10 19:29:03 UTC (rev 265440)
+++ trunk/Tools/ChangeLog	2020-08-10 19:29:28 UTC (rev 265441)
@@ -1,3 +1,16 @@
+2020-08-10  Wenson Hsieh  <[email protected]>
+
+        Add more logging to diagnose editing/selection/ios/select-all-non-editable-text-using-keyboard.html
+        https://bugs.webkit.org/show_bug.cgi?id=215089
+        <rdar://problem/66282806>
+
+        Reviewed by Tim Horton.
+
+        * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
+        (WTR::UIScriptControllerIOS::keyDown):
+        * WebKitTestRunner/ios/mainIOS.mm:
+        (-[WebKitTestRunnerApp handleKeyHIDEvent:]): Deleted.
+
 2020-08-10  Brian Burg  <[email protected]>
 
         Unreviewed, fix ordering of contributors.

Modified: trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm (265440 => 265441)


--- trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm	2020-08-10 19:29:03 UTC (rev 265440)
+++ trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm	2020-08-10 19:29:28 UTC (rev 265441)
@@ -554,7 +554,6 @@
     String inputString = toWTFString(toWK(character));
     auto modifierFlags = parseModifierArray(m_context->jsContext(), modifierArray);
 
-    WTFLogAlways("Synthesizing key events (first responder: %@; is key window? %d)", webView().firstResponder.class, webView().window.keyWindow);
     for (auto& modifierFlag : modifierFlags) {
         WTFLogAlways("Sending modifier keydown: %s", modifierFlag.utf8().data());
         [[HIDEventGenerator sharedHIDEventGenerator] keyDown:modifierFlag];
@@ -562,13 +561,11 @@
 
     WTFLogAlways("Sending keydown for input string '%s'", inputString.utf8().data());
     [[HIDEventGenerator sharedHIDEventGenerator] keyDown:inputString];
-    WTFLogAlways("Sending keyup for input string '%s'", inputString.utf8().data());
     [[HIDEventGenerator sharedHIDEventGenerator] keyUp:inputString];
 
     for (size_t i = modifierFlags.size(); i; ) {
         --i;
         [[HIDEventGenerator sharedHIDEventGenerator] keyUp:modifierFlags[i]];
-        WTFLogAlways("Sending modifier keyup: %s", modifierFlags[i].utf8().data());
     }
 
     [[HIDEventGenerator sharedHIDEventGenerator] sendMarkerHIDEventWithCompletionBlock:^{ /* Do nothing */ }];

Modified: trunk/Tools/WebKitTestRunner/ios/mainIOS.mm (265440 => 265441)


--- trunk/Tools/WebKitTestRunner/ios/mainIOS.mm	2020-08-10 19:29:03 UTC (rev 265440)
+++ trunk/Tools/WebKitTestRunner/ios/mainIOS.mm	2020-08-10 19:29:28 UTC (rev 265441)
@@ -28,7 +28,6 @@
 #import "HIDEventGenerator.h"
 #import "TestController.h"
 #import "UIKitSPI.h"
-#import <pal/spi/ios/GraphicsServicesSPI.h>
 
 static int _argc;
 static const char **_argv;
@@ -62,19 +61,6 @@
     [[HIDEventGenerator sharedHIDEventGenerator] markerEventReceived:event];
 }
 
-- (void)handleKeyHIDEvent:(IOHIDEventRef)event
-{
-    {
-        auto keyboard = [self _hardwareKeyboard:NO];
-        WTFLogAlways("(Before)  keyboard %p has modifier state: 0x%02x", keyboard, GSKeyboardGetModifierState(keyboard));
-    }
-    [super handleKeyHIDEvent:event];
-    {
-        auto keyboard = [self _hardwareKeyboard:NO];
-        WTFLogAlways("(After)   keyboard %p has modifier state: 0x%02x", keyboard, GSKeyboardGetModifierState(keyboard));
-    }
-}
-
 @end
 
 int main(int argc, const char* argv[])
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to