Title: [261240] trunk
Revision
261240
Author
[email protected]
Date
2020-05-06 11:32:48 -0700 (Wed, 06 May 2020)

Log Message

[iOS] ASSERTION FAILED: !(_keyboardFlags & WebEventKeyboardInputModifierFlagsChanged) in -[WebEvent charactersIgnoringModifiers] when pressing modifier on PDF
https://bugs.webkit.org/show_bug.cgi?id=211472

Reviewed by Darin Adler.

Source/WebKit:

Do not ask for event character string for a flags changed event: they don't have one.

Test: fast/events/ios/pdf-modifer-key-down-crash.html

* UIProcess/ios/WKKeyboardScrollingAnimator.mm:
(-[WKKeyboardScrollingAnimator keyboardScrollForEvent:]):

LayoutTests:

Add a test.

* fast/events/ios/pdf-modifer-key-down-crash-expected.txt: Added.
* fast/events/ios/pdf-modifer-key-down-crash.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (261239 => 261240)


--- trunk/LayoutTests/ChangeLog	2020-05-06 18:00:33 UTC (rev 261239)
+++ trunk/LayoutTests/ChangeLog	2020-05-06 18:32:48 UTC (rev 261240)
@@ -1,3 +1,15 @@
+2020-05-06  Daniel Bates  <[email protected]>
+
+        [iOS] ASSERTION FAILED: !(_keyboardFlags & WebEventKeyboardInputModifierFlagsChanged) in -[WebEvent charactersIgnoringModifiers] when pressing modifier on PDF
+        https://bugs.webkit.org/show_bug.cgi?id=211472
+
+        Reviewed by Darin Adler.
+
+        Add a test.
+
+        * fast/events/ios/pdf-modifer-key-down-crash-expected.txt: Added.
+        * fast/events/ios/pdf-modifer-key-down-crash.html: Added.
+
 2020-05-06  Antti Koivisto  <[email protected]>
 
         Add basic support for generating accurate wheel event listener region

Added: trunk/LayoutTests/fast/events/ios/pdf-modifer-key-down-crash-expected.txt (0 => 261240)


--- trunk/LayoutTests/fast/events/ios/pdf-modifer-key-down-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/events/ios/pdf-modifer-key-down-crash-expected.txt	2020-05-06 18:32:48 UTC (rev 261240)
@@ -0,0 +1 @@
+PASS did not crash.

Added: trunk/LayoutTests/fast/events/ios/pdf-modifer-key-down-crash.html (0 => 261240)


--- trunk/LayoutTests/fast/events/ios/pdf-modifer-key-down-crash.html	                        (rev 0)
+++ trunk/LayoutTests/fast/events/ios/pdf-modifer-key-down-crash.html	2020-05-06 18:32:48 UTC (rev 261240)
@@ -0,0 +1,15 @@
+<!DOCTYPE html><!-- webkit-test-runner [ enableBackForwardCache=true ] -->
+<html>
+<head>
+<script>
+if (!window.testRunner)
+    document.write("Must be run in WebKitTestRunner");
+else {
+    testRunner.dumpAsText();
+    testRunner.queueLoad("../..//images/resources/green_rectangle.pdf");
+    testRunner.queueLoadingScript('setTimeout("history.back()", 0); testRunner.runUIScript(`uiController.keyDown("", ["leftCommand"])`, () => {});');
+} 
+</script>
+</head>
+<body>PASS did not crash.</body>
+</html>

Modified: trunk/Source/WebKit/ChangeLog (261239 => 261240)


--- trunk/Source/WebKit/ChangeLog	2020-05-06 18:00:33 UTC (rev 261239)
+++ trunk/Source/WebKit/ChangeLog	2020-05-06 18:32:48 UTC (rev 261240)
@@ -1,3 +1,17 @@
+2020-05-06  Daniel Bates  <[email protected]>
+
+        [iOS] ASSERTION FAILED: !(_keyboardFlags & WebEventKeyboardInputModifierFlagsChanged) in -[WebEvent charactersIgnoringModifiers] when pressing modifier on PDF
+        https://bugs.webkit.org/show_bug.cgi?id=211472
+
+        Reviewed by Darin Adler.
+
+        Do not ask for event character string for a flags changed event: they don't have one.
+
+        Test: fast/events/ios/pdf-modifer-key-down-crash.html
+
+        * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
+        (-[WKKeyboardScrollingAnimator keyboardScrollForEvent:]):
+
 2020-05-06  Brent Fulgham  <[email protected]>
 
         [MacCatalyst] Processes should check for network entitlement as we do for macOS apps

Modified: trunk/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm (261239 => 261240)


--- trunk/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm	2020-05-06 18:00:33 UTC (rev 261239)
+++ trunk/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm	2020-05-06 18:32:48 UTC (rev 261240)
@@ -184,6 +184,9 @@
     if (![_scrollable isKeyboardScrollable])
         return WTF::nullopt;
 
+    if (event.keyboardFlags & WebEventKeyboardInputModifierFlagsChanged)
+        return WTF::nullopt;
+
     NSString *charactersIgnoringModifiers = event.charactersIgnoringModifiers;
     if (!charactersIgnoringModifiers.length)
         return WTF::nullopt;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to