Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Unified Diff: Source/core/events/KeyboardEvent.h

Issue 933323002: Add experimental Support for DOM3 KeyboardEvent key value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated global-interface-listing as test were failing due to addition of the key Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/events/KeyboardEvent.h
diff --git a/Source/core/events/KeyboardEvent.h b/Source/core/events/KeyboardEvent.h
index 66bb246f6a87dfa9f9b1214d1f1ffe2c04113831..bbe262322d4756d6b72b0c6b740063ecc9ffa7df 100644
--- a/Source/core/events/KeyboardEvent.h
+++ b/Source/core/events/KeyboardEvent.h
@@ -57,10 +57,10 @@ public:
static PassRefPtrWillBeRawPtr<KeyboardEvent> create(ScriptState*, const AtomicString& type, const KeyboardEventInit&);
static PassRefPtrWillBeRawPtr<KeyboardEvent> create(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
- const String& keyIdentifier, const String& code, unsigned location,
+ const String& keyIdentifier, const String& code, const String& key, unsigned location,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
{
- return adoptRefWillBeNoop(new KeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, code, location,
+ return adoptRefWillBeNoop(new KeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, code, key, location,
ctrlKey, altKey, shiftKey, metaKey));
}
@@ -72,6 +72,7 @@ public:
const String& keyIdentifier() const { return m_keyIdentifier; }
const String& code() const { return m_code; }
+ const String& key() const { return m_key; }
unsigned location() const { return m_location; }
@@ -94,12 +95,13 @@ private:
KeyboardEvent(const PlatformKeyboardEvent&, AbstractView*);
KeyboardEvent(const AtomicString&, const KeyboardEventInit&);
KeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView*,
- const String& keyIdentifier, const String& code, unsigned location,
+ const String& keyIdentifier, const String& code, const String& key, unsigned location,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
OwnPtr<PlatformKeyboardEvent> m_keyEvent;
String m_keyIdentifier;
String m_code;
+ String m_key;
unsigned m_location;
bool m_isAutoRepeat : 1;
};

Powered by Google App Engine
This is Rietveld 408576698