Backed out changeset 3a55b10a6974 (bug 106327) for build bustage on

/builds/worker/workspace/build/src/layout/xul/nsMenuFrame.cpp r=backout a=backout on a CLOSED TREE

--HG--
extra : amend_source : e09bf154093728898ad2c27dd185108f9ff3b009
This commit is contained in:
Andreea Pavel 2018-01-05 04:46:46 +02:00
Родитель c27f04ab20
Коммит b88f05e893
6 изменённых файлов: 33 добавлений и 51 удалений

Просмотреть файл

@ -1105,11 +1105,9 @@ nsMenuFrame::BuildAcceleratorText(bool aNotify)
mozilla::services::GetStringBundleService();
if (bundleService) {
nsCOMPtr<nsIStringBundle> bundle;
rv = bundleService->CreateBundle(
(keyCode == "VK_RETURN" ?
"chrome://global-platform/locale/platformKeys.properties"
: "chrome://global/locale/keys.properties"),
rv = bundleService->CreateBundle("chrome://global/locale/keys.properties",
getter_AddRefs(bundle));
if (NS_SUCCEEDED(rv) && bundle) {
nsAutoString keyName;
rv = bundle->GetStringFromName(NS_ConvertUTF16toUTF8(keyCode).get(),

Просмотреть файл

@ -2,29 +2,24 @@
# 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/.
# Platform: Mac
# This file defines the on-screen display names for the various modifier keys
# and the Return key (VK_RETURN).
# These are used in XP menus to show keyboard shortcuts.
#mac
#this file defines the on screen display names for the various modifier keys
#these are used in XP menus to show keyboard shortcuts
# The Shift key - open up arrow symbol (ctrl-e)
#the shift key - open up arrow symbol (ctrl-e)
VK_SHIFT=\u21e7
# The Command key - clover leaf symbol (ctrl-q)
#the command key - clover leaf symbol (ctrl-q)
VK_META=\u2318
# The Win key - never generated by native key event
#the win key - never generated by native key event
VK_WIN=win
# The Option/Alt key - splitting tracks symbol (ctrl-g)
#the option/alt key - splitting tracks symbol (ctrl-g)
VK_ALT=\u2325
# The Control key - hat symbol (ctrl-f)
#the control key. hat symbol (ctrl-f)
VK_CONTROL=\u2303
# The Return key (on the main keyboard or numpad):
# "Enter" on Windows/Unix, "Return" on Mac
VK_RETURN=Return
# The separator character used between modifiers (none on Mac OS)
#the separator character used between modifiers (none on Mac OS)
MODIFIER_SEPARATOR=

Просмотреть файл

@ -2,29 +2,24 @@
# 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/.
# Platform: Unix
# This file defines the on-screen display names for the various modifier keys
# and the Enter key (VK_RETURN).
# These are used in XP menus to show keyboard shortcuts.
#default
#this file defines the on screen display names for the various modifier keys
#these are used in XP menus to show keyboard shortcuts
# The Shift key
#the shift key
VK_SHIFT=Shift
# The Command key
#the command key
VK_META=Meta
# The Win key (Super key and Hyper keys are mapped to DOM Win key)
#the win key (Super key and Hyper keys are mapped to DOM Win key)
VK_WIN=Win
# The Alt key
#the alt key
VK_ALT=Alt
# The Control key
#the control key
VK_CONTROL=Ctrl
# The Enter key (on the main keyboard or numpad):
# "Enter" on Windows/Unix, "Return" on Mac
VK_RETURN=Enter
# The separator character used between modifiers
#the separator character used between modifiers
MODIFIER_SEPARATOR=+

Просмотреть файл

@ -2,29 +2,24 @@
# 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/.
# Platform: Windows
# This file defines the on-screen display names for the various modifier keys
# and the Enter key (VK_RETURN).
# These are used in XP menus to show keyboard shortcuts.
#default
#this file defines the on screen display names for the various modifier keys
#these are used in XP menus to show keyboard shortcuts
# The Shift key
#the shift key
VK_SHIFT=Shift
# The Command key
#the command key
VK_META=Meta
# The Win key
#the win key
VK_WIN=Win
# The Alt key
#the alt key
VK_ALT=Alt
# The Control key
#the control key
VK_CONTROL=Ctrl
# The Enter key (on the main keyboard or numpad):
# "Enter" on Windows/Unix, "Return" on Mac
VK_RETURN=Enter
# The separator character used between modifiers
#the separator character used between modifiers
MODIFIER_SEPARATOR=+

Просмотреть файл

@ -57,6 +57,7 @@ VK_PAGE_DOWN=Page Down
# otherwise you should probably just translate the glyph regions
# LOCALIZATION NOTE : BLOCK maybe GLYPHS
VK_RETURN=Return
VK_TAB=Tab
VK_BACK=Backspace
VK_DELETE=Del

Просмотреть файл

@ -88,11 +88,9 @@ var ShortcutUtils = {
let key;
let keyCode = aElemKey.getAttribute("keycode");
if (keyCode) {
keyCode = keyCode.toUpperCase();
try {
let bundle = keyCode == "VK_RETURN" ? PlatformKeys : Keys;
// Some keys might not exist in the locale file, which will throw.
key = bundle.GetStringFromName(keyCode);
// Some keys might not exist in the locale file, which will throw:
key = Keys.GetStringFromName(keyCode.toUpperCase());
} catch (ex) {
Cu.reportError("Error finding " + keyCode + ": " + ex);
key = keyCode.replace(/^VK_/, "");