Bug 1281493 - Moving element shuffle to when the popup is showing which prevents inspector XBL binding from breaking identity-popup. Removing surplus identity-popup-security-content selector. draft
authorJonathan Kingston <jkt@mozilla.com>
Mon, 27 Jun 2016 17:19:21 +0100
changeset 381499 dcb36a1a829dec3ccf4fcd42bce8e9a21a638185
parent 381119 939ecc4e9d055c263633cbe276bfb634a68fe4c5
child 523983 e3abd4c7a80855c991ad852d0f88f1ecb561542e
push id21501
push userjkingston@mozilla.com
push dateMon, 27 Jun 2016 16:19:47 +0000
bugs1281493
milestone50.0a1
Bug 1281493 - Moving element shuffle to when the popup is showing which prevents inspector XBL binding from breaking identity-popup. Removing surplus identity-popup-security-content selector. MozReview-Commit-ID: 4NZf1PryzlY
browser/base/content/test/general/head.js
browser/components/customizableui/content/panelUI.xml
--- a/browser/base/content/test/general/head.js
+++ b/browser/base/content/test/general/head.js
@@ -875,17 +875,16 @@ function assertMixedContentBlockingState
   is(popupAttr.includes("passive-loaded"), passiveLoaded,
       "identity-popup has expected attr for passiveLoaded");
   is(bodyAttr.includes("passive-loaded"), passiveLoaded,
       "securityView-body has expected attr for passiveLoaded");
 
   // Make sure the correct icon is visible in the Control Center.
   // This logic is controlled with CSS, so this helps prevent regressions there.
   let securityView = doc.getElementById("identity-popup-securityView");
-  let securityContent = doc.getElementById("identity-popup-security-content");
   let securityViewBG = tabbrowser.ownerGlobal.getComputedStyle(securityView, "").
                        getPropertyValue("background-image");
   let securityContentBG = tabbrowser.ownerGlobal.getComputedStyle(securityView, "").
                           getPropertyValue("background-image");
 
   if (stateInsecure) {
     is(securityViewBG, "url(\"chrome://browser/skin/controlcenter/conn-not-secure.svg\")",
       "CC using 'not secure' icon");
--- a/browser/components/customizableui/content/panelUI.xml
+++ b/browser/components/customizableui/content/panelUI.xml
@@ -111,19 +111,16 @@
         this._subViewObserver =
           new MutationObserver(this._syncContainerWithSubView.bind(this));
         this._mainViewObserver =
           new MutationObserver(this._syncContainerWithMainView.bind(this));
 
         this._mainViewContainer.setAttribute("panelid",
                                              this._panel.id);
 
-        if (this._mainView) {
-          this.setMainView(this._mainView);
-        }
         this.setAttribute("viewtype", "main");
       ]]></constructor>
 
       <destructor><![CDATA[
         if (this._mainView) {
           this._mainView.removeAttribute("mainview");
         }
         this._mainViewObserver.disconnect();
@@ -300,16 +297,20 @@
               // Bug 941196 - The panel can get taller when opening a subview. Disabling
               // autoPositioning means that the panel won't jump around if an opened
               // subview causes the panel to exceed the dimensions of the screen in the
               // direction that the panel originally opened in. This property resets
               // every time the popup closes, which is why we have to set it each time.
               this._panel.autoPosition = false;
               this._syncContainerWithMainView();
 
+              if (this._mainView) {
+                this.setMainView(this._mainView);
+              }
+
               this._mainViewObserver.observe(this._mainView, {
                 attributes: true,
                 characterData: true,
                 childList: true,
                 subtree: true
               });
 
               break;