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]; |