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

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: Rebase on master 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
« no previous file with comments | « Source/core/dom/KeyboardEvent.h ('k') | Source/core/dom/KeyboardEvent.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/KeyboardEvent.cpp
diff --git a/Source/core/dom/KeyboardEvent.cpp b/Source/core/dom/KeyboardEvent.cpp
index ceaa28b7a07f5fe73808f4249b3b31da8ddaea08..4dc27d7fee5f805431dcefc36186a7e0427ed211 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_location(DOMKeyLocationStandard)
+ : m_location(DOM_KEY_LOCATION_STANDARD)
, m_altGraphKey(false)
{
ScriptWrappable::init(this);
« no previous file with comments | « Source/core/dom/KeyboardEvent.h ('k') | Source/core/dom/KeyboardEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698