Bug 1151259 - Switch <toolbar> to <box> to get rid of -moz-appearance styles for devtools sidebar. r=jryans, a=sledru
authorBrian Grinstead <bgrinstead@mozilla.com>
Tue, 07 Apr 2015 14:27:00 +0200
changeset 258467 7af104b169fa
parent 258466 5ca4e237b259
child 258468 9e1bf10888cd
push id4676
push userryanvm@gmail.com
push date2015-04-15 02:06 +0000
treeherdermozilla-beta@91df81e2edac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans, sledru
bugs1151259
milestone38.0
Bug 1151259 - Switch <toolbar> to <box> to get rid of -moz-appearance styles for devtools sidebar. r=jryans, a=sledru
browser/devtools/framework/sidebar.js
--- a/browser/devtools/framework/sidebar.js
+++ b/browser/devtools/framework/sidebar.js
@@ -114,32 +114,32 @@ ToolSidebar.prototype = {
    */
   addAllTabsMenu: function() {
     if (this._allTabsBtn) {
       return;
     }
 
     let tabs = this._tabbox.tabs;
 
-    // Create a toolbar and insert it first in the tabbox
-    let allTabsToolbar = this._panelDoc.createElementNS(XULNS, "toolbar");
-    this._tabbox.insertBefore(allTabsToolbar, tabs);
+    // Create a container and insert it first in the tabbox
+    let allTabsContainer = this._panelDoc.createElementNS(XULNS, "box");
+    this._tabbox.insertBefore(allTabsContainer, tabs);
 
     // Move the tabs inside and make them flex
-    allTabsToolbar.appendChild(tabs);
+    allTabsContainer.appendChild(tabs);
     tabs.setAttribute("flex", "1");
 
     // Create the dropdown menu next to the tabs
     this._allTabsBtn = this._panelDoc.createElementNS(XULNS, "toolbarbutton");
     this._allTabsBtn.setAttribute("class", "devtools-sidebar-alltabs");
     this._allTabsBtn.setAttribute("type", "menu");
     this._allTabsBtn.setAttribute("label", l10n("sidebar.showAllTabs.label"));
     this._allTabsBtn.setAttribute("tooltiptext", l10n("sidebar.showAllTabs.tooltip"));
     this._allTabsBtn.setAttribute("hidden", "true");
-    allTabsToolbar.appendChild(this._allTabsBtn);
+    allTabsContainer.appendChild(this._allTabsBtn);
 
     let menuPopup = this._panelDoc.createElementNS(XULNS, "menupopup");
     this._allTabsBtn.appendChild(menuPopup);
 
     // Listening to tabs overflow event to toggle the alltabs button
     tabs.addEventListener("overflow", this._onTabBoxOverflow, false);
     tabs.addEventListener("underflow", this._onTabBoxUnderflow, false);
 
@@ -157,17 +157,17 @@ ToolSidebar.prototype = {
 
     let tabs = this._tabbox.tabs;
 
     tabs.removeEventListener("overflow", this._onTabBoxOverflow, false);
     tabs.removeEventListener("underflow", this._onTabBoxUnderflow, false);
 
     // Moving back the tabs as a first child of the tabbox
     this._tabbox.insertBefore(tabs, this._tabbox.tabpanels);
-    this._tabbox.querySelector("toolbar").remove();
+    this._tabbox.querySelector("box").remove();
 
     this._allTabsBtn = null;
   },
 
   _onTabBoxOverflow: function() {
     this._allTabsBtn.removeAttribute("hidden");
   },