| Summary: | [iOS] ASSERTION FAILED: !(_keyboardFlags & WebEventKeyboardInputModifierFlagsChanged) in -[WebEvent charactersIgnoringModifiers] when pressing modifier on PDF | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||||
| Component: | WebKit Misc. | Assignee: | Daniel Bates <dbates> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | darin, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar, PlatformOnly | ||||||
| Version: | WebKit Local Build | ||||||||
| Hardware: | iPhone / iPad | ||||||||
| OS: | iOS 13 | ||||||||
| Attachments: |
|
||||||||
|
Description
Daniel Bates
2020-05-05 14:38:50 PDT
Created attachment 398561 [details]
Patch
Tried to write a test, but it timesout:
[[
<!DOCTYPE html><!-- webkit-test-runner [ enableBackForwardCache=true ] -->
<html>
<head>
<script>
if (!window.testRunner)
document.write("Must run in WebKitTestRunner");
else {
testRunner.dumpAsText();
testRunner.queueLoad("resources/test.pdf");
testRunner.queueLoadingScript('testRunner.runUIScript(`uiController.keyDown("", ["leftCommand"])`, () => { testRunner.queueBackNavigation(1); })');
}
</script>
</head>
<body>PASS</body>
</html>
]]
(In reply to Daniel Bates from comment #2) > Tried to write a test, but it timesout: > > [[ > <!DOCTYPE html><!-- webkit-test-runner [ enableBackForwardCache=true ] --> > <html> > <head> > <script> > if (!window.testRunner) > document.write("Must run in WebKitTestRunner"); > else { > testRunner.dumpAsText(); > testRunner.queueLoad("resources/test.pdf"); > > testRunner.queueLoadingScript('testRunner.runUIScript(`uiController. > keyDown("", ["leftCommand"])`, () => { testRunner.queueBackNavigation(1); > })'); > } > </script> > </head> > <body>PASS</body> > </html> > ]] ^^^ Test triggers to assertion failure without the patch, but times out with the patch. (In reply to Daniel Bates from comment #3) > (In reply to Daniel Bates from comment #2) > > Tried to write a test, but it timesout: > > > > [[ > > <!DOCTYPE html><!-- webkit-test-runner [ enableBackForwardCache=true ] --> > > <html> > > <head> > > <script> > > if (!window.testRunner) > > document.write("Must run in WebKitTestRunner"); > > else { > > testRunner.dumpAsText(); > > testRunner.queueLoad("resources/test.pdf"); > > > > testRunner.queueLoadingScript('testRunner.runUIScript(`uiController. > > keyDown("", ["leftCommand"])`, () => { testRunner.queueBackNavigation(1); > > })'); > > } > > </script> > > </head> > > <body>PASS</body> > > </html> > > ]] > > ^^^ Test triggers to assertion failure without the patch, but times out with > the patch. My guess, timeout because testRunner.queueLoadingScript() just eval()s the string, but that string, registers a callback, which is never run. I need to wait until the UI process has processed the script though... Comment on attachment 398561 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=398561&action=review > Source/WebKit/ChangeLog:12 > + I tried to write a test for this using testRunner.queueLoad() and queueLoadingScript(), > + but I couldn't get it to not timeout. For some reason script execution doesn't seem to > + work after loading the PDF. Hope you haven’t given up entirely. Created attachment 398571 [details]
Patch and test
Now with a test.
Thanks for the review, Darin. Comment on attachment 398571 [details] Patch and test Clearing flags on attachment: 398571 Committed r261240: <https://trac.webkit.org/changeset/261240> All reviewed patches have been landed. Closing bug. |