Bug 1277234 - Rename key name VolumeUp to AudioVolumeUp. r=masayuki
authorGregor Wagner <gwagner@mozilla.com>
Thu, 02 Jun 2016 15:55:53 +0200
changeset 339177 17fd76ee110ca58e6e2a518cee4f867087943433
parent 339176 3723ba4d368b091036edcfcd3cf7634f7028c98d
child 339178 332438c705827bb0034d1bd05e227a5a363def8a
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1277234
milestone49.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 1277234 - Rename key name VolumeUp to AudioVolumeUp. r=masayuki
dom/events/KeyNameList.h
dom/inputmethod/forms.js
dom/inputmethod/jar.mn
widget/NativeKeyToDOMKeyName.h
widget/WidgetEventImpl.cpp
--- a/dom/events/KeyNameList.h
+++ b/dom/events/KeyNameList.h
@@ -245,26 +245,20 @@ DEFINE_KEYNAME_WITH_SAME_NAME(AudioBalan
 DEFINE_KEYNAME_WITH_SAME_NAME(AudioBassBoostDown)
 DEFINE_KEYNAME_WITH_SAME_NAME(AudioBassBoostToggle)
 DEFINE_KEYNAME_WITH_SAME_NAME(AudioBassBoostUp)
 DEFINE_KEYNAME_WITH_SAME_NAME(AudioFaderFront)
 DEFINE_KEYNAME_WITH_SAME_NAME(AudioFaderRear)
 DEFINE_KEYNAME_WITH_SAME_NAME(AudioSurroundModeNext)
 DEFINE_KEYNAME_WITH_SAME_NAME(AudioTrebleDown)
 DEFINE_KEYNAME_WITH_SAME_NAME(AudioTrebleUp)
-#ifndef MOZ_B2G
 DEFINE_KEYNAME_WITH_SAME_NAME(AudioVolumeDown)
 DEFINE_KEYNAME_WITH_SAME_NAME(AudioVolumeUp)
 DEFINE_KEYNAME_WITH_SAME_NAME(AudioVolumeMute)
-#else
-// Temporarily, remaining for B2G
-DEFINE_KEYNAME_WITH_SAME_NAME(VolumeDown)
-DEFINE_KEYNAME_WITH_SAME_NAME(VolumeUp)
-DEFINE_KEYNAME_WITH_SAME_NAME(VolumeMute)
-#endif
+
 DEFINE_KEYNAME_WITH_SAME_NAME(MicrophoneToggle)
 DEFINE_KEYNAME_WITH_SAME_NAME(MicrophoneVolumeDown)
 DEFINE_KEYNAME_WITH_SAME_NAME(MicrophoneVolumeUp)
 DEFINE_KEYNAME_WITH_SAME_NAME(MicrophoneVolumeMute)
 
 /******************************************************************************
  * Speech Keys
  *****************************************************************************/
--- a/dom/inputmethod/forms.js
+++ b/dom/inputmethod/forms.js
@@ -197,31 +197,22 @@ function guessKeyNameFromKeyCode(Keyboar
     case KeyboardEvent.DOM_VK_F23:
       return "F23";
     case KeyboardEvent.DOM_VK_F24:
       return "F24";
     case KeyboardEvent.DOM_VK_NUM_LOCK:
       return "NumLock";
     case KeyboardEvent.DOM_VK_SCROLL_LOCK:
       return "ScrollLock";
-#ifndef MOZ_B2G
     case KeyboardEvent.DOM_VK_VOLUME_MUTE:
       return "AudioVolumeMute";
     case KeyboardEvent.DOM_VK_VOLUME_DOWN:
       return "AudioVolumeDown";
     case KeyboardEvent.DOM_VK_VOLUME_UP:
       return "AudioVolumeUp";
-#else
-    case KeyboardEvent.DOM_VK_VOLUME_MUTE:
-      return "VolumeMute";
-    case KeyboardEvent.DOM_VK_VOLUME_DOWN:
-      return "VolumeDown";
-    case KeyboardEvent.DOM_VK_VOLUME_UP:
-      return "VolumeUp";
-#endif
     case KeyboardEvent.DOM_VK_META:
       return "Meta";
     case KeyboardEvent.DOM_VK_ALTGR:
       return "AltGraph";
     case KeyboardEvent.DOM_VK_ATTN:
       return "Attn";
     case KeyboardEvent.DOM_VK_CRSEL:
       return "CrSel";
--- a/dom/inputmethod/jar.mn
+++ b/dom/inputmethod/jar.mn
@@ -1,6 +1,6 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 toolkit.jar:
-* content/global/forms.js                      (forms.js)
+ content/global/forms.js                      (forms.js)
--- a/widget/NativeKeyToDOMKeyName.h
+++ b/widget/NativeKeyToDOMKeyName.h
@@ -1009,36 +1009,33 @@ KEY_MAP_WIN_CMD (AudioBassBoostUp, APPCO
 KEY_MAP_QT      (AudioBassBoostUp, Qt::Key_BassUp)
 
 // AudioVolumeDown
 KEY_MAP_WIN               (AudioVolumeDown, VK_VOLUME_DOWN)
 KEY_MAP_WIN_CMD           (AudioVolumeDown, APPCOMMAND_VOLUME_DOWN)
 KEY_MAP_COCOA             (AudioVolumeDown, kVK_VolumeDown)
 KEY_MAP_GTK               (AudioVolumeDown, GDK_AudioLowerVolume)
 KEY_MAP_QT                (AudioVolumeDown, Qt::Key_VolumeDown)
-KEY_MAP_ANDROID_EXCEPT_B2G(AudioVolumeDown, AKEYCODE_VOLUME_DOWN)
-KEY_MAP_B2G               (VolumeDown,      AKEYCODE_VOLUME_DOWN)
+KEY_MAP_ANDROID           (AudioVolumeDown, AKEYCODE_VOLUME_DOWN)
 
 // AudioVolumeUp
 KEY_MAP_WIN               (AudioVolumeUp, VK_VOLUME_UP)
 KEY_MAP_WIN_CMD           (AudioVolumeUp, APPCOMMAND_VOLUME_UP)
 KEY_MAP_COCOA             (AudioVolumeUp, kVK_VolumeUp)
 KEY_MAP_GTK               (AudioVolumeUp, GDK_AudioRaiseVolume)
 KEY_MAP_QT                (AudioVolumeUp, Qt::Key_VolumeUp)
-KEY_MAP_ANDROID_EXCEPT_B2G(AudioVolumeUp, AKEYCODE_VOLUME_UP)
-KEY_MAP_B2G               (VolumeUp,      AKEYCODE_VOLUME_UP)
+KEY_MAP_ANDROID           (AudioVolumeUp, AKEYCODE_VOLUME_UP)
 
 // AudioVolumeMute
 KEY_MAP_WIN               (AudioVolumeMute, VK_VOLUME_MUTE)
 KEY_MAP_WIN_CMD           (AudioVolumeMute, APPCOMMAND_VOLUME_MUTE)
 KEY_MAP_COCOA             (AudioVolumeMute, kVK_Mute)
 KEY_MAP_GTK               (AudioVolumeMute, GDK_AudioMute)
 KEY_MAP_QT                (AudioVolumeMute, Qt::Key_VolumeMute)
-KEY_MAP_ANDROID_EXCEPT_B2G(AudioVolumeMute, AKEYCODE_VOLUME_MUTE)
-KEY_MAP_B2G               (VolumeMute,      AKEYCODE_VOLUME_MUTE)
+KEY_MAP_ANDROID           (AudioVolumeMute, AKEYCODE_VOLUME_MUTE)
 
 /******************************************************************************
  * Application Keys
  ******************************************************************************/
 // LaunchCalculator
 KEY_MAP_GTK     (LaunchCalculator, GDK_Calculator)
 KEY_MAP_QT      (LaunchCalculator, Qt::Key_Calculator)
 KEY_MAP_ANDROID (LaunchCalculator, AKEYCODE_CALCULATOR)
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -893,31 +893,22 @@ WidgetKeyboardEvent::ComputeKeyCodeFromK
     case KEY_NAME_INDEX_F23:
       return nsIDOMKeyEvent::DOM_VK_F23;
     case KEY_NAME_INDEX_F24:
       return nsIDOMKeyEvent::DOM_VK_F24;
     case KEY_NAME_INDEX_NumLock:
       return nsIDOMKeyEvent::DOM_VK_NUM_LOCK;
     case KEY_NAME_INDEX_ScrollLock:
       return nsIDOMKeyEvent::DOM_VK_SCROLL_LOCK;
-#ifndef MOZ_B2G
     case KEY_NAME_INDEX_AudioVolumeMute:
       return nsIDOMKeyEvent::DOM_VK_VOLUME_MUTE;
     case KEY_NAME_INDEX_AudioVolumeDown:
       return nsIDOMKeyEvent::DOM_VK_VOLUME_DOWN;
     case KEY_NAME_INDEX_AudioVolumeUp:
       return nsIDOMKeyEvent::DOM_VK_VOLUME_UP;
-#else // #ifndef MOZ_B2G
-    case KEY_NAME_INDEX_VolumeMute:
-      return nsIDOMKeyEvent::DOM_VK_VOLUME_MUTE;
-    case KEY_NAME_INDEX_VolumeDown:
-      return nsIDOMKeyEvent::DOM_VK_VOLUME_DOWN;
-    case KEY_NAME_INDEX_VolumeUp:
-      return nsIDOMKeyEvent::DOM_VK_VOLUME_UP;
-#endif // #ifndef MOZ_B2G #else
     case KEY_NAME_INDEX_Meta:
       return nsIDOMKeyEvent::DOM_VK_META;
     case KEY_NAME_INDEX_AltGraph:
       return nsIDOMKeyEvent::DOM_VK_ALTGR;
     case KEY_NAME_INDEX_Attn:
       return nsIDOMKeyEvent::DOM_VK_ATTN;
     case KEY_NAME_INDEX_CrSel:
       return nsIDOMKeyEvent::DOM_VK_CRSEL;