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

Unified Diff: Source/web/WebInputEventConversion.cpp

Issue 663523002: Adding support for DOM3 KeyboardEvents Code in KeyboardEvents (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to use domCode instead of native domCode Created 6 years 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 05362ad51cead37f99e912c696d5e67a2e63c626..ef24d36d3931822a78739ae9708ae70e313c8287 100644
--- a/Source/web/WebInputEventConversion.cpp
+++ b/Source/web/WebInputEventConversion.cpp
@@ -313,6 +313,7 @@ PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder(const WebKeyboardEven
m_keyIdentifier = String(e.keyIdentifier);
m_autoRepeat = (e.modifiers & WebInputEvent::IsAutoRepeat);
m_nativeVirtualKeyCode = e.nativeKeyCode;
+ m_domCode = e.domCode;
Wez 2015/01/08 01:14:48 Is there any point in storing the numeric form of
Habib Virji 2015/01/12 15:34:17 The only reason I was saving this is, as I did not
m_isKeypad = (e.modifiers & WebInputEvent::IsKeyPad);
m_isSystemKey = e.isSystemKey;
@@ -359,6 +360,11 @@ void PlatformKeyboardEventBuilder::setKeyType(Type type)
}
}
+void PlatformKeyboardEventBuilder::setKeyboardEventDOMCodeValue(const char* code)
+{
+ m_code = String(code);
+}
Habib Virji 2015/01/12 15:34:17 This code is now removed.
+
// Please refer to bug http://b/issue?id=961192, which talks about Webkit
// keyboard event handling changes. It also mentions the list of keys
// which don't have associated character events.
@@ -672,6 +678,7 @@ WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event)
if (!event.keyEvent())
return;
nativeKeyCode = event.keyEvent()->nativeVirtualKeyCode();
+ domCode = event.keyEvent()->domCode();
Wez 2015/01/08 01:14:48 Similarly to above, can we arrange this translatio
Habib Virji 2015/01/12 15:34:17 New code has embedder API for this purpose.
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];
@@ -706,6 +713,7 @@ WebKeyboardEventBuilder::WebKeyboardEventBuilder(const PlatformKeyboardEvent& ev
modifiers |= WebInputEvent::IsKeyPad;
isSystemKey = event.isSystemKey();
nativeKeyCode = event.nativeVirtualKeyCode();
+ domCode = event.domCode();
windowsKeyCode = windowsKeyCodeWithoutLocation(event.windowsVirtualKeyCode());
modifiers |= locationModifiersFromWindowsKeyCode(event.windowsVirtualKeyCode());

Powered by Google App Engine
This is Rietveld 408576698