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

Unified Diff: Source/platform/PlatformKeyboardEvent.h

Issue 1311233004: Cleanup IsKeyPad and IsAutoRepeat in PlatformKeyboardEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/platform/PlatformEvent.h ('k') | Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/PlatformKeyboardEvent.h
diff --git a/Source/platform/PlatformKeyboardEvent.h b/Source/platform/PlatformKeyboardEvent.h
index 2190b6fbd4ce4433e5ad168adf9f5516b90451e4..ec4b61eafe1b372e1f3b2f365646213b6b509e9b 100644
--- a/Source/platform/PlatformKeyboardEvent.h
+++ b/Source/platform/PlatformKeyboardEvent.h
@@ -40,13 +40,11 @@ public:
: PlatformEvent(PlatformEvent::KeyDown)
, m_windowsVirtualKeyCode(0)
, m_nativeVirtualKeyCode(0)
- , m_autoRepeat(false)
- , m_isKeypad(false)
, m_isSystemKey(false)
{
}
- PlatformKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& keyIdentifier, const String& code, const String& key, 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, const String& code, const String& key, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isSystemKey, Modifiers modifiers, double timestamp)
: PlatformEvent(type, modifiers, timestamp)
, m_text(text)
, m_unmodifiedText(unmodifiedText)
@@ -55,8 +53,6 @@ public:
, m_key(key)
, m_windowsVirtualKeyCode(windowsVirtualKeyCode)
, m_nativeVirtualKeyCode(nativeVirtualKeyCode)
- , m_autoRepeat(isAutoRepeat)
- , m_isKeypad(isKeypad)
, m_isSystemKey(isSystemKey)
{
}
@@ -87,8 +83,8 @@ public:
int nativeVirtualKeyCode() const { return m_nativeVirtualKeyCode; }
- bool isAutoRepeat() const { return m_autoRepeat; }
- bool isKeypad() const { return m_isKeypad; }
+ bool isAutoRepeat() const { return modifiers() & IsAutoRepeat; }
+ bool isKeypad() const { return modifiers() & IsKeyPad; }
bool isSystemKey() const { return m_isSystemKey; }
PLATFORM_EXPORT static bool currentCapsLockState();
@@ -102,8 +98,6 @@ protected:
String m_key;
int m_windowsVirtualKeyCode;
int m_nativeVirtualKeyCode;
- bool m_autoRepeat;
- bool m_isKeypad;
bool m_isSystemKey;
private:
« no previous file with comments | « Source/platform/PlatformEvent.h ('k') | Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698