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

Unified Diff: Source/core/dom/KeyboardEvent.cpp

Issue 20986003: Define DOM_KEY_LOCATION_* constants on KeyboardEvent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/core/dom/KeyboardEvent.cpp
diff --git a/Source/core/dom/KeyboardEvent.cpp b/Source/core/dom/KeyboardEvent.cpp
index 5354fc0b67c6bfbeb189f44ac80b953c27678f90..177c6fefb62c0456afb54eddf078c7b1f065bff5 100644
--- a/Source/core/dom/KeyboardEvent.cpp
+++ b/Source/core/dom/KeyboardEvent.cpp
@@ -68,21 +68,22 @@ static inline int windowsVirtualKeyCodeWithoutLocation(int keycode)
static inline KeyboardEvent::KeyLocationCode keyLocationCode(const PlatformKeyboardEvent& key)
{
if (key.isKeypad())
- return KeyboardEvent::DOMKeyLocationNumpad;
+ return KeyboardEvent::DOM_KEY_LOCATION_NUMPAD;
+ // FIXME: Support DOM_KEY_LOCATION_MOBILE & DOM_KEY_LOCATION_JOYSTICK.
Mike West 2013/07/29 12:40:24 Nit: Can you file a bug for this, and note it in t
do-not-use 2013/07/29 12:49:11 Will do.
switch (key.windowsVirtualKeyCode()) {
case VK_LCONTROL:
case VK_LSHIFT:
case VK_LMENU:
case VK_LWIN:
- return KeyboardEvent::DOMKeyLocationLeft;
+ return KeyboardEvent::DOM_KEY_LOCATION_LEFT;
case VK_RCONTROL:
case VK_RSHIFT:
case VK_RMENU:
case VK_RWIN:
- return KeyboardEvent::DOMKeyLocationRight;
+ return KeyboardEvent::DOM_KEY_LOCATION_RIGHT;
default:
- return KeyboardEvent::DOMKeyLocationStandard;
+ return KeyboardEvent::DOM_KEY_LOCATION_STANDARD;
}
}
@@ -96,7 +97,7 @@ KeyboardEventInit::KeyboardEventInit()
}
KeyboardEvent::KeyboardEvent()
- : m_keyLocation(DOMKeyLocationStandard)
+ : m_keyLocation(DOM_KEY_LOCATION_STANDARD)
, m_altGraphKey(false)
{
ScriptWrappable::init(this);

Powered by Google App Engine
This is Rietveld 408576698