[iOS] Implement support for KeyboardEvent.code
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jan 2017 18:34:20 +0000 (18:34 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jan 2017 18:34:20 +0000 (18:34 +0000)
commit6971b34826e8053a45ccc31580b470b3952eb988
tree0b64afce789f633d5ef84349a589204462262201
parent4dcec5b5acee387382620f5e30e33e4052e17949
[iOS] Implement support for KeyboardEvent.code
https://bugs.webkit.org/show_bug.cgi?id=166932
<rdar://problem/29972518>

Reviewed by Darin Adler.

Source/WebCore:

Implement support for KeyboardEvent.code on iOS.

No new tests, updated existing test.

* platform/ios/PlatformEventFactoryIOS.h:
* platform/ios/PlatformEventFactoryIOS.mm:
(WebCore::codeForKeyEvent):
(WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):

Source/WebKit2:

Make sure KeyboardEvent.code is properly initialized on
iOS WK2.

* Shared/WebEvent.h:
* Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::WebKeyboardEvent):
* Shared/ios/WebIOSEventFactory.mm:
(WebIOSEventFactory::createWebKeyboardEvent):

Source/WTF:

Enable KEYBOARD_CODE_ATTRIBUTE feature on iOS.

* wtf/FeatureDefines.h:

LayoutTests:

Extend layout test coverage and rebaseline a couple of existing tests
now that more checks are passing.

* fast/events/ios/keyboard-event-key-attribute-expected.txt:
* fast/events/ios/keyboard-event-key-attribute.html:
* platform/ios-simulator/fast/events/constructors/keyboard-event-constructor-expected.txt:
* platform/ios-simulator/imported/w3c/web-platform-tests/dom/events/Event-subclasses-constructors-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/ios/keyboard-event-key-attribute-expected.txt
LayoutTests/fast/events/ios/keyboard-event-key-attribute.html
LayoutTests/platform/ios-simulator/fast/events/constructors/keyboard-event-constructor-expected.txt
LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/dom/events/Event-subclasses-constructors-expected.txt
Source/WTF/ChangeLog
Source/WTF/wtf/FeatureDefines.h
Source/WebCore/ChangeLog
Source/WebCore/platform/ios/PlatformEventFactoryIOS.h
Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebEvent.h
Source/WebKit2/Shared/WebKeyboardEvent.cpp
Source/WebKit2/Shared/ios/WebIOSEventFactory.mm