Bug 1535592 - Don't resizeToContent until all content is modified. r=jaws
authorMichael Kaply <mozilla@kaply.com>
Fri, 10 May 2019 21:02:37 +0000
changeset 532282 3665b343720dbbdf145769089959b4cecaf81c2d
parent 532281 46287ed82b8f3bd422103f4f2a9ec7b8af9205b0
child 532283 41a34b64ca1798f76f0781978d0d1c9d764d9a1a
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1535592
milestone68.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 1535592 - Don't resizeToContent until all content is modified. r=jaws Differential Revision: https://phabricator.services.mozilla.com/D30721
browser/base/content/aboutDialog.js
--- a/browser/base/content/aboutDialog.js
+++ b/browser/base/content/aboutDialog.js
@@ -56,17 +56,16 @@ async function init(aEvent) {
   }
 
   // Use Fluent arguments for append version and the architecture of the build
   let versionField = document.getElementById("version");
 
   document.l10n.setAttributes(versionField, versionId, versionAttributes);
 
   await document.l10n.translateElements([versionField]);
-  window.sizeToContent();
 
   // Show a release notes link if we have a URL.
   let relNotesLink = document.getElementById("releasenotes");
   let relNotesPrefType = Services.prefs.getPrefType("app.releaseNotesURL");
   if (relNotesPrefType != Services.prefs.PREF_INVALID) {
     let relNotesURL = Services.urlFormatter.formatURLPref("app.releaseNotesURL");
     if (relNotesURL != "about:blank") {
       relNotesLink.href = relNotesURL;
@@ -82,14 +81,15 @@ async function init(aEvent) {
     channelLabel.value = UpdateUtils.UpdateChannel;
     if (/^release($|\-)/.test(channelLabel.value))
         currentChannelText.hidden = true;
   }
 
   if (AppConstants.MOZ_APP_VERSION_DISPLAY.endsWith("esr")) {
     document.getElementById("release").hidden = false;
   }
+
+  window.sizeToContent();
+
   if (AppConstants.platform == "macosx") {
-    // it may not be sized at this point, and we need its width to calculate its position
-    window.sizeToContent();
     window.moveTo((screen.availWidth / 2) - (window.outerWidth / 2), screen.availHeight / 5);
   }
 }