Bug 189974

Summary: [iOS] Special keys are misidentified in DOM keyboard events
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebCore Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, ews-watchlist, megan_gardner, rniwa, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar, PlatformOnly, WebExposed
Version: WebKit Nightly Build   
Hardware: iPhone / iPad   
OS: iOS 11   
Bug Depends on:    
Bug Blocks: 190571    
Attachments:
Description Flags
Patch and layout tests
none
Patch and layout tests
none
Patch and layout tests
none
Patch and layout tests
ews-watchlist: commit-queue-
Archive of layout-test-results from ews105 for mac-sierra-wk2
none
Archive of layout-test-results from ews123 for ios-simulator-wk2
none
Patch and layout tests none

Description Daniel Bates 2018-09-25 14:06:10 PDT
1. Visit <https://unixpapa.com/js/testkey.html> on iPad with a hardware keyboard attached.
2. Check the DOM 3 checkbox.
3. Press a special key, say F5, F6, Left Control, Left Option, Left Command, Left Shift, Caps Lock, Right Command, Right Option, Right Shift, Left Arrow, Up Arrow, Down Arrow, Right Arrow or Escape key (*).

We either misidentify these keys as "Dead" or the name of UIKit-specific constant (e.g. UIKeyInputDownArrow). We should correctly identify a pressed key.

(*) These are the special keys on the Magic Keyboard that are not system global (i.e. do not map to volume up, et cetera). Some keyboard may have additional special keys, including Page Up, Page Down, Num Lock/Clear, Home, End, and Forward Delete.
Comment 1 Daniel Bates 2018-09-25 14:07:19 PDT
*** Bug 189436 has been marked as a duplicate of this bug. ***
Comment 2 Daniel Bates 2018-09-25 15:38:01 PDT
Created attachment 350803 [details]
Patch and layout tests
Comment 3 Daniel Bates 2018-09-25 15:39:18 PDT
Created attachment 350804 [details]
Patch and layout tests
Comment 4 EWS Watchlist 2018-09-25 15:41:45 PDT Comment hidden (obsolete)
Comment 5 Daniel Bates 2018-09-25 16:47:52 PDT
Created attachment 350811 [details]
Patch and layout tests
Comment 6 EWS Watchlist 2018-09-25 16:52:11 PDT
Attachment 350811 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/ios/WebEvent.mm:147:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 22 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Daniel Bates 2018-09-25 16:52:53 PDT
Created attachment 350812 [details]
Patch and layout tests
Comment 8 EWS Watchlist 2018-09-25 16:55:30 PDT
Attachment 350812 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/ios/WebEvent.mm:147:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 EWS Watchlist 2018-09-25 17:48:35 PDT
Comment on attachment 350812 [details]
Patch and layout tests

Attachment 350812 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/9350290

New failing tests:
css3/viewport-percentage-lengths/vh-resize.html
Comment 10 EWS Watchlist 2018-09-25 17:48:37 PDT
Created attachment 350819 [details]
Archive of layout-test-results from ews105 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 11 EWS Watchlist 2018-09-25 18:51:05 PDT
Comment on attachment 350812 [details]
Patch and layout tests

Attachment 350812 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/9350520

New failing tests:
fast/frames/lots-of-objects.html
fast/frames/lots-of-iframes.html
webarchive/adopt-attribute-styled-body-webarchive.html
Comment 12 EWS Watchlist 2018-09-25 18:51:08 PDT
Created attachment 350829 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 13 Daniel Bates 2018-09-26 16:30:26 PDT
(In reply to Build Bot from comment #9)
> Comment on attachment 350812 [details]
> Patch and layout tests
> 
> Attachment 350812 [details] did not pass mac-wk2-ews (mac-wk2):
> Output: https://webkit-queues.webkit.org/results/9350290
> 
> New failing tests:
> css3/viewport-percentage-lengths/vh-resize.html

This failure is unrelated to this patch.
Comment 14 Daniel Bates 2018-09-26 16:30:40 PDT
(In reply to Build Bot from comment #11)
> Comment on attachment 350812 [details]
> Patch and layout tests
> 
> Attachment 350812 [details] did not pass ios-sim-ews (ios-simulator-wk2):
> Output: https://webkit-queues.webkit.org/results/9350520
> 
> New failing tests:
> fast/frames/lots-of-objects.html
> fast/frames/lots-of-iframes.html
> webarchive/adopt-attribute-styled-body-webarchive.html

These failures are unrelated to this patch.
Comment 15 Daniel Bates 2018-09-28 09:49:16 PDT
Created attachment 351087 [details]
Patch and layout tests

No change. Uploading the patch again to have the iOS EWS bots process it.
Comment 16 EWS Watchlist 2018-09-28 09:50:41 PDT
Attachment 351087 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/ios/WebEvent.mm:147:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 17 Daniel Bates 2018-10-01 11:35:41 PDT
Comment on attachment 351087 [details]
Patch and layout tests

Clearing flags on attachment: 351087

Committed r236678: <https://trac.webkit.org/changeset/236678>
Comment 18 Daniel Bates 2018-10-01 11:35:43 PDT
All reviewed patches have been landed.  Closing bug.
Comment 19 Radar WebKit Bug Importer 2018-10-01 11:36:37 PDT
<rdar://problem/44915471>
Comment 20 Daniel Bates 2018-10-01 15:48:36 PDT
Committed attempt to fix the watchOS build in <https://trac.webkit.org/changeset/236694>. (Note that PLATFORM(IOS) := TARGET_OS_IPHONE  and TARGET_OS_IPHONE is set when building for watchOS).