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

Unified Diff: Source/platform/PlatformKeyboardEvent.h

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/platform/PlatformKeyboardEvent.h
diff --git a/Source/platform/PlatformKeyboardEvent.h b/Source/platform/PlatformKeyboardEvent.h
index a67cc216c84893b9f4c62c5612f8b686a0ea1c10..b9cfdbe25290d675d7ed5174d65e2b8ddb6c2a6c 100644
--- a/Source/platform/PlatformKeyboardEvent.h
+++ b/Source/platform/PlatformKeyboardEvent.h
@@ -38,6 +38,7 @@ class PlatformKeyboardEvent : public PlatformEvent {
public:
PlatformKeyboardEvent()
: PlatformEvent(PlatformEvent::KeyDown)
+ , m_domCode(0)
, m_windowsVirtualKeyCode(0)
, m_nativeVirtualKeyCode(0)
, m_autoRepeat(false)
@@ -46,11 +47,12 @@ public:
{
}
- PlatformKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, Modifiers modifiers, double timestamp)
+ PlatformKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& keyIdentifier, long domCode, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, Modifiers modifiers, double timestamp)
: PlatformEvent(type, modifiers, timestamp)
, m_text(text)
, m_unmodifiedText(unmodifiedText)
, m_keyIdentifier(keyIdentifier)
+ , m_domCode(domCode)
, m_windowsVirtualKeyCode(windowsVirtualKeyCode)
, m_nativeVirtualKeyCode(nativeVirtualKeyCode)
, m_autoRepeat(isAutoRepeat)
@@ -76,6 +78,9 @@ public:
String keyIdentifier() const { return m_keyIdentifier; }
+ int domCode() const { return m_domCode; }
Wez 2015/01/08 01:14:47 Why do we need both domcode and code() here?
Habib Virji 2015/01/12 15:34:17 Yes, you are right. Value is already present in th
+ String code() const { return m_code; }
Wez 2015/01/08 01:14:47 Where does m_code get set?
Habib Virji 2015/01/12 15:34:17 It is getting set in WebViewImpl.cc.
+
// Most compatible Windows virtual key code associated with the event.
// Zero for Char events.
int windowsVirtualKeyCode() const { return m_windowsVirtualKeyCode; }
@@ -93,6 +98,8 @@ protected:
String m_text;
String m_unmodifiedText;
String m_keyIdentifier;
+ String m_code;
+ long m_domCode;
int m_windowsVirtualKeyCode;
int m_nativeVirtualKeyCode;
bool m_autoRepeat;

Powered by Google App Engine
This is Rietveld 408576698