Bug 1447875: Partially back out bug 1439875 until we figure out bug 1446264. r?xidorn draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 22 Mar 2018 01:59:26 +0100
changeset 770938 3b1178aa51b1c98842e763d38699d6228362a6a7
parent 770928 b41c7c1ff91f49b1500b087ff23c288dd88f1fde
push id103538
push userbmo:emilio@crisal.io
push dateThu, 22 Mar 2018 02:02:41 +0000
reviewersxidorn
bugs1447875, 1439875, 1446264
milestone61.0a1
Bug 1447875: Partially back out bug 1439875 until we figure out bug 1446264. r?xidorn I want this behind a pref so that I can investigate other bugs without building locally. MozReview-Commit-ID: FWbGUxNbbm
xpfe/appshell/nsXULWindow.cpp
--- a/xpfe/appshell/nsXULWindow.cpp
+++ b/xpfe/appshell/nsXULWindow.cpp
@@ -2256,18 +2256,22 @@ nsXULWindow::ApplyChromeFlags()
   IgnoredErrorResult rv;
   window->SetAttribute(NS_LITERAL_STRING("chromehidden"), newvalue, rv);
 }
 
 NS_IMETHODIMP
 nsXULWindow::BeforeStartLayout()
 {
   ApplyChromeFlags();
-  SyncAttributesToWidget();
-  SizeShell();
+  // FIXME(emilio): Until we fix bug 1446264, just behind a hidden pref for
+  // local testing and debugging.
+  if (Preferences::GetBool("xul.size_window_before_layout")) {
+    SyncAttributesToWidget();
+    SizeShell();
+  }
   return NS_OK;
 }
 
 void
 nsXULWindow::SizeShell()
 {
   int32_t specWidth = -1, specHeight = -1;
   bool gotSize = false;