Bug 1455496 - Part 1. Hide toolbar of scratchpad panel. r=dao
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Mon, 23 Apr 2018 09:25:59 +0900
changeset 468556 dd464b3666b155e8b1dda1d7652db27a3e64f9ba
parent 468555 368eefa9989f1f9de901b22419a4524bc47a4745
child 468557 997646442b819b521f25e79020e22cdc5f6fe324
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1455496
milestone61.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 1455496 - Part 1. Hide toolbar of scratchpad panel. r=dao The scratchpad panel(in the toolbox) should not display menu bar. This patch will hide this menu bar if target is toolbox.
devtools/client/scratchpad/scratchpad.js
devtools/client/scratchpad/scratchpad.xul
--- a/devtools/client/scratchpad/scratchpad.js
+++ b/devtools/client/scratchpad/scratchpad.js
@@ -332,24 +332,24 @@ var Scratchpad = {
   get notificationBox() {
     return document.getElementById("scratchpad-notificationbox");
   },
 
   /**
    * Hide the menu bar.
    */
   hideMenu: function SP_hideMenu() {
-    document.getElementById("sp-menubar").style.display = "none";
+    document.getElementById("sp-menu-toolbar").style.display = "none";
   },
 
   /**
    * Show the menu bar.
    */
   showMenu: function SP_showMenu() {
-    document.getElementById("sp-menubar").style.display = "";
+    document.getElementById("sp-menu-toolbar").style.display = "";
   },
 
   /**
    * Get the editor content, in the given range. If no range is given you get
    * the entire editor content.
    *
    * @param number [aStart=0]
    *        Optional, start from the given offset.
--- a/devtools/client/scratchpad/scratchpad.xul
+++ b/devtools/client/scratchpad/scratchpad.xul
@@ -136,18 +136,18 @@
        command="sp-cmd-documentationLink"/>
   <key id="key_gotoLine"
        key="&gotoLineCmd.key;"
        command="key_gotoLine"
        modifiers="accel"/>
 
 </keyset>
 
-<toolbar type="menubar">
-<menubar id="sp-menubar">
+<toolbar type="menubar" id="sp-menu-toolbar">
+<menubar>
   <menu id="sp-file-menu" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
     <menupopup id="sp-menu-filepopup">
       <menuitem id="sp-menu-newscratchpad"
                 label="&newWindowCmd.label;"
                 accesskey="&newWindowCmd.accesskey;"
                 key="sp-key-window"
                 command="sp-cmd-newWindow"/>
       <menuseparator/>