Bug 900378 Support "ZoomIn" and "ZoomOut" key values on GTK, Qt, Android and Gonk r=romaxa+nchen+karlt+mwu+smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 30 Dec 2014 10:47:54 +0900
changeset 221624 6f6ae656691d20459934b21af4fc40ce95d08e2c
parent 221623 f6205ad77a3c08ec7f3ba033f4e5595d34172aab
child 221625 40b3358b1d4b97bea26766d4527af3b944a65f0a
push id10617
push userkwierso@gmail.com
push dateWed, 31 Dec 2014 00:06:35 +0000
treeherderfx-team@edccc126caae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersromaxa
bugs900378
milestone37.0a1
Bug 900378 Support "ZoomIn" and "ZoomOut" key values on GTK, Qt, Android and Gonk r=romaxa+nchen+karlt+mwu+smaug
dom/events/KeyNameList.h
widget/NativeKeyToDOMKeyName.h
widget/android/nsWindow.cpp
widget/qt/nsQtKeyUtils.cpp
--- a/dom/events/KeyNameList.h
+++ b/dom/events/KeyNameList.h
@@ -95,18 +95,18 @@ DEFINE_KEYNAME_WITH_SAME_NAME(ContextMen
 DEFINE_KEYNAME_WITH_SAME_NAME(Escape)
 DEFINE_KEYNAME_WITH_SAME_NAME(Execute)
 DEFINE_KEYNAME_WITH_SAME_NAME(Find)
 DEFINE_KEYNAME_WITH_SAME_NAME(Help)
 DEFINE_KEYNAME_WITH_SAME_NAME(Pause)
 DEFINE_KEYNAME_WITH_SAME_NAME(Play)
 // DEFINE_KEYNAME_WITH_SAME_NAME(Props)
 DEFINE_KEYNAME_WITH_SAME_NAME(Select)
-// DEFINE_KEYNAME_WITH_SAME_NAME(ZoomIn)
-// DEFINE_KEYNAME_WITH_SAME_NAME(ZoomOut)
+DEFINE_KEYNAME_WITH_SAME_NAME(ZoomIn)
+DEFINE_KEYNAME_WITH_SAME_NAME(ZoomOut)
 
 /******************************************************************************
  * Device Keys
  *****************************************************************************/
 DEFINE_KEYNAME_WITH_SAME_NAME(BrightnessDown)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrightnessUp)
 DEFINE_KEYNAME_WITH_SAME_NAME(Camera)
 DEFINE_KEYNAME_WITH_SAME_NAME(Eject)
--- a/widget/NativeKeyToDOMKeyName.h
+++ b/widget/NativeKeyToDOMKeyName.h
@@ -379,16 +379,26 @@ KEY_MAP_ANDROID (Pause, AKEYCODE_BREAK)
 KEY_MAP_WIN     (Play, VK_PLAY)
 KEY_MAP_GTK     (Play, GDK_3270_Play) // legacy IBM keyboard layout
 KEY_MAP_QT      (Play, Qt::Key_Play)
 
 // Select
 KEY_MAP_WIN     (Select, VK_SELECT)
 KEY_MAP_GTK     (Select, GDK_Select)
 
+// ZoomIn
+KEY_MAP_GTK     (ZoomIn, GDK_ZoomIn)
+KEY_MAP_QT      (ZoomIn, Qt::Key_ZoomIn)
+KEY_MAP_ANDROID (ZoomIn, AKEYCODE_ZOOM_IN)
+
+// ZoomOut
+KEY_MAP_GTK     (ZoomOut, GDK_ZoomOut)
+KEY_MAP_QT      (ZoomOut, Qt::Key_ZoomOut)
+KEY_MAP_ANDROID (ZoomOut, AKEYCODE_ZOOM_OUT)
+
 /******************************************************************************
  * Device Keys
  ******************************************************************************/
 // BrightnessDown
 KEY_MAP_GTK     (BrightnessDown, GDK_MonBrightnessDown)
 KEY_MAP_QT      (BrightnessDown, Qt::Key_MonBrightnessDown)
 
 // BrightnessUp
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1396,18 +1396,16 @@ ConvertAndroidKeyCodeToKeyNameIndex(Andr
         case AKEYCODE_BUTTON_THUMBR:
         case AKEYCODE_BUTTON_START:
         case AKEYCODE_BUTTON_SELECT:
         case AKEYCODE_BUTTON_MODE:
 
         case AKEYCODE_MUTE: // mutes the microphone
         case AKEYCODE_MEDIA_CLOSE:
 
-        case AKEYCODE_ZOOM_IN:
-        case AKEYCODE_ZOOM_OUT:
         case AKEYCODE_DVR:
         case AKEYCODE_TV_POWER:
         case AKEYCODE_TV_INPUT:
         case AKEYCODE_STB_POWER:
         case AKEYCODE_STB_INPUT:
         case AKEYCODE_AVR_POWER:
         case AKEYCODE_AVR_INPUT:
 
--- a/widget/qt/nsQtKeyUtils.cpp
+++ b/widget/qt/nsQtKeyUtils.cpp
@@ -443,18 +443,16 @@ QtKeyCodeToDOMKeyNameIndex(int aKeysym)
         case Qt::Key_Support:
         case Qt::Key_TaskPane:
         case Qt::Key_Terminal:
         case Qt::Key_Tools:
         case Qt::Key_Travel:
         case Qt::Key_Video:
         case Qt::Key_Word:
         case Qt::Key_Xfer:
-        case Qt::Key_ZoomIn:
-        case Qt::Key_ZoomOut:
         case Qt::Key_Away:
         case Qt::Key_Messenger:
         case Qt::Key_WebCam:
         case Qt::Key_MailForward:
         case Qt::Key_Pictures:
         case Qt::Key_Music:
         case Qt::Key_Battery:
         case Qt::Key_Bluetooth: