Bug 1039457 - Allow yelling in Scratchpad (Shift-Space). r=robcee
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 16 Jul 2014 07:11:00 +0200
changeset 215404 d12fab26162e00015f627b2a8212ea2a7308ce0c
parent 215403 0b0b703ed42865a242ee697fea5e86b2e534eec8
child 215405 6de147daee1157417b5abe1eca82b05ac640e601
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrobcee
bugs1039457
milestone33.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 1039457 - Allow yelling in Scratchpad (Shift-Space). r=robcee
browser/devtools/scratchpad/test/browser_scratchpad_autocomplete.js
browser/devtools/sourceeditor/autocomplete.js
browser/locales/en-US/chrome/browser/devtools/sourceeditor.properties
--- a/browser/devtools/scratchpad/test/browser_scratchpad_autocomplete.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_autocomplete.js
@@ -44,17 +44,17 @@ function* runTests([win, sp]) {
   // We should have looped around to the first suggestion again. Accept it.
   yield keyOnce("after-suggest", "VK_RETURN");
 
   is(sp.getText(), source + completions[0],
      "Autocompletion should work and select the right element.");
 
   // Check that the information tooltips work.
   sp.setText("5");
-  yield keyOnce("show-information", " ", { shiftKey: true });
+  yield keyOnce("show-information", " ", { ctrlKey: true, shiftKey: true });
 
   // Get the information container.
   const info = editorWin.document.querySelector(".CodeMirror-Tern-information");
   ok(info,
      "Info tooltip should appear.");
   is(info.textContent.slice(0, 6), "number",
      "Info tooltip should have expected contents.");
 
--- a/browser/devtools/sourceeditor/autocomplete.js
+++ b/browser/devtools/sourceeditor/autocomplete.js
@@ -71,17 +71,17 @@ function initializeAutoCompletion(ctx, o
       cm.tern.getHint(cm, (data) => {
         CodeMirror.on(data, "shown", () => ed.emit("before-suggest"));
         CodeMirror.on(data, "close", () => ed.emit("after-suggest"));
         CodeMirror.on(data, "select", () => ed.emit("suggestion-entered"));
         CodeMirror.showHint(cm, (cm, cb) => cb(data), { async: true });
       });
     };
 
-    keyMap[Editor.keyFor("showInformation", { noaccel: true })] = (cm) => {
+    keyMap[Editor.keyFor("showInformation2", { noaccel: true })] = (cm) => {
       cm.tern.showType(cm, null, () => {
         ed.emit("show-information");
       });
     };
     cm.addKeyMap(keyMap);
 
     let destroyTern = function() {
       ed.off("destroy", destroyTern);
--- a/browser/locales/en-US/chrome/browser/devtools/sourceeditor.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/sourceeditor.properties
@@ -91,11 +91,11 @@ moveLineUp.commandkey=Alt-Up
 # LOCALIZATION NOTE  (moveLineDown.commandkey): This is the key to use to move
 # the selected lines down.
 moveLineDown.commandkey=Alt-Down
 
 # LOCALIZATION NOTE  (autocomplete.commandkey): This is the key to use
 # in conjunction with Ctrl for autocompletion.
 autocompletion.commandkey=Space
 
-# LOCALIZATION NOTE  (showInformation.commandkey): This is the key to use to
+# LOCALIZATION NOTE  (showInformation2.commandkey): This is the key to use to
 # show more information, like type inference.
-showInformation.commandkey=Shift-Space
+showInformation2.commandkey=Shift-Ctrl-Space