Bug 1485147 - Fix app menu for browser.xhtml. r=bgrins
authorBrendan Dahl <bdahl@mozilla.com>
Wed, 22 Aug 2018 17:04:52 +0000
changeset 432891 1278f30584f6b477ac73744e8e056ee3761727be
parent 432890 ab8b409edb0eb65164855cc3d237cf767fb382a5
child 432892 0568c96db323fc427707a9a0f89ffa4f7c295cb5
push id68136
push userbdahl@mozilla.com
push dateWed, 22 Aug 2018 17:07:43 +0000
treeherderautoland@1278f30584f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1485147
milestone63.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 1485147 - Fix app menu for browser.xhtml. r=bgrins The XUL elements were not being created because of the wrong createElement call. MozReview-Commit-ID: 54RqUJQAqHq Differential Revision: https://phabricator.services.mozilla.com/D3998
browser/components/customizableui/PanelMultiView.jsm
--- a/browser/components/customizableui/PanelMultiView.jsm
+++ b/browser/components/customizableui/PanelMultiView.jsm
@@ -362,28 +362,28 @@ var PanelMultiView = class extends Assoc
   }
 
   connect() {
     this.connected = true;
 
     PanelMultiView.ensureUnloadHandlerRegistered(this.window);
 
     let viewContainer = this._viewContainer =
-      this.document.createElement("box");
+      this.document.createXULElement("box");
     viewContainer.classList.add("panel-viewcontainer");
 
-    let viewStack = this._viewStack = this.document.createElement("box");
+    let viewStack = this._viewStack = this.document.createXULElement("box");
     viewStack.classList.add("panel-viewstack");
     viewContainer.append(viewStack);
 
-    let offscreenViewContainer = this.document.createElement("box");
+    let offscreenViewContainer = this.document.createXULElement("box");
     offscreenViewContainer.classList.add("panel-viewcontainer", "offscreen");
 
     let offscreenViewStack = this._offscreenViewStack =
-      this.document.createElement("box");
+      this.document.createXULElement("box");
     offscreenViewStack.classList.add("panel-viewstack");
     offscreenViewContainer.append(offscreenViewStack);
 
     this.node.prepend(offscreenViewContainer);
     this.node.prepend(viewContainer);
 
     this.openViews = [];
 
@@ -1207,33 +1207,33 @@ var PanelView = class extends Associated
       return;
     }
 
     // The header doesn't exist, only create it if needed.
     if (!value) {
       return;
     }
 
-    header = this.document.createElement("box");
+    header = this.document.createXULElement("box");
     header.classList.add("panel-header");
 
-    let backButton = this.document.createElement("toolbarbutton");
+    let backButton = this.document.createXULElement("toolbarbutton");
     backButton.className =
       "subviewbutton subviewbutton-iconic subviewbutton-back";
     backButton.setAttribute("closemenu", "none");
     backButton.setAttribute("tabindex", "0");
     backButton.setAttribute("aria-label",
       gBundle.GetStringFromName("panel.back"));
     backButton.addEventListener("command", () => {
       // The panelmultiview element may change if the view is reused.
       this.node.panelMultiView.goBack();
       backButton.blur();
     });
 
-    let label = this.document.createElement("label");
+    let label = this.document.createXULElement("label");
     label.setAttribute("value", value);
 
     header.append(backButton, label);
     this.node.prepend(header);
   }
 
   /**
    * Also make sure that the correct method is called on CustomizableWidget.