Bug 1580420 - Don't apply persisted dimensions to windows in the overlay loader. r=jorgk DONTBUILD
authorGeoff Lankow <geoff@darktrojan.net>
Mon, 21 Oct 2019 15:59:53 +1300
changeset 37200 caa4039d835ac06a1e65a1b23f6951c92a7e3c73
parent 37199 f5a320f3ebce383190418b463937d6b0e4f57a00
child 37201 b65ea98044afd29e3161c05f2d762ef5ee9e58d2
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
reviewersjorgk
bugs1580420
Bug 1580420 - Don't apply persisted dimensions to windows in the overlay loader. r=jorgk DONTBUILD
common/src/Overlays.jsm
--- a/common/src/Overlays.jsm
+++ b/common/src/Overlays.jsm
@@ -208,17 +208,22 @@ class Overlays {
       let element = this.document.getElementById(id);
       if (element) {
         let attrNames = xulStore.getAttributeEnumerator(this.location, id);
         while (attrNames.hasMore()) {
           let attrName = attrNames.getNext();
           let attrValue = xulStore.getValue(this.location, id, attrName);
           if (attrName == "selectedIndex" && element.localName == "deck") {
             this._decksToResolve.set(element, attrValue);
-          } else {
+          } else if (
+            element != this.document.documentElement ||
+            !["height", "screenX", "screenY", "sizemode", "width"].includes(
+              attrName
+            )
+          ) {
             element.setAttribute(attrName, attrValue);
           }
         }
       }
     }
 
     // We've resolved all the forward references we can, we can now go ahead and load the scripts
     let deferredLoad = [];