| Index: Source/core/events/KeyboardEvent.cpp
|
| diff --git a/Source/core/events/KeyboardEvent.cpp b/Source/core/events/KeyboardEvent.cpp
|
| index 99be09ca9633867bb562e44244bb19ae8691609f..754a43445aec93e67ac5128b496689b43a91c48e 100644
|
| --- a/Source/core/events/KeyboardEvent.cpp
|
| +++ b/Source/core/events/KeyboardEvent.cpp
|
| @@ -106,6 +106,7 @@ KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* vie
|
| true, true, view, 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey())
|
| , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key)))
|
| , m_keyIdentifier(key.keyIdentifier())
|
| + , m_code(key.code())
|
| , m_location(keyLocationCode(key))
|
| , m_isAutoRepeat(key.isAutoRepeat())
|
| {
|
| @@ -114,16 +115,17 @@ KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* vie
|
| KeyboardEvent::KeyboardEvent(const AtomicString& eventType, const KeyboardEventInit& initializer)
|
| : UIEventWithKeyState(eventType, initializer.bubbles, initializer.cancelable, initializer.view, initializer.detail, initializer.ctrlKey, initializer.altKey, initializer.shiftKey, initializer.metaKey)
|
| , m_keyIdentifier(initializer.keyIdentifier)
|
| + , m_code(initializer.code)
|
| , m_location(initializer.location)
|
| , m_isAutoRepeat(initializer.repeat)
|
| {
|
| }
|
|
|
| KeyboardEvent::KeyboardEvent(const AtomicString& eventType, bool canBubble, bool cancelable, AbstractView *view,
|
| - const String &keyIdentifier, unsigned location,
|
| - bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
|
| + const String &keyIdentifier, const String &code, unsigned location, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
|
| : UIEventWithKeyState(eventType, canBubble, cancelable, view, 0, ctrlKey, altKey, shiftKey, metaKey)
|
| , m_keyIdentifier(keyIdentifier)
|
| + , m_code(code)
|
| , m_location(location)
|
| , m_isAutoRepeat(false)
|
| {
|
| @@ -134,8 +136,7 @@ KeyboardEvent::~KeyboardEvent()
|
| }
|
|
|
| void KeyboardEvent::initKeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
|
| - const String &keyIdentifier, unsigned location,
|
| - bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
|
| + const String &keyIdentifier, const String &code, unsigned location, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
|
| {
|
| if (dispatched())
|
| return;
|
| @@ -143,6 +144,7 @@ void KeyboardEvent::initKeyboardEvent(const AtomicString& type, bool canBubble,
|
| initUIEvent(type, canBubble, cancelable, view, 0);
|
|
|
| m_keyIdentifier = keyIdentifier;
|
| + m_code = code;
|
| m_location = location;
|
| m_ctrlKey = ctrlKey;
|
| m_shiftKey = shiftKey;
|
|
|