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

Unified Diff: Source/web/WebInputEventConversion.cpp

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/web/WebInputEventConversion.cpp
diff --git a/Source/web/WebInputEventConversion.cpp b/Source/web/WebInputEventConversion.cpp
index cbed77872613e974e82eb4645df0d704bb844fe6..21fe0bc7a6b7a22f3cb5786c03fd6191faea55e2 100644
--- a/Source/web/WebInputEventConversion.cpp
+++ b/Source/web/WebInputEventConversion.cpp
@@ -306,7 +306,9 @@ PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder(const WebKeyboardEven
m_nativeVirtualKeyCode = e.nativeKeyCode;
m_isKeypad = (e.modifiers & WebInputEvent::IsKeyPad);
m_isSystemKey = e.isSystemKey;
+ // TODO: BUG482880 Fix this initialization to lazy initialization.
Wez 2015/05/06 01:32:13 Do you mean "Fix |code| and |key| to be lazily-int
m_code = Platform::current()->domCodeStringFromEnum(e.domCode);
+ m_key = Platform::current()->domKeyStringFromEnum(e.domKey);
m_modifiers = toPlatformEventModifiers(e.modifiers);
@@ -627,6 +629,7 @@ WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event)
return;
nativeKeyCode = event.keyEvent()->nativeVirtualKeyCode();
domCode = Platform::current()->domEnumFromCodeString(event.keyEvent()->code());
+ domKey = Platform::current()->domKeyEnumFromString(event.keyEvent()->key());
unsigned numberOfCharacters = std::min(event.keyEvent()->text().length(), static_cast<unsigned>(textLengthCap));
for (unsigned i = 0; i < numberOfCharacters; ++i) {
text[i] = event.keyEvent()->text()[i];

Powered by Google App Engine
This is Rietveld 408576698