Index: Source/core/events/KeyboardEvent.h |
diff --git a/Source/core/events/KeyboardEvent.h b/Source/core/events/KeyboardEvent.h |
index 31bd42f7fcd285fb092a61600df662a70a8e603b..13e10a66abb89b82e606a2f3dbd21ecffb885b83 100644 |
--- a/Source/core/events/KeyboardEvent.h |
+++ b/Source/core/events/KeyboardEvent.h |
@@ -36,6 +36,7 @@ struct KeyboardEventInit : public UIEventInit { |
KeyboardEventInit(); |
String keyIdentifier; |
+ String code; |
unsigned location; |
bool ctrlKey; |
bool altKey; |
@@ -70,20 +71,22 @@ public: |
} |
static PassRefPtrWillBeRawPtr<KeyboardEvent> create(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, |
- const String& keyIdentifier, unsigned location, |
+ const String& keyIdentifier, const String& code, unsigned location, |
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) |
{ |
- return adoptRefWillBeNoop(new KeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, location, |
+ return adoptRefWillBeNoop(new KeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, code, location, |
ctrlKey, altKey, shiftKey, metaKey)); |
} |
virtual ~KeyboardEvent(); |
void initKeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView*, |
- const String& keyIdentifier, unsigned location, |
+ const String& keyIdentifier, const String& code, unsigned location, |
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); |
const String& keyIdentifier() const { return m_keyIdentifier; } |
+ const String& code() { return m_code; }; |
+ |
unsigned location() const { return m_location; } |
bool getModifierState(const String& keyIdentifier) const; |
@@ -105,11 +108,12 @@ private: |
KeyboardEvent(const PlatformKeyboardEvent&, AbstractView*); |
KeyboardEvent(const AtomicString&, const KeyboardEventInit&); |
KeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView*, |
- const String& keyIdentifier, unsigned location, |
+ const String& keyIdentifier, const String& code, unsigned location, |
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); |
OwnPtr<PlatformKeyboardEvent> m_keyEvent; |
String m_keyIdentifier; |
+ String m_code; |
garykac
2014/12/02 16:29:32
While we need to expose the |code| string as part
Habib Virji
2014/12/02 16:39:05
The only reason for not passing int value was it w
|
unsigned m_location; |
bool m_isAutoRepeat : 1; |
}; |