Bug 1425822 - Get rid of sanitizePrefs2.inContent.dialog.width and sanitizePrefs2.inContent.column.width. r?jaws
MozReview-Commit-ID: COB6zzorXYE
--- a/browser/components/preferences/sanitize.js
+++ b/browser/components/preferences/sanitize.js
@@ -1,20 +1,15 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var gSanitizeDialog = Object.freeze({
init() {
- let customWidthElements = document.getElementsByAttribute("dialogWidth", "*");
- let isInSubdialog = document.documentElement.hasAttribute("subdialog");
- for (let element of customWidthElements) {
- element.style.width = element.getAttribute(isInSubdialog ? "subdialogWidth" : "dialogWidth");
- }
this.onClearHistoryChanged();
},
onClearHistoryChanged() {
let downloadsPref = document.getElementById("privacy.clearOnShutdown.downloads");
let historyPref = document.getElementById("privacy.clearOnShutdown.history");
downloadsPref.value = historyPref.value;
}
--- a/browser/components/preferences/sanitize.xul
+++ b/browser/components/preferences/sanitize.xul
@@ -14,18 +14,17 @@
%brandDTD;
%sanitizeDTD;
]>
<prefwindow id="SanitizeDialog" type="child"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
dlgbuttons="accept,cancel,help"
ondialoghelp="openPrefsHelp()"
- dialogWidth="&sanitizePrefs2.modal.width;"
- subdialogWidth="&sanitizePrefs2.inContent.dialog.width;"
+ style="width: &sanitizePrefs2.modal.width;"
title="&sanitizePrefs2.title;"
onload="gSanitizeDialog.init();">
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
<script type="application/javascript" src="chrome://browser/content/preferences/sanitize.js"/>
<prefpane id="SanitizeDialogPane"
helpTopic="prefs-clear-private-data">
@@ -43,18 +42,17 @@
</preferences>
<description>&clearDataSettings3.label;</description>
<groupbox orient="horizontal">
<caption><label>&historySection.label;</label></caption>
<grid flex="1">
<columns>
- <column dialogWidth="&sanitizePrefs2.column.width;"
- subdialogWidth="&sanitizePrefs2.inContent.column.width;"/>
+ <column style="width: &sanitizePrefs2.column.width;"/>
<column flex="1"/>
</columns>
<rows>
<row>
<checkbox label="&itemHistoryAndDownloads.label;"
accesskey="&itemHistoryAndDownloads.accesskey;"
preference="privacy.clearOnShutdown.history"/>
<checkbox label="&itemCookies.label;"
@@ -76,18 +74,17 @@
</row>
</rows>
</grid>
</groupbox>
<groupbox orient="horizontal">
<caption><label>&dataSection.label;</label></caption>
<grid flex="1">
<columns>
- <column dialogWidth="&sanitizePrefs2.column.width;"
- subdialogWidth="&sanitizePrefs2.inContent.column.width;"/>
+ <column style="width: &sanitizePrefs2.column.width;"/>
<column flex="1"/>
</columns>
<rows>
<row>
<checkbox label="&itemSitePreferences.label;"
accesskey="&itemSitePreferences.accesskey;"
preference="privacy.clearOnShutdown.siteSettings"/>
<checkbox label="&itemOfflineApps.label;"
--- a/browser/locales/en-US/chrome/browser/sanitize.dtd
+++ b/browser/locales/en-US/chrome/browser/sanitize.dtd
@@ -3,24 +3,16 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY sanitizePrefs2.title "Settings for Clearing History">
<!-- LOCALIZATION NOTE (sanitizePrefs2.modal.width): width of the Clear History on Shutdown dialog.
Should be large enough to contain the item* strings on a single line.
The column width should be set at half of the dialog width. -->
<!ENTITY sanitizePrefs2.modal.width "34em">
<!ENTITY sanitizePrefs2.column.width "17em">
-<!-- LOCALIZATION NOTE (sanitizePrefs2.inContent.dialog.width): width of the
- Clear History on Shutdown subdialog in the in-content preferences.
- Should be large enough to contain the item* strings on a single line.
- The column width adjusts the width of the first column in the dialog.
- You can set the column width to a value that makes the dialog look visually balanced,
- or at half of the dialog width if unsure. -->
-<!ENTITY sanitizePrefs2.inContent.dialog.width "34em">
-<!ENTITY sanitizePrefs2.inContent.column.width "17em">
<!ENTITY sanitizeDialog2.title "Clear Recent History">
<!-- LOCALIZATION NOTE (sanitizeDialog2.width): width of the Clear Recent History dialog -->
<!ENTITY sanitizeDialog2.width "34em">
<!ENTITY clearDataSettings3.label "When I quit &brandShortName;, it should automatically clear all">
<!-- XXX rearrange entities to match physical layout when l10n isn't an issue -->