Bug 1588142 - about:preferences - migrate the root xul:window element to an html:html element r=Gijs,bgrins
authorKirk Steuber <ksteuber@mozilla.com>
Thu, 14 Nov 2019 00:17:01 +0000
changeset 501863 1f37c31422e2737db9e6bcc9826facd3fdb15bf2
parent 501862 c4ff245706aba8e0dcbcabfadaf4cb752500b9c6
child 501864 27b1ed7098093911513a6e151a91a12535bd2e7e
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, bgrins
bugs1588142
milestone72.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 1588142 - about:preferences - migrate the root xul:window element to an html:html element r=Gijs,bgrins Differential Revision: https://phabricator.services.mozilla.com/D51712
browser/components/preferences/in-content/preferences.xul
browser/themes/linux/preferences/in-content/preferences.css
browser/themes/osx/preferences/in-content/preferences.css
browser/themes/osx/preferences/preferences.css
browser/themes/shared/incontentprefs/preferences.inc.css
browser/themes/windows/preferences/in-content/preferences.css
--- a/browser/components/preferences/in-content/preferences.xul
+++ b/browser/components/preferences/in-content/preferences.xul
@@ -11,62 +11,64 @@
   href="chrome://browser/skin/preferences/in-content/preferences.css"?>
 <?xml-stylesheet
   href="chrome://browser/content/preferences/handlers.css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/applications.css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/in-content/search.css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/in-content/containers.css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/in-content/privacy.css"?>
 
-<!DOCTYPE window>
+<!DOCTYPE html>
 
-<!-- @CSP: The 'oncommand' handler for 'focusSearch1' can not easily be rewritten (see Bug 371900)
-     hence we are allowing the inline handler in the script-src directive using the hash
-     sha512-X8+p/CqXeMdssOoFOf5RV+RpkvnN9pukQ20acGc7LqMgfYLW+lR0WAYT66OtSTpFHE/Qgx/ZCBs2RMc4QrA8FQ==
-     Additionally we should remove 'unsafe-inline' from style-src, see Bug 1579160 -->
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+<html xmlns="http://www.w3.org/1999/xhtml"
         xmlns:html="http://www.w3.org/1999/xhtml"
-        csp="default-src chrome:; script-src chrome: 'sha512-X8+p/CqXeMdssOoFOf5RV+RpkvnN9pukQ20acGc7LqMgfYLW+lR0WAYT66OtSTpFHE/Qgx/ZCBs2RMc4QrA8FQ=='; img-src chrome: moz-icon: https: data:; style-src chrome: data: 'unsafe-inline'; object-src 'none'"
         role="document"
         data-l10n-id="pref-page"
         data-l10n-attrs="title">
 
-  <linkset>
-    <html:link rel="localization" href="branding/brand.ftl"/>
-    <html:link rel="localization" href="browser/branding/brandings.ftl"/>
-    <html:link rel="localization" href="browser/branding/sync-brand.ftl"/>
-    <html:link rel="localization" href="browser/preferences/preferences.ftl"/>
-    <!-- Used by fontbuilder.js -->
-    <html:link rel="localization" href="browser/preferences/fonts.ftl"/>
+<head>
+  <!-- @CSP: The 'oncommand' handler for 'focusSearch1' can not easily be rewritten (see Bug 371900)
+       hence we are allowing the inline handler in the script-src directive using the hash
+       sha512-X8+p/CqXeMdssOoFOf5RV+RpkvnN9pukQ20acGc7LqMgfYLW+lR0WAYT66OtSTpFHE/Qgx/ZCBs2RMc4QrA8FQ==
+       Additionally we should remove 'unsafe-inline' from style-src, see Bug 1579160 -->
+  <meta http-equiv="Content-Security-Policy" content="default-src chrome:; script-src chrome: 'sha512-X8+p/CqXeMdssOoFOf5RV+RpkvnN9pukQ20acGc7LqMgfYLW+lR0WAYT66OtSTpFHE/Qgx/ZCBs2RMc4QrA8FQ=='; img-src chrome: moz-icon: https: data:; style-src chrome: data: 'unsafe-inline'; object-src 'none'" />
+
+  <link rel="localization" href="branding/brand.ftl"/>
+  <link rel="localization" href="browser/branding/brandings.ftl"/>
+  <link rel="localization" href="browser/branding/sync-brand.ftl"/>
+  <link rel="localization" href="browser/preferences/preferences.ftl"/>
+  <!-- Used by fontbuilder.js -->
+  <link rel="localization" href="browser/preferences/fonts.ftl"/>
 
-    <!-- Links below are only used for search-l10n-ids into subdialogs -->
-    <html:link rel="localization" href="browser/preferences/blocklists.ftl"/>
-    <html:link rel="localization" href="browser/preferences/clearSiteData.ftl"/>
-    <html:link rel="localization" href="browser/preferences/colors.ftl"/>
-    <html:link rel="localization" href="browser/preferences/connection.ftl"/>
-    <html:link rel="localization" href="browser/preferences/languages.ftl"/>
-    <html:link rel="localization" href="browser/preferences/permissions.ftl"/>
-    <html:link rel="localization" href="browser/preferences/selectBookmark.ftl"/>
-    <html:link rel="localization" href="browser/preferences/siteDataSettings.ftl"/>
-    <html:link rel="localization" href="browser/aboutDialog.ftl"/>
-    <html:link rel="localization" href="browser/sanitize.ftl"/>
-    <html:link rel="localization" href="toolkit/updates/history.ftl"/>
-    <html:link rel="localization" href="security/certificates/deviceManager.ftl"/>
-    <html:link rel="localization" href="security/certificates/certManager.ftl"/>
-  </linkset>
+  <!-- Links below are only used for search-l10n-ids into subdialogs -->
+  <link rel="localization" href="browser/preferences/blocklists.ftl"/>
+  <link rel="localization" href="browser/preferences/clearSiteData.ftl"/>
+  <link rel="localization" href="browser/preferences/colors.ftl"/>
+  <link rel="localization" href="browser/preferences/connection.ftl"/>
+  <link rel="localization" href="browser/preferences/languages.ftl"/>
+  <link rel="localization" href="browser/preferences/permissions.ftl"/>
+  <link rel="localization" href="browser/preferences/selectBookmark.ftl"/>
+  <link rel="localization" href="browser/preferences/siteDataSettings.ftl"/>
+  <link rel="localization" href="browser/aboutDialog.ftl"/>
+  <link rel="localization" href="browser/sanitize.ftl"/>
+  <link rel="localization" href="toolkit/updates/history.ftl"/>
+  <link rel="localization" href="security/certificates/deviceManager.ftl"/>
+  <link rel="localization" href="security/certificates/certManager.ftl"/>
 
-  <html:link rel="shortcut icon"
-              href="chrome://browser/skin/settings.svg"/>
+  <link rel="shortcut icon" href="chrome://browser/skin/settings.svg"/>
 
   <script src="chrome://browser/content/utilityOverlay.js"/>
   <script src="chrome://global/content/preferencesBindings.js"/>
   <script src="chrome://browser/content/preferences/in-content/preferences.js"/>
   <script src="chrome://browser/content/preferences/in-content/extensionControlled.js"/>
   <script src="chrome://browser/content/preferences/in-content/findInPage.js"/>
   <script src="chrome://browser/content/preferences/in-content/subdialogs.js"/>
+</head>
+
+<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <stringbundle id="pkiBundle"
                 src="chrome://pippki/locale/pippki.properties"/>
   <stringbundle id="browserBundle"
                 src="chrome://browser/locale/browser.properties"/>
 
   <stack id="preferences-stack" flex="1">
   <hbox flex="1">
@@ -212,9 +214,10 @@
                 data-l10n-id="close-button"/>
       </hbox>
       <browser class="dialogFrame"
                autoscroll="false"
                disablehistory="true"/>
     </vbox>
   </vbox>
   </stack>
-</window>
+</html:body>
+</html>
--- a/browser/themes/linux/preferences/in-content/preferences.css
+++ b/browser/themes/linux/preferences/in-content/preferences.css
@@ -1,15 +1,15 @@
 /* - 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/. */
 
 %include ../../../shared/incontentprefs/preferences.inc.css
 
-:root > * {
+body {
   font-size: 1.11em;
 }
 
 .treecol-sortdirection {
   /* override the Linux only toolkit rule */
   -moz-appearance: none;
 }
 
--- a/browser/themes/osx/preferences/in-content/preferences.css
+++ b/browser/themes/osx/preferences/in-content/preferences.css
@@ -1,15 +1,15 @@
 /* - 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/. */
 
 %include ../../../shared/incontentprefs/preferences.inc.css
 
-:root > * {
+body {
   font-size: 1.36em;
 }
 
 .actionsMenu > .menulist-label-box > .menulist-icon {
   margin-top: 2px;
   margin-inline-start: 2px;
   margin-inline-end: 8px !important;
 }
--- a/browser/themes/osx/preferences/preferences.css
+++ b/browser/themes/osx/preferences/preferences.css
@@ -2,17 +2,17 @@
 # -*- 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/.
 */
 
 %include ../../../../toolkit/themes/osx/global/shared.inc
 
-window {
+:root {
   font: -moz-dialog;
 }
 
 tabpanels {
   padding: 20px 7px 7px;
 }
 
 #popupPolicyRow {
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -2,26 +2,41 @@
 /* - 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/. */
 %endif
 @namespace html "http://www.w3.org/1999/xhtml";
 
 :root {
   --in-content-warning-container: var(--grey-20);
+  text-rendering: optimizeLegibility;
 }
 
 @supports -moz-bool-pref("browser.in-content.dark-mode") {
 @media (prefers-color-scheme: dark) {
   :root {
     --in-content-warning-container: var(--grey-90-a30);
   }
 }
 }
 
+:root,
+body {
+  margin: 0;
+  padding: 0;
+  height: 100%;
+  width: 100%;
+  overflow: hidden;
+}
+
+body {
+  display: -moz-box;
+  -moz-box-orient: vertical;
+}
+
 * {
   -moz-user-select: text;
 }
 
 /*
   The default min-height:auto value makes grid items (and XUL flex items) refuse
   to be smaller than their content. In this case, we have some tall very content
   inside of us, and yet we don't want to be taller than the viewport (and we know
--- a/browser/themes/windows/preferences/in-content/preferences.css
+++ b/browser/themes/windows/preferences/in-content/preferences.css
@@ -1,13 +1,13 @@
 /* - 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/. */
 
 %include ../../../shared/incontentprefs/preferences.inc.css
 
-:root > * {
+body {
   font-size: 1.25em;
 }
 
 .actionsMenu > .menulist-label-box > .menulist-icon {
   margin-inline-end: 9px;
 }