Bug 939006 part.3 Sort out key names in Navigation Keys section r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Wed, 04 Jun 2014 21:43:42 +0900
changeset 205826 7c2fbf1e5cdff6ca3efd638e750f588176c38fa3
parent 205825 ce6205f6d94a854d37a6ac95be75945cc64a7f09
child 205827 4d69c4b463a910790797e73f00dfce3a204d3861
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs939006
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 939006 part.3 Sort out key names in Navigation Keys section r=smaug
dom/events/KeyNameList.h
widget/shared/NativeKeyToDOMKeyName.h
--- a/dom/events/KeyNameList.h
+++ b/dom/events/KeyNameList.h
@@ -51,16 +51,28 @@ DEFINE_KEYNAME_WITH_SAME_NAME(Shift)
 
 /******************************************************************************
  * Whitespace Keys
  *****************************************************************************/
 DEFINE_KEYNAME_WITH_SAME_NAME(Enter)
 // DEFINE_KEYNAME_WITH_SAME_NAME(Separator)
 DEFINE_KEYNAME_WITH_SAME_NAME(Tab)
 
+/******************************************************************************
+ * Navigation Keys
+ *****************************************************************************/
+DEFINE_KEYNAME_WITH_SAME_NAME(Down) // Rename to ArrowDown
+DEFINE_KEYNAME_WITH_SAME_NAME(Left) // Rename to ArrowLeft
+DEFINE_KEYNAME_WITH_SAME_NAME(Right) // Rename to ArrowRight
+DEFINE_KEYNAME_WITH_SAME_NAME(Up) // Rename to ArrowUp
+DEFINE_KEYNAME_WITH_SAME_NAME(End)
+DEFINE_KEYNAME_WITH_SAME_NAME(Home)
+DEFINE_KEYNAME_WITH_SAME_NAME(PageDown)
+DEFINE_KEYNAME_WITH_SAME_NAME(PageUp)
+
 DEFINE_KEYNAME_WITH_SAME_NAME(Attn)
 DEFINE_KEYNAME_WITH_SAME_NAME(Apps)
 DEFINE_KEYNAME_WITH_SAME_NAME(Crsel)
 DEFINE_KEYNAME_WITH_SAME_NAME(Exsel)
 DEFINE_KEYNAME_WITH_SAME_NAME(F1)
 DEFINE_KEYNAME_WITH_SAME_NAME(F2)
 DEFINE_KEYNAME_WITH_SAME_NAME(F3)
 DEFINE_KEYNAME_WITH_SAME_NAME(F4)
@@ -141,28 +153,20 @@ DEFINE_KEYNAME_WITH_SAME_NAME(Power)
 DEFINE_KEYNAME_WITH_SAME_NAME(PrintScreen)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserFavorites)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserHome)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserRefresh)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserSearch)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserStop)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserBack)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserForward)
-DEFINE_KEYNAME_WITH_SAME_NAME(Left)
-DEFINE_KEYNAME_WITH_SAME_NAME(PageDown)
-DEFINE_KEYNAME_WITH_SAME_NAME(PageUp)
-DEFINE_KEYNAME_WITH_SAME_NAME(Right)
-DEFINE_KEYNAME_WITH_SAME_NAME(Up)
 DEFINE_KEYNAME_WITH_SAME_NAME(UpLeft)
 DEFINE_KEYNAME_WITH_SAME_NAME(UpRight)
-DEFINE_KEYNAME_WITH_SAME_NAME(Down)
 DEFINE_KEYNAME_WITH_SAME_NAME(DownLeft)
 DEFINE_KEYNAME_WITH_SAME_NAME(DownRight)
-DEFINE_KEYNAME_WITH_SAME_NAME(Home)
-DEFINE_KEYNAME_WITH_SAME_NAME(End)
 DEFINE_KEYNAME_WITH_SAME_NAME(Select)
 DEFINE_KEYNAME_WITH_SAME_NAME(Backspace)
 DEFINE_KEYNAME_WITH_SAME_NAME(Clear)
 DEFINE_KEYNAME_WITH_SAME_NAME(Copy)
 DEFINE_KEYNAME_WITH_SAME_NAME(Cut)
 DEFINE_KEYNAME_WITH_SAME_NAME(Del)
 DEFINE_KEYNAME_WITH_SAME_NAME(EraseEof)
 DEFINE_KEYNAME_WITH_SAME_NAME(Insert)
--- a/widget/shared/NativeKeyToDOMKeyName.h
+++ b/widget/shared/NativeKeyToDOMKeyName.h
@@ -190,16 +190,83 @@ KEY_MAP_ANDROID (Enter, AKEYCODE_NUMPAD_
 // Tab
 KEY_MAP_WIN     (Tab, VK_TAB)
 KEY_MAP_COCOA   (Tab, kVK_Tab)
 KEY_MAP_GTK     (Tab, GDK_Tab)
 KEY_MAP_GTK     (Tab, GDK_KP_Tab)
 KEY_MAP_QT      (Tab, Qt::Key_Tab)
 KEY_MAP_ANDROID (Tab, AKEYCODE_TAB)
 
+/******************************************************************************
+ * Navigation Keys
+ ******************************************************************************/
+// Down
+KEY_MAP_WIN     (Down, VK_DOWN)
+KEY_MAP_COCOA   (Down, kVK_DownArrow)
+KEY_MAP_GTK     (Down, GDK_Down)
+KEY_MAP_GTK     (Down, GDK_KP_Down)
+KEY_MAP_QT      (Down, Qt::Key_Down)
+KEY_MAP_ANDROID (Down, AKEYCODE_DPAD_DOWN)
+
+// Left
+KEY_MAP_WIN     (Left, VK_LEFT)
+KEY_MAP_COCOA   (Left, kVK_LeftArrow)
+KEY_MAP_GTK     (Left, GDK_Left)
+KEY_MAP_GTK     (Left, GDK_KP_Left)
+KEY_MAP_QT      (Left, Qt::Key_Left)
+KEY_MAP_ANDROID (Left, AKEYCODE_DPAD_LEFT)
+
+// Right
+KEY_MAP_WIN     (Right, VK_RIGHT)
+KEY_MAP_COCOA   (Right, kVK_RightArrow)
+KEY_MAP_GTK     (Right, GDK_Right)
+KEY_MAP_GTK     (Right, GDK_KP_Right)
+KEY_MAP_QT      (Right, Qt::Key_Right)
+KEY_MAP_ANDROID (Right, AKEYCODE_DPAD_RIGHT)
+
+// Up
+KEY_MAP_WIN     (Up, VK_UP)
+KEY_MAP_COCOA   (Up, kVK_UpArrow)
+KEY_MAP_GTK     (Up, GDK_Up)
+KEY_MAP_GTK     (Up, GDK_KP_Up)
+KEY_MAP_QT      (Up, Qt::Key_Up)
+KEY_MAP_ANDROID (Up, AKEYCODE_DPAD_UP)
+
+// End
+KEY_MAP_WIN     (End, VK_END)
+KEY_MAP_COCOA   (End, kVK_End)
+KEY_MAP_GTK     (End, GDK_End)
+KEY_MAP_GTK     (End, GDK_KP_End)
+KEY_MAP_QT      (End, Qt::Key_End)
+KEY_MAP_ANDROID (End, AKEYCODE_MOVE_END)
+
+// Home
+KEY_MAP_WIN     (Home, VK_HOME)
+KEY_MAP_COCOA   (Home, kVK_Home)
+KEY_MAP_GTK     (Home, GDK_Home)
+KEY_MAP_GTK     (Home, GDK_KP_Home)
+KEY_MAP_QT      (Home, Qt::Key_Home)
+KEY_MAP_ANDROID (Home, AKEYCODE_MOVE_HOME)
+
+// PageDown
+KEY_MAP_WIN     (PageDown, VK_NEXT)
+KEY_MAP_COCOA   (PageDown, kVK_PageDown)
+KEY_MAP_GTK     (PageDown, GDK_Page_Down /* same as GDK_Next */)
+KEY_MAP_GTK     (PageDown, GDK_KP_Page_Down /* same as GDK_KP_Next */)
+KEY_MAP_QT      (PageDown, Qt::Key_PageDown)
+KEY_MAP_ANDROID (PageDown, AKEYCODE_PAGE_DOWN)
+
+// PageUp
+KEY_MAP_WIN     (PageUp, VK_PRIOR)
+KEY_MAP_COCOA   (PageUp, kVK_PageUp)
+KEY_MAP_GTK     (PageUp, GDK_Page_Up /* same as GDK_Prior */)
+KEY_MAP_GTK     (PageUp, GDK_KP_Page_Up /* same as GDK_KP_Prior */)
+KEY_MAP_QT      (PageUp, Qt::Key_PageUp)
+KEY_MAP_ANDROID (PageUp, AKEYCODE_PAGE_UP)
+
 
 // Attn
 KEY_MAP_WIN_OTH (Attn, VK_ATTN) // not valid with Japanese keyboard layout
 KEY_MAP_GTK     (Attn, GDK_3270_Attn) // legacy IBM keyboard layout
 
 // Apps
 KEY_MAP_ANDROID (Apps, AKEYCODE_APP_SWITCH)
 
@@ -630,88 +697,24 @@ KEY_MAP_QT      (BrowserBack, Qt::Key_Ba
 KEY_MAP_ANDROID (BrowserBack, AKEYCODE_BACK)
 
 // BrowserForward
 KEY_MAP_WIN     (BrowserForward, VK_BROWSER_FORWARD)
 KEY_MAP_GTK     (BrowserForward, GDK_Forward)
 KEY_MAP_QT      (BrowserForward, Qt::Key_Forward)
 KEY_MAP_ANDROID (BrowserForward, AKEYCODE_FORWARD)
 
-// Left
-KEY_MAP_WIN     (Left, VK_LEFT)
-KEY_MAP_COCOA   (Left, kVK_LeftArrow)
-KEY_MAP_GTK     (Left, GDK_Left)
-KEY_MAP_GTK     (Left, GDK_KP_Left)
-KEY_MAP_QT      (Left, Qt::Key_Left)
-KEY_MAP_ANDROID (Left, AKEYCODE_DPAD_LEFT)
-
-// PageDown
-KEY_MAP_WIN     (PageDown, VK_NEXT)
-KEY_MAP_COCOA   (PageDown, kVK_PageDown)
-KEY_MAP_GTK     (PageDown, GDK_Page_Down /* same as GDK_Next */)
-KEY_MAP_GTK     (PageDown, GDK_KP_Page_Down /* same as GDK_KP_Next */)
-KEY_MAP_QT      (PageDown, Qt::Key_PageDown)
-KEY_MAP_ANDROID (PageDown, AKEYCODE_PAGE_DOWN)
-
-// PageUp
-KEY_MAP_WIN     (PageUp, VK_PRIOR)
-KEY_MAP_COCOA   (PageUp, kVK_PageUp)
-KEY_MAP_GTK     (PageUp, GDK_Page_Up /* same as GDK_Prior */)
-KEY_MAP_GTK     (PageUp, GDK_KP_Page_Up /* same as GDK_KP_Prior */)
-KEY_MAP_QT      (PageUp, Qt::Key_PageUp)
-KEY_MAP_ANDROID (PageUp, AKEYCODE_PAGE_UP)
-
-// Right
-KEY_MAP_WIN     (Right, VK_RIGHT)
-KEY_MAP_COCOA   (Right, kVK_RightArrow)
-KEY_MAP_GTK     (Right, GDK_Right)
-KEY_MAP_GTK     (Right, GDK_KP_Right)
-KEY_MAP_QT      (Right, Qt::Key_Right)
-KEY_MAP_ANDROID (Right, AKEYCODE_DPAD_RIGHT)
-
-// Up
-KEY_MAP_WIN     (Up, VK_UP)
-KEY_MAP_COCOA   (Up, kVK_UpArrow)
-KEY_MAP_GTK     (Up, GDK_Up)
-KEY_MAP_GTK     (Up, GDK_KP_Up)
-KEY_MAP_QT      (Up, Qt::Key_Up)
-KEY_MAP_ANDROID (Up, AKEYCODE_DPAD_UP)
-
 // UpLeft
 
 // UpRight
 
-// Down
-KEY_MAP_WIN     (Down, VK_DOWN)
-KEY_MAP_COCOA   (Down, kVK_DownArrow)
-KEY_MAP_GTK     (Down, GDK_Down)
-KEY_MAP_GTK     (Down, GDK_KP_Down)
-KEY_MAP_QT      (Down, Qt::Key_Down)
-KEY_MAP_ANDROID (Down, AKEYCODE_DPAD_DOWN)
-
 // DownLeft
 
 // DownRight
 
-// Home
-KEY_MAP_WIN     (Home, VK_HOME)
-KEY_MAP_COCOA   (Home, kVK_Home)
-KEY_MAP_GTK     (Home, GDK_Home)
-KEY_MAP_GTK     (Home, GDK_KP_Home)
-KEY_MAP_QT      (Home, Qt::Key_Home)
-KEY_MAP_ANDROID (Home, AKEYCODE_MOVE_HOME)
-
-// End
-KEY_MAP_WIN     (End, VK_END)
-KEY_MAP_COCOA   (End, kVK_End)
-KEY_MAP_GTK     (End, GDK_End)
-KEY_MAP_GTK     (End, GDK_KP_End)
-KEY_MAP_QT      (End, Qt::Key_End)
-KEY_MAP_ANDROID (End, AKEYCODE_MOVE_END)
-
 // Select
 KEY_MAP_WIN     (Select, VK_SELECT)
 KEY_MAP_GTK     (Select, GDK_Select)
 
 // Backspace
 KEY_MAP_WIN     (Backspace, VK_BACK)
 KEY_MAP_COCOA   (Backspace, kVK_PC_Backspace)
 KEY_MAP_GTK     (Backspace, GDK_BackSpace)