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

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: Access DOM Code value using embedder API Created 6 years, 2 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 8aa3c3d96ded7a1194156c7b87ae30c0ec57313e..41efa5e0b42349d82ed95770328d65826cea7779 100644
--- a/Source/web/WebInputEventConversion.cpp
+++ b/Source/web/WebInputEventConversion.cpp
@@ -354,6 +354,11 @@ void PlatformKeyboardEventBuilder::setKeyType(Type type)
}
}
+void PlatformKeyboardEventBuilder::setDOMCode(const char* code)
Wez 2014/12/02 04:23:30 Could we add the code member to WebKeyboardEvent a
Habib Virji 2014/12/02 11:52:20 I was trying to avoid, as that will increase the s
+{
+ m_code = String(code);
+}
+
// 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.
@@ -682,6 +687,7 @@ WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event)
if (!event.keyEvent())
return;
nativeKeyCode = event.keyEvent()->nativeVirtualKeyCode();
+
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