зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1738056 - stop initializing the about window asynchronously and manually sizing it, r=emilio,mconley
Differential Revision: https://phabricator.services.mozilla.com/D172007
This commit is contained in:
Родитель
4f15ead901
Коммит
5184a1bb4d
|
@ -17,11 +17,7 @@ if (AppConstants.MOZ_UPDATER) {
|
|||
);
|
||||
}
|
||||
|
||||
async function init(aEvent) {
|
||||
if (aEvent.target != document) {
|
||||
return;
|
||||
}
|
||||
|
||||
function init() {
|
||||
let defaults = Services.prefs.getDefaultBranch(null);
|
||||
let distroId = defaults.getCharPref("distribution.id", "");
|
||||
if (distroId) {
|
||||
|
@ -71,8 +67,6 @@ async function init(aEvent) {
|
|||
|
||||
document.l10n.setAttributes(versionField, versionId, versionAttributes);
|
||||
|
||||
await document.l10n.translateElements([versionField]);
|
||||
|
||||
// Show a release notes link if we have a URL.
|
||||
let relNotesLink = document.getElementById("releasenotes");
|
||||
let relNotesPrefType = Services.prefs.getPrefType(
|
||||
|
@ -105,13 +99,6 @@ async function init(aEvent) {
|
|||
if (AppConstants.IS_ESR) {
|
||||
document.getElementById("release").hidden = false;
|
||||
}
|
||||
|
||||
window.sizeToContent();
|
||||
|
||||
if (AppConstants.platform == "macosx") {
|
||||
window.moveTo(
|
||||
screen.availWidth / 2 - window.outerWidth / 2,
|
||||
screen.availHeight / 5
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
init();
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="aboutDialog"
|
||||
windowtype="Browser:About"
|
||||
onload="init(event);"
|
||||
#ifdef MOZ_UPDATER
|
||||
onunload="onUnload(event);"
|
||||
#endif
|
||||
|
@ -33,8 +32,6 @@
|
|||
<html:link rel="localization" href="browser/aboutDialog.ftl"/>
|
||||
</linkset>
|
||||
|
||||
<script src="chrome://browser/content/aboutDialog.js"/>
|
||||
|
||||
<html:div id="aboutDialogContainer">
|
||||
<hbox id="clientBox">
|
||||
<vbox id="leftBox" flex="1"/>
|
||||
|
@ -153,4 +150,5 @@
|
|||
<key keycode="VK_ESCAPE" oncommand="window.close();"/>
|
||||
</keyset>
|
||||
|
||||
<script src="chrome://browser/content/aboutDialog.js"/>
|
||||
</window>
|
||||
|
|
|
@ -408,13 +408,13 @@ function openAboutDialog() {
|
|||
return;
|
||||
}
|
||||
|
||||
var features = "chrome,";
|
||||
var features = "chrome,centerscreen,";
|
||||
if (AppConstants.platform == "win") {
|
||||
features += "centerscreen,dependent";
|
||||
features += "dependent";
|
||||
} else if (AppConstants.platform == "macosx") {
|
||||
features += "resizable=no,minimizable=no";
|
||||
} else {
|
||||
features += "centerscreen,dependent,dialog=no";
|
||||
features += "dependent,dialog=no";
|
||||
}
|
||||
|
||||
window.openDialog("chrome://browser/content/aboutDialog.xhtml", "", features);
|
||||
|
|
Загрузка…
Ссылка в новой задаче