WebKit Bugzilla
Attachment 373516 Details for
Bug 199393
: Command + . generates Escape with key identifier Period, should be Escape
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199393-20190705110252.patch (text/plain), 5.46 KB, created by
Daniel Bates
on 2019-07-05 11:02:53 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2019-07-05 11:02:53 PDT
Size:
5.46 KB
patch
obsolete
>Subversion Revision: 247155 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1cd221fbfc05926b7418b7f68355eac123b63909..876eb445896f6d95b182e6a82d61a6b77e0357a4 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-07-05 Daniel Bates <dabates@apple.com> >+ >+ Command + . generates Escape with key identifier Period, should be Escape >+ https://bugs.webkit.org/show_bug.cgi?id=199393 >+ <rdar://problem/52498001> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remap the key code for Command + . before we compute the Windows virtual key code. >+ Otherwise, the Windows virtual key code reveals the pre-mapped key code. >+ >+ * platform/ios/WebEvent.mm: >+ (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:withInputManagerHint:keyCode:isTabKey:]): >+ > 2019-07-05 Zalan Bujtas <zalan@apple.com> > > [LFC][IFC] Inline runs should be relative to the line's top/left initially >diff --git a/Source/WebCore/platform/ios/WebEvent.mm b/Source/WebCore/platform/ios/WebEvent.mm >index 137cc447495cb0b4d287c5f465bdb310d87a516d..f843c54a46a2f2cf479f386cb84acdcd5b51ff68 100644 >--- a/Source/WebCore/platform/ios/WebEvent.mm >+++ b/Source/WebCore/platform/ios/WebEvent.mm >@@ -185,6 +185,17 @@ - (WebEvent *)initWithKeyEventType:(WebEventType)type > _modifierFlags = modifiers; > _keyboardFlags = flags; > _inputManagerHint = [hint retain]; >+ >+ BOOL flagsChanged = _keyboardFlags & WebEventKeyboardInputModifierFlagsChanged; >+ if (!flagsChanged) { >+ // Map Command + . to Escape since Apple Smart Keyboards lack an Escape key. >+ // FIXME: This doesn't work for some keyboard layouts, like French. See <rdar://problem/51047011>. >+ if ([charactersIgnoringModifiers isEqualToString:@"."] && (modifiers & WebEventFlagMaskCommandKey)) { >+ keyCode = kHIDUsage_KeyboardEscape; >+ _modifierFlags &= ~WebEventFlagMaskCommandKey; >+ } >+ } >+ > if (keyCode) > _keyCode = windowsKeyCodeForKeyCode(keyCode); > else if ([charactersIgnoringModifiers length] == 1) { >@@ -192,12 +203,7 @@ - (WebEvent *)initWithKeyEventType:(WebEventType)type > _keyCode = windowsKeyCodeForCharCodeIOS([charactersIgnoringModifiers characterAtIndex:0]); > } > >- if (!(_keyboardFlags & WebEventKeyboardInputModifierFlagsChanged)) { >- // Map Command + . to Escape since Apple Smart Keyboards lack an Escape key. >- if ([charactersIgnoringModifiers isEqualToString:@"."] && (modifiers & WebEventFlagMaskCommandKey)) { >- keyCode = kHIDUsage_KeyboardEscape; >- _modifierFlags &= ~WebEventFlagMaskCommandKey; >- } >+ if (!flagsChanged) { > _characters = [normalizedStringWithAppKitCompatibilityMapping(characters, keyCode) retain]; > _charactersIgnoringModifiers = [normalizedStringWithAppKitCompatibilityMapping(charactersIgnoringModifiers, keyCode) retain]; > _tabKey = tabKey; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index d25a8fd07f6e6fb2bb0f86a6fd70f583d37b6e62..4e8971ab2018d04d1f51535501daa07c1a9aac9c 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2019-07-05 Daniel Bates <dabates@apple.com> >+ >+ Command + . generates Escape with key identifier Period, should be Escape >+ https://bugs.webkit.org/show_bug.cgi?id=199393 >+ <rdar://problem/52498001> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Update test result. >+ >+ * fast/events/ios/key-events-comprehensive/key-events-meta-expected.txt: >+ > 2019-07-02 Daniel Bates <dabates@apple.com> > > [iOS] Support select all in non-editable element >diff --git a/LayoutTests/fast/events/ios/key-events-comprehensive/key-events-meta-expected.txt b/LayoutTests/fast/events/ios/key-events-comprehensive/key-events-meta-expected.txt >index c75a772f4a33c729d173fecc58dc44ab5b633b3b..77bb522ed1b514d4d65ae611061a51491fb884a3 100644 >--- a/LayoutTests/fast/events/ios/key-events-comprehensive/key-events-meta-expected.txt >+++ b/LayoutTests/fast/events/ios/key-events-comprehensive/key-events-meta-expected.txt >@@ -140,8 +140,8 @@ type: keyup, key: Meta, code: MetaLeft, keyIdentifier: Meta, keyCode: 91, charCo > > Test Command + .: > type: keydown, key: Meta, code: MetaLeft, keyIdentifier: Meta, keyCode: 91, charCode: 0, keyCode: 91, which: 91, altKey: false, ctrlKey: false, metaKey: true, shiftKey: false, location: 1, keyLocation: 1 >-type: keydown, key: Escape, code: Period, keyIdentifier: U+001B, keyCode: 27, charCode: 0, keyCode: 27, which: 27, altKey: false, ctrlKey: false, metaKey: false, shiftKey: false, location: 0, keyLocation: 0 >-type: keypress, key: Escape, code: Period, keyIdentifier: , keyCode: 27, charCode: 27, keyCode: 27, which: 27, altKey: false, ctrlKey: false, metaKey: false, shiftKey: false, location: 0, keyLocation: 0 >+type: keydown, key: Escape, code: Escape, keyIdentifier: U+001B, keyCode: 27, charCode: 0, keyCode: 27, which: 27, altKey: false, ctrlKey: false, metaKey: false, shiftKey: false, location: 0, keyLocation: 0 >+type: keypress, key: Escape, code: Escape, keyIdentifier: , keyCode: 27, charCode: 27, keyCode: 27, which: 27, altKey: false, ctrlKey: false, metaKey: false, shiftKey: false, location: 0, keyLocation: 0 > type: keyup, key: Meta, code: MetaLeft, keyIdentifier: Meta, keyCode: 91, charCode: 0, keyCode: 91, which: 91, altKey: false, ctrlKey: false, metaKey: false, shiftKey: false, location: 1, keyLocation: 1 > > Test Command + /:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199393
:
373515
| 373516