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

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: Added key=value pair for screencastview.js Created 5 years, 10 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 40af0e2a871ef16f8b7d37b861d5674af41d9e63..cb032e4eda846a408473e8150ad03fcdc738fcf5 100644
--- a/Source/core/events/KeyboardEvent.h
+++ b/Source/core/events/KeyboardEvent.h
@@ -59,10 +59,10 @@ public:
}
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));
}
@@ -74,6 +74,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; }
@@ -96,12 +97,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