gecko-dev/browser/base/content/sanitize.xul
Paolo Amadini 42c8938dfc Bug 1493844 - Part 2 - Remove the "caption" and "groupbox" bindings. r=bgrins,dao,jaws,johannh,surkov
Proper native "groupbox" styling depends on the structure of the XBL binding. By restyling the Page Info dialog, the native styling is now unused except for the Print Page Setup dialog on Windows. The native apperance is thus not applied by default anymore, and the "groupbox" element can just be used semantically for accessibility. The Print Page Setup dialog applies the native styling on its own in a way that still works on Windows.

The only other consumers of "groupbox" are the in-content Preferences pages and dialogs. These are updated to use simpler styles that don't depend on the binding structure.

Differential Revision: https://phabricator.services.mozilla.com/D8752

--HG--
extra : rebase_source : af36d911980517f9b53036f4cd4f800c5e20ad22
2018-10-23 10:14:06 +01:00

142 lines
5.5 KiB
XML

<?xml version="1.0"?>
<!-- -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 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/. -->
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
<?xml-stylesheet href="chrome://browser/skin/sanitizeDialog.css"?>
<?xml-stylesheet href="chrome://browser/content/sanitizeDialog.css"?>
<!DOCTYPE dialog [
<!ENTITY % preferencesDTD SYSTEM "chrome://global/locale/preferences.dtd">
<!ENTITY % globalKeysDTD SYSTEM "chrome://global/locale/globalKeys.dtd">
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
<!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
%preferencesDTD;
%globalKeysDTD;
%brandDTD;
%sanitizeDTD;
]>
<dialog id="SanitizeDialog" type="child"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
buttons="accept,cancel"
persist="lastSelected screenX screenY"
role="dialog"
title="&sanitizeDialog2.title;"
noneverythingtitle="&sanitizeDialog2.title;"
style="width: &sanitizeDialog2.width;;"
onload="gSanitizePromptDialog.init();"
ondialogaccept="return gSanitizePromptDialog.sanitize();">
<stringbundle id="bundleBrowser"
src="chrome://browser/locale/browser.properties"/>
<script type="application/javascript"
src="chrome://global/content/preferencesBindings.js"/>
<script type="application/javascript"
src="chrome://browser/content/sanitizeDialog.js"/>
<hbox id="SanitizeDurationBox" align="center">
<label value="&clearTimeDuration.label;"
accesskey="&clearTimeDuration.accesskey;"
control="sanitizeDurationChoice"
id="sanitizeDurationLabel"/>
<menulist id="sanitizeDurationChoice"
preference="privacy.sanitize.timeSpan"
onselect="gSanitizePromptDialog.selectByTimespan();"
flex="1">
<menupopup id="sanitizeDurationPopup">
<menuitem label="&clearTimeDuration.lastHour;" value="1"/>
<menuitem label="&clearTimeDuration.last2Hours;" value="2"/>
<menuitem label="&clearTimeDuration.last4Hours;" value="3"/>
<menuitem label="&clearTimeDuration.today;" value="4"/>
<menuseparator/>
<menuitem label="&clearTimeDuration.everything;" value="0"/>
</menupopup>
</menulist>
<label id="sanitizeDurationSuffixLabel"
value="&clearTimeDuration.suffix;"/>
</hbox>
<separator class="thin"/>
<vbox id="sanitizeEverythingWarningBox">
<spacer flex="1"/>
<hbox align="center">
<image id="sanitizeEverythingWarningIcon"/>
<vbox id="sanitizeEverythingWarningDescBox" flex="1">
<description id="sanitizeEverythingWarning"/>
<description id="sanitizeEverythingUndoWarning">&sanitizeEverythingUndoWarning;</description>
</vbox>
</hbox>
<spacer flex="1"/>
</vbox>
<separator class="thin"/>
<groupbox>
<caption><label>&historySection.label;</label></caption>
<grid flex="1">
<columns>
<column style="width: &sanitizePrefs2.column.width;"/>
<column flex="1"/>
</columns>
<rows>
<row>
<checkbox label="&itemHistoryAndDownloads.label;"
accesskey="&itemHistoryAndDownloads.accesskey;"
preference="privacy.cpd.history"
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
<checkbox label="&itemCookies.label;"
accesskey="&itemCookies.accesskey;"
preference="privacy.cpd.cookies"
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
</row>
<row>
<checkbox label="&itemActiveLogins.label;"
accesskey="&itemActiveLogins.accesskey;"
preference="privacy.cpd.sessions"
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
<checkbox label="&itemCache.label;"
accesskey="&itemCache.accesskey;"
preference="privacy.cpd.cache"
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
</row>
<row>
<checkbox label="&itemFormSearchHistory.label;"
accesskey="&itemFormSearchHistory.accesskey;"
preference="privacy.cpd.formdata"
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
</row>
</rows>
</grid>
</groupbox>
<groupbox>
<caption><label>&dataSection.label;</label></caption>
<grid flex="1">
<columns>
<column style="width: &sanitizePrefs2.column.width;"/>
<column flex="1"/>
</columns>
<rows>
<row>
<checkbox label="&itemSitePreferences.label;"
accesskey="&itemSitePreferences.accesskey;"
preference="privacy.cpd.siteSettings"
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
<checkbox label="&itemOfflineApps.label;"
accesskey="&itemOfflineApps.accesskey;"
preference="privacy.cpd.offlineApps"
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
</row>
</rows>
</grid>
</groupbox>
</dialog>