Bug 829948 - [toolbox] once toolbox is undocked, hide the the close button. r=harth, a=bajaj
authorPaul Rouget <paul@mozilla.com>
Mon, 21 Jan 2013 16:22:47 +0100
changeset 127291 c00acb25f94fa093e12f829c52499e1ed0aca24a
parent 127290 53687feab57b13b92684732fd6c84f2e893fb470
child 127292 8975cb91583703fa3f2bf836295ffccd57d447b8
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersharth, bajaj
bugs829948
milestone20.0a2
Bug 829948 - [toolbox] once toolbox is undocked, hide the the close button. r=harth, a=bajaj
browser/devtools/framework/Toolbox.jsm
--- a/browser/devtools/framework/Toolbox.jsm
+++ b/browser/devtools/framework/Toolbox.jsm
@@ -319,16 +319,23 @@ Toolbox.prototype = {
     while (dockBox.firstChild) {
       dockBox.removeChild(dockBox.firstChild);
     }
 
     if (!this._target.isLocalTab) {
       return;
     }
 
+    let closeButton = this.doc.getElementById("toolbox-close");
+    if (this.hostType === this.HostType.WINDOW) {
+      closeButton.setAttribute("hidden", "true");
+    } else {
+      closeButton.removeAttribute("hidden");
+    }
+
     let sideEnabled = Services.prefs.getBoolPref(this._prefs.SIDE_ENABLED);
 
     for each (let position in this.HostType) {
       if (position == this.hostType ||
          (!sideEnabled && position == this.HostType.SIDE)) {
         continue;
       }