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

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: Fix nits 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..fda41015cd599d3dace97c131f128f39fbcff6dc 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 (crbug.com/265446).
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