Bug 1493844 - Part 3 - Remove the "prefpane" class and unneeded elements. r=jaws
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Mon, 15 Oct 2018 19:01:59 +0100
changeset 490754 ff4c77d7c5ea2cb88d321f44bd9d80ac5c3ab08a
parent 490753 e6a310eb8e42c16180e6fd1c9539e7a751f07c69
child 490851 141e6f82a895f2f044ae87df08f7b9d69f59564c
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersjaws
bugs1493844
milestone65.0a1
Bug 1493844 - Part 3 - Remove the "prefpane" class and unneeded elements. r=jaws Differential Revision: https://phabricator.services.mozilla.com/D7734
browser/base/content/sanitize.xul
browser/components/preferences/blocklists.xul
browser/components/preferences/browserLanguages.xul
browser/components/preferences/clearSiteData.xul
browser/components/preferences/colors.xul
browser/components/preferences/connection.xul
browser/components/preferences/containers.xul
browser/components/preferences/fonts.xul
browser/components/preferences/in-content/preferences.xul
browser/components/preferences/in-content/subdialogs.js
browser/components/preferences/in-content/syncDisconnect.xul
browser/components/preferences/languages.xul
browser/components/preferences/permissions.xul
browser/components/preferences/sanitize.xul
browser/components/preferences/siteDataSettings.xul
browser/components/preferences/sitePermissions.xul
browser/components/preferences/translation.xul
browser/themes/linux/preferences/preferences.css
browser/themes/osx/preferences/in-content/dialog.css
browser/themes/osx/preferences/preferences.css
browser/themes/shared/incontentprefs/dialog.inc.css
browser/themes/shared/incontentprefs/preferences.inc.css
browser/themes/windows/preferences/preferences.css
toolkit/themes/shared/passwordmgr.css
--- a/browser/base/content/sanitize.xul
+++ b/browser/base/content/sanitize.xul
@@ -18,128 +18,124 @@
   <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
   <!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
   %preferencesDTD;
   %globalKeysDTD;
   %brandDTD;
   %sanitizeDTD;
 ]>
 
-<dialog id="SanitizeDialog" class="prefwindow" type="child"
+<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();">
 
-  <vbox id="SanitizeDialogPane" class="prefpane">
-    <stringbundle id="bundleBrowser"
-                  src="chrome://browser/locale/browser.properties"/>
+  <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"/>
+  <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 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>
-
-    <separator class="thin"/>
-
+    <spacer flex="1"/>
+  </vbox>
 
-      <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"/>
+  <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>
-  </vbox>
+  <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>
--- a/browser/components/preferences/blocklists.xul
+++ b/browser/components/preferences/blocklists.xul
@@ -2,17 +2,17 @@
 
 <!-- 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/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
 
-<window id="BlocklistsDialog" class="windowDialog"
+<window id="BlocklistsDialog"
         windowtype="Browser:Blocklists"
         data-l10n-id="blocklist-window"
         data-l10n-attrs="title, style"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="gBlocklistManager.onLoad();"
         onunload="gBlocklistManager.uninit();"
         persist="screenX screenY width height"
         onkeypress="gBlocklistManager.onWindowKeyPress(event);">
@@ -23,33 +23,31 @@
   </linkset>
 
   <script src="chrome://browser/content/preferences/blocklists.js"/>
 
   <keyset>
     <key data-l10n-id="blocklist-close-key" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
-  <vbox class="contentPane largeDialogContainer" flex="1">
+  <vbox class="contentPane">
     <description id="blocklistsText" data-l10n-id="blocklist-desc" control="url"/>
     <separator class="thin"/>
     <tree id="blocklistsTree" flex="1" style="height: 18em;"
           hidecolumnpicker="true"
           onselect="gBlocklistManager.onListSelected();">
       <treecols>
         <treecol id="selectionCol" label="" flex="1" sortable="false"
                  type="checkbox"/>
         <treecol id="listCol" data-l10n-id="blocklist-treehead-list" flex="80"
                  sortable="false"/>
       </treecols>
       <treechildren/>
     </tree>
   </vbox>
-  <vbox>
-    <spacer flex="1"/>
-    <hbox class="actionButtons" align="right" flex="1">
-      <button oncommand="close();" icon="close"
-              data-l10n-id="blocklist-button-cancel"/>
-      <button id="btnApplyChanges" oncommand="gBlocklistManager.onApplyChanges();" icon="save"
-              data-l10n-id="blocklist-button-ok"/>
-    </hbox>
-  </vbox>
+
+  <hbox class="actionButtons" align="right" flex="1">
+    <button oncommand="close();" icon="close"
+            data-l10n-id="blocklist-button-cancel"/>
+    <button id="btnApplyChanges" oncommand="gBlocklistManager.onApplyChanges();" icon="save"
+            data-l10n-id="blocklist-button-ok"/>
+  </hbox>
 </window>
--- a/browser/components/preferences/browserLanguages.xul
+++ b/browser/components/preferences/browserLanguages.xul
@@ -2,17 +2,17 @@
 
 <!-- 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"?>
 
-<dialog id="BrowserLanguagesDialog" type="child" class="prefwindow"
+<dialog id="BrowserLanguagesDialog" type="child"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         data-l10n-id="browser-languages-window"
         data-l10n-attrs="title, style"
         buttons="accept,cancel,help"
         persist="screenX screenY"
         role="dialog"
         onload="gBrowserLanguagesDialog.onLoad();"
         onbeforeaccept="return gBrowserLanguagesDialog.beforeAccept();"
@@ -23,47 +23,45 @@
     <link rel="localization" href="branding/brand.ftl"/>
     <link rel="localization" href="browser/preferences/languages.ftl"/>
   </linkset>
 
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
   <script type="application/javascript" src="chrome://browser/content/preferences/browserLanguages.js"/>
 
-  <vbox id="BrowserLanguagesDialogPane" class="prefpane largeDialogContainer">
-    <description data-l10n-id="browser-languages-description"/>
+  <description data-l10n-id="browser-languages-description"/>
 
-    <grid flex="1">
-      <columns>
-        <column flex="1"/>
-        <column/>
-      </columns>
-      <rows>
-        <row>
-          <richlistbox id="requestedLocales"/>
-          <vbox>
-            <button id="up" class="action-button" disabled="true" data-l10n-id="languages-customize-moveup"/>
-            <button id="down" class="action-button" disabled="true" data-l10n-id="languages-customize-movedown"/>
-            <button id="remove" class="action-button" disabled="true" data-l10n-id="languages-customize-remove"/>
-          </vbox>
-        </row>
-        <row>
-          <menulist id="availableLocales"
-                    class="available-locales-list"
-                    data-l10n-id="browser-languages-select-language"
-                    data-l10n-attrs="placeholder,label">
-            <menupopup/>
-          </menulist>
-          <button id="add"
-                  class="add-browser-language action-button"
-                  data-l10n-id="languages-customize-add"
-                  disabled="true"/>
-        </row>
-      </rows>
-    </grid>
-    <separator class="warning-message-separator"/>
-    <hbox id="warning-message" class="message-bar message-bar-warning" hidden="true">
-      <image class="message-bar-icon"/>
-      <description class="message-bar-description" data-l10n-id="browser-languages-error"/>
-    </hbox>
-    <separator class="warning-message-separator"/>
-  </vbox>
+  <grid flex="1">
+    <columns>
+      <column flex="1"/>
+      <column/>
+    </columns>
+    <rows>
+      <row>
+        <richlistbox id="requestedLocales"/>
+        <vbox>
+          <button id="up" class="action-button" disabled="true" data-l10n-id="languages-customize-moveup"/>
+          <button id="down" class="action-button" disabled="true" data-l10n-id="languages-customize-movedown"/>
+          <button id="remove" class="action-button" disabled="true" data-l10n-id="languages-customize-remove"/>
+        </vbox>
+      </row>
+      <row>
+        <menulist id="availableLocales"
+                  class="available-locales-list"
+                  data-l10n-id="browser-languages-select-language"
+                  data-l10n-attrs="placeholder,label">
+          <menupopup/>
+        </menulist>
+        <button id="add"
+                class="add-browser-language action-button"
+                data-l10n-id="languages-customize-add"
+                disabled="true"/>
+      </row>
+    </rows>
+  </grid>
+  <separator class="warning-message-separator"/>
+  <hbox id="warning-message" class="message-bar message-bar-warning" hidden="true">
+    <image class="message-bar-icon"/>
+    <description class="message-bar-description" data-l10n-id="browser-languages-error"/>
+  </hbox>
+  <separator class="warning-message-separator"/>
 </dialog>
--- a/browser/components/preferences/clearSiteData.xul
+++ b/browser/components/preferences/clearSiteData.xul
@@ -3,48 +3,47 @@
 <!-- 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/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/preferences/clearSiteData.css" type="text/css"?>
 
-<window id="ClearSiteDataDialog" class="windowDialog"
+<window id="ClearSiteDataDialog"
         windowtype="Browser:ClearSiteData"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         data-l10n-id="clear-site-data-window"
         data-l10n-attrs="title, style"
         persist="screenX screenY width height">
 
   <linkset>
     <link rel="localization" href="branding/brand.ftl"/>
     <link rel="localization" href="browser/preferences/clearSiteData.ftl"/>
   </linkset>
   <script src="chrome://browser/content/preferences/clearSiteData.js"/>
 
   <keyset>
     <key data-l10n-id="clear-site-data-close-key" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
-  <vbox class="contentPane largeDialogContainer" flex="1">
+  <vbox class="contentPane">
     <description control="url" data-l10n-id="clear-site-data-description"/>
     <separator class="thin"/>
     <vbox class="options-container">
       <vbox class="option">
         <checkbox data-l10n-id="clear-site-data-cookies-empty" id="clearSiteData" checked="true"/>
         <description class="option-description indent" data-l10n-id="clear-site-data-cookies-info"/>
       </vbox>
       <vbox class="option">
         <checkbox data-l10n-id="clear-site-data-cache-empty" id="clearCache" checked="true"/>
         <description class="option-description indent" data-l10n-id="clear-site-data-cache-info"/>
       </vbox>
     </vbox>
   </vbox>
-  <vbox>
-    <hbox class="actionButtons" align="right" flex="1">
-      <button id="cancelButton" icon="close"
-              data-l10n-id="clear-site-data-cancel"/>
-      <button id="clearButton" icon="save"
-              data-l10n-id="clear-site-data-clear"/>
-    </hbox>
-  </vbox>
+
+  <hbox class="actionButtons" align="right" flex="1">
+    <button id="cancelButton" icon="close"
+            data-l10n-id="clear-site-data-cancel"/>
+    <button id="clearButton" icon="save"
+            data-l10n-id="clear-site-data-clear"/>
+  </hbox>
 </window>
--- a/browser/components/preferences/colors.xul
+++ b/browser/components/preferences/colors.xul
@@ -25,17 +25,17 @@
 
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
 
   <keyset>
     <key data-l10n-id="colors-close-key" modifiers="accel" oncommand="Preferences.close(event)"/>
   </keyset>
 
-  <vbox id="ColorsDialogPane" class="prefpane">
+  <vbox>
 
     <script type="application/javascript" src="chrome://browser/content/preferences/colors.js"/>
 
     <hbox>
       <groupbox flex="1">
         <caption><label data-l10n-id="colors-text-and-background"/></caption>
         <hbox align="center">
           <label data-l10n-id="colors-text-header" control="foregroundtextmenu"/>
--- a/browser/components/preferences/connection.xul
+++ b/browser/components/preferences/connection.xul
@@ -2,165 +2,161 @@
 
 <!-- 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"?>
 
-<dialog id="ConnectionsDialog" type="child" class="prefwindow"
+<dialog id="ConnectionsDialog" type="child"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         data-l10n-id="connection-window"
         data-l10n-attrs="title, style"
         buttons="accept,cancel,help"
         persist="lastSelected screenX screenY"
         role="dialog"
         onbeforeaccept="return gConnectionsDialog.beforeAccept();"
         onload="gConnectionsDialog.checkForSystemProxy();"
         helpTopic="prefs-connection-settings"
         ondialoghelp="openPrefsHelp()">
 
-
   <!-- Used for extension-controlled lockdown message -->
   <linkset>
     <link rel="localization" href="browser/preferences/connection.ftl"/>
     <link rel="localization" href="browser/preferences/preferences.ftl"/>
     <link rel="localization" href="branding/brand.ftl"/>
   </linkset>
 
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
   <script type="application/javascript" src="chrome://browser/content/preferences/in-content/extensionControlled.js"/>
 
   <keyset>
     <key data-l10n-id="connection-close-key" modifiers="accel" oncommand="Preferences.close(event)"/>
   </keyset>
 
-  <vbox id="ConnectionsDialogPane" class="prefpane largeDialogContainer">
-    <script type="application/javascript" src="chrome://browser/content/preferences/connection.js"/>
+  <script type="application/javascript" src="chrome://browser/content/preferences/connection.js"/>
 
-    <hbox id="proxyExtensionContent"
-          align="top" hidden="true" class="extension-controlled">
-      <description control="disableProxyExtension" flex="1" />
-      <button id="disableProxyExtension"
-              class="extension-controlled-button accessory-button"
-              data-l10n-id="connection-disable-extension" />
-    </hbox>
+  <hbox id="proxyExtensionContent"
+        align="top" hidden="true" class="extension-controlled">
+    <description control="disableProxyExtension" flex="1" />
+    <button id="disableProxyExtension"
+            class="extension-controlled-button accessory-button"
+            data-l10n-id="connection-disable-extension" />
+  </hbox>
 
     <groupbox>
       <caption><label data-l10n-id="connection-proxy-configure" /></caption>
 
-      <radiogroup id="networkProxyType" preference="network.proxy.type"
-                  onsyncfrompreference="return gConnectionsDialog.readProxyType();">
-        <radio value="0" data-l10n-id="connection-proxy-option-no" />
-        <radio value="4" data-l10n-id="connection-proxy-option-auto" />
-        <radio value="5" data-l10n-id="connection-proxy-option-system" id="systemPref" hidden="true" />
-        <radio value="1" data-l10n-id="connection-proxy-option-manual"/>
-        <grid class="indent" flex="1">
-          <columns>
-            <column/>
-            <column flex="1"/>
-          </columns>
-          <rows>
-            <row align="center">
-              <hbox pack="end">
-                <label data-l10n-id="connection-proxy-http" control="networkProxyHTTP" />
-              </hbox>
-              <hbox align="center">
-                <textbox id="networkProxyHTTP" flex="1"
-                         preference="network.proxy.http" onsyncfrompreference="return gConnectionsDialog.readHTTPProxyServer();"/>
-                <label data-l10n-id="connection-proxy-http-port" control="networkProxyHTTP_Port" />
-                <textbox id="networkProxyHTTP_Port" class="proxy-port-input" type="number" max="65535" hidespinbuttons="true"
-                         preference="network.proxy.http_port" onsyncfrompreference="return gConnectionsDialog.readHTTPProxyPort();"/>
-              </hbox>
-            </row>
-            <row>
-              <hbox/>
-              <hbox>
-                <checkbox id="shareAllProxies" data-l10n-id="connection-proxy-http-share"
-                          preference="network.proxy.share_proxy_settings"
-                          onsyncfrompreference="return gConnectionsDialog.updateProtocolPrefs();"/>
-              </hbox>
-            </row>
-            <row align="center">
-              <hbox pack="end">
-                <label data-l10n-id="connection-proxy-ssl" control="networkProxySSL"/>
-              </hbox>
-              <hbox align="center">
-                <textbox id="networkProxySSL" flex="1" preference="network.proxy.ssl"
-                         onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', false);"/>
-                <label data-l10n-id="connection-proxy-ssl-port" control="networkProxySSL_Port" />
-                <textbox id="networkProxySSL_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.ssl_port"
-                         hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', true);"/>
-              </hbox>
-            </row>
-            <row align="center">
-              <hbox pack="end">
-                <label data-l10n-id="connection-proxy-ftp" control="networkProxyFTP"/>
-              </hbox>
-              <hbox align="center">
-                <textbox id="networkProxyFTP" flex="1" preference="network.proxy.ftp"
-                         onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', false);"/>
-                <label data-l10n-id="connection-proxy-ftp-port" control="networkProxyFTP_Port"/>
-                <textbox id="networkProxyFTP_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.ftp_port"
-                         hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', true);"/>
-              </hbox>
-            </row>
-            <row align="center">
-              <hbox pack="end">
-                <label data-l10n-id="connection-proxy-socks" control="networkProxySOCKS"/>
-              </hbox>
-              <hbox align="center">
-                <textbox id="networkProxySOCKS" flex="1" preference="network.proxy.socks"
-                         onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', false);"/>
-                <label data-l10n-id="connection-proxy-socks-port" control="networkProxySOCKS_Port"/>
-                <textbox id="networkProxySOCKS_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.socks_port"
-                         hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', true);"/>
-              </hbox>
-            </row>
-            <row>
-              <spacer/>
-              <box pack="start">
-              <radiogroup id="networkProxySOCKSVersion" orient="horizontal"
-                          preference="network.proxy.socks_version">
-                <radio id="networkProxySOCKSVersion4" value="4" data-l10n-id="connection-proxy-socks4" />
-                <radio id="networkProxySOCKSVersion5" value="5" data-l10n-id="connection-proxy-socks5" />
-              </radiogroup>
-              </box>
-            </row>
-            <label data-l10n-id="connection-proxy-noproxy" control="networkProxyNone"/>
-            <textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/>
-            <label control="networkProxyNone" data-l10n-id="connection-proxy-noproxy-desc" />
-          </rows>
-        </grid>
-        <radio value="2" data-l10n-id="connection-proxy-autotype" />
-        <hbox class="indent" flex="1" align="center">
-          <textbox id="networkProxyAutoconfigURL" flex="1" preference="network.proxy.autoconfig_url"
-                   oninput="gConnectionsDialog.updateReloadButton();"/>
-          <button id="autoReload" icon="refresh"
-                  data-l10n-id="connection-proxy-reload"
-                  oncommand="gConnectionsDialog.reloadPAC();"
-                  preference="pref.advanced.proxies.disable_button.reload"/>
-        </hbox>
-      </radiogroup>
+  <radiogroup id="networkProxyType" preference="network.proxy.type"
+              onsyncfrompreference="return gConnectionsDialog.readProxyType();">
+    <radio value="0" data-l10n-id="connection-proxy-option-no" />
+    <radio value="4" data-l10n-id="connection-proxy-option-auto" />
+    <radio value="5" data-l10n-id="connection-proxy-option-system" id="systemPref" hidden="true" />
+    <radio value="1" data-l10n-id="connection-proxy-option-manual"/>
+    <grid class="indent" flex="1">
+      <columns>
+        <column/>
+        <column flex="1"/>
+      </columns>
+      <rows>
+        <row align="center">
+          <hbox pack="end">
+            <label data-l10n-id="connection-proxy-http" control="networkProxyHTTP" />
+          </hbox>
+          <hbox align="center">
+            <textbox id="networkProxyHTTP" flex="1"
+                     preference="network.proxy.http" onsyncfrompreference="return gConnectionsDialog.readHTTPProxyServer();"/>
+            <label data-l10n-id="connection-proxy-http-port" control="networkProxyHTTP_Port" />
+            <textbox id="networkProxyHTTP_Port" class="proxy-port-input" type="number" max="65535" hidespinbuttons="true"
+                     preference="network.proxy.http_port" onsyncfrompreference="return gConnectionsDialog.readHTTPProxyPort();"/>
+          </hbox>
+        </row>
+        <row>
+          <hbox/>
+          <hbox>
+            <checkbox id="shareAllProxies" data-l10n-id="connection-proxy-http-share"
+                      preference="network.proxy.share_proxy_settings"
+                      onsyncfrompreference="return gConnectionsDialog.updateProtocolPrefs();"/>
+          </hbox>
+        </row>
+        <row align="center">
+          <hbox pack="end">
+            <label data-l10n-id="connection-proxy-ssl" control="networkProxySSL"/>
+          </hbox>
+          <hbox align="center">
+            <textbox id="networkProxySSL" flex="1" preference="network.proxy.ssl"
+                     onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', false);"/>
+            <label data-l10n-id="connection-proxy-ssl-port" control="networkProxySSL_Port" />
+            <textbox id="networkProxySSL_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.ssl_port"
+                     hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', true);"/>
+          </hbox>
+        </row>
+        <row align="center">
+          <hbox pack="end">
+            <label data-l10n-id="connection-proxy-ftp" control="networkProxyFTP"/>
+          </hbox>
+          <hbox align="center">
+            <textbox id="networkProxyFTP" flex="1" preference="network.proxy.ftp"
+                     onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', false);"/>
+            <label data-l10n-id="connection-proxy-ftp-port" control="networkProxyFTP_Port"/>
+            <textbox id="networkProxyFTP_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.ftp_port"
+                     hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', true);"/>
+          </hbox>
+        </row>
+        <row align="center">
+          <hbox pack="end">
+            <label data-l10n-id="connection-proxy-socks" control="networkProxySOCKS"/>
+          </hbox>
+          <hbox align="center">
+            <textbox id="networkProxySOCKS" flex="1" preference="network.proxy.socks"
+                     onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', false);"/>
+            <label data-l10n-id="connection-proxy-socks-port" control="networkProxySOCKS_Port"/>
+            <textbox id="networkProxySOCKS_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.socks_port"
+                     hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', true);"/>
+          </hbox>
+        </row>
+        <row>
+          <spacer/>
+          <box pack="start">
+          <radiogroup id="networkProxySOCKSVersion" orient="horizontal"
+                      preference="network.proxy.socks_version">
+            <radio id="networkProxySOCKSVersion4" value="4" data-l10n-id="connection-proxy-socks4" />
+            <radio id="networkProxySOCKSVersion5" value="5" data-l10n-id="connection-proxy-socks5" />
+          </radiogroup>
+          </box>
+        </row>
+        <label data-l10n-id="connection-proxy-noproxy" control="networkProxyNone"/>
+        <textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/>
+        <label control="networkProxyNone" data-l10n-id="connection-proxy-noproxy-desc" />
+      </rows>
+    </grid>
+    <radio value="2" data-l10n-id="connection-proxy-autotype" />
+    <hbox class="indent" flex="1" align="center">
+      <textbox id="networkProxyAutoconfigURL" flex="1" preference="network.proxy.autoconfig_url"
+               oninput="gConnectionsDialog.updateReloadButton();"/>
+      <button id="autoReload" icon="refresh"
+              data-l10n-id="connection-proxy-reload"
+              oncommand="gConnectionsDialog.reloadPAC();"
+              preference="pref.advanced.proxies.disable_button.reload"/>
+    </hbox>
+  </radiogroup>
     </groupbox>
-    <separator class="thin"/>
-    <checkbox id="autologinProxy"
-              data-l10n-id="connection-proxy-autologin"
-              preference="signon.autologin.proxy" />
-    <checkbox id="networkProxySOCKSRemoteDNS"
-              preference="network.proxy.socks_remote_dns"
-              data-l10n-id="connection-proxy-socks-remote-dns" />
-    <checkbox id="networkDnsOverHttps"
-              data-l10n-id="connection-dns-over-https"
-              preference="network.trr.mode"
-              onsyncfrompreference="return gConnectionsDialog.readDnsOverHttpsMode();"
-              onsynctopreference="return gConnectionsDialog.writeDnsOverHttpsMode()" />
-    <hbox class="indent" flex="1" align="center">
-      <label control="networkDnsOverHttpsUrl" data-l10n-id="connection-dns-over-https-url"
-             data-l10n-attrs="tooltiptext"/>
-      <textbox id="networkDnsOverHttpsUrl" flex="1" preference="network.trr.uri"
-               onsynctopreference="return gConnectionsDialog.writeDnsOverHttpsUri()" />
-    </hbox>
-    <separator/>
-  </vbox>
+  <separator class="thin"/>
+  <checkbox id="autologinProxy"
+            data-l10n-id="connection-proxy-autologin"
+            preference="signon.autologin.proxy" />
+  <checkbox id="networkProxySOCKSRemoteDNS"
+            preference="network.proxy.socks_remote_dns"
+            data-l10n-id="connection-proxy-socks-remote-dns" />
+  <checkbox id="networkDnsOverHttps"
+            data-l10n-id="connection-dns-over-https"
+            preference="network.trr.mode"
+            onsyncfrompreference="return gConnectionsDialog.readDnsOverHttpsMode();"
+            onsynctopreference="return gConnectionsDialog.writeDnsOverHttpsMode()" />
+  <hbox class="indent" flex="1" align="center">
+    <label control="networkDnsOverHttpsUrl" data-l10n-id="connection-dns-over-https-url"
+           data-l10n-attrs="tooltiptext"/>
+    <textbox id="networkDnsOverHttpsUrl" flex="1" preference="network.trr.uri"
+             onsynctopreference="return gConnectionsDialog.writeDnsOverHttpsUri()" />
+  </hbox>
 </dialog>
--- a/browser/components/preferences/containers.xul
+++ b/browser/components/preferences/containers.xul
@@ -2,17 +2,17 @@
 
 <!-- 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/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/containers.css" type="text/css"?>
 
-<window id="ContainersDialog" class="windowDialog"
+<window id="ContainersDialog"
         windowtype="Browser:Permissions"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         data-l10n-attrs="title, style"
         onload="gContainersManager.onLoad();"
         onunload="gContainersManager.uninit();"
         persist="screenX screenY width height"
         onkeypress="gContainersManager.onWindowKeyPress(event);">
 
@@ -21,17 +21,17 @@
   </linkset>
 
   <script src="chrome://browser/content/preferences/containers.js"/>
 
   <keyset>
     <key data-l10n-id="containers-window-close" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
-  <vbox class="contentPane largeDialogContainer" flex="1" hidden="true" id="containers-content">
+  <vbox class="contentPane" hidden="true" id="containers-content">
     <hbox align="start">
       <label id="nameLabel" control="name"
              data-l10n-id="containers-name-label"
              data-l10n-attrs="style"/>
       <textbox id="name" data-l10n-id="containers-name-text" flex="1" oninput="gContainersManager.checkForm();" />
     </hbox>
     <hbox align="center" id="iconWrapper">
       <label id="iconLabel" control="icon"
@@ -39,15 +39,14 @@
              data-l10n-attrs="style"/>
     </hbox>
     <hbox align="center" id="colorWrapper">
       <label id="colorLabel" control="color"
              data-l10n-id="containers-color-label"
              data-l10n-attrs="style"/>
     </hbox>
   </vbox>
-  <vbox>
-    <hbox class="actionButtons" align="right" flex="1">
-      <button id="btnApplyChanges" disabled="true" oncommand="gContainersManager.onApplyChanges();" icon="save"
-              data-l10n-id="containers-button-done"/>
-    </hbox>
-  </vbox>
+
+  <hbox class="actionButtons" align="right" flex="1">
+    <button id="btnApplyChanges" disabled="true" oncommand="gContainersManager.onApplyChanges();" icon="save"
+            data-l10n-id="containers-button-done"/>
+  </hbox>
 </window>
--- a/browser/components/preferences/fonts.xul
+++ b/browser/components/preferences/fonts.xul
@@ -3,17 +3,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/. -->
 
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
 
-<dialog id="FontsDialog" type="child" class="prefwindow"
+<dialog id="FontsDialog" type="child"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         data-l10n-id="fonts-window"
         data-l10n-attrs="title"
         buttons="accept,cancel,help"
         persist="lastSelected screenX screenY"
         role="dialog"
         helpTopic="prefs-fonts-and-colors"
         ondialoghelp="openPrefsHelp()">
@@ -24,203 +24,97 @@
 
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
 
   <keyset>
     <key data-l10n-id="fonts-window-close" modifiers="accel" oncommand="Preferences.close(event)"/>
   </keyset>
 
-  <vbox id="FontsDialogPane" class="prefpane largeDialogContainer">
-
-    <script type="application/javascript" src="chrome://mozapps/content/preferences/fontbuilder.js"/>
-    <script type="application/javascript" src="chrome://browser/content/preferences/fonts.js"/>
-
-    <!-- Fonts for: [ Language ] -->
-    <groupbox>
-      <caption>
-        <hbox align="center">
-          <label data-l10n-id="fonts-langgroup-header" control="selectLangs"/>
-        </hbox>
-        <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
-        <hbox>
-          <menulist id="selectLangs" preference="font.language.group"
-                    onsyncfrompreference="return gFontsDialog.readFontLanguageGroup();">
-            <menupopup>
-              <menuitem value="ar"              data-l10n-id="fonts-langgroup-arabic"/>
-              <menuitem value="x-armn"          data-l10n-id="fonts-langgroup-armenian"/>
-              <menuitem value="x-beng"          data-l10n-id="fonts-langgroup-bengali"/>
-              <menuitem value="zh-CN"           data-l10n-id="fonts-langgroup-simpl-chinese"/>
-              <menuitem value="zh-HK"           data-l10n-id="fonts-langgroup-trad-chinese-hk"/>
-              <menuitem value="zh-TW"           data-l10n-id="fonts-langgroup-trad-chinese"/>
-              <menuitem value="x-cyrillic"      data-l10n-id="fonts-langgroup-cyrillic"/>
-              <menuitem value="x-devanagari"    data-l10n-id="fonts-langgroup-devanagari"/>
-              <menuitem value="x-ethi"          data-l10n-id="fonts-langgroup-ethiopic"/>
-              <menuitem value="x-geor"          data-l10n-id="fonts-langgroup-georgian"/>
-              <menuitem value="el"              data-l10n-id="fonts-langgroup-el"/>
-              <menuitem value="x-gujr"          data-l10n-id="fonts-langgroup-gujarati"/>
-              <menuitem value="x-guru"          data-l10n-id="fonts-langgroup-gurmukhi"/>
-              <menuitem value="he"              data-l10n-id="fonts-langgroup-hebrew"/>
-              <menuitem value="ja"              data-l10n-id="fonts-langgroup-japanese"/>
-              <menuitem value="x-knda"          data-l10n-id="fonts-langgroup-kannada"/>
-              <menuitem value="x-khmr"          data-l10n-id="fonts-langgroup-khmer"/>
-              <menuitem value="ko"              data-l10n-id="fonts-langgroup-korean"/>
-              <menuitem value="x-western"       data-l10n-id="fonts-langgroup-latin"/>
-              <menuitem value="x-mlym"          data-l10n-id="fonts-langgroup-malayalam"/>
-              <menuitem value="x-math"          data-l10n-id="fonts-langgroup-math"/>
-              <menuitem value="x-orya"          data-l10n-id="fonts-langgroup-odia"/>
-              <menuitem value="x-sinh"          data-l10n-id="fonts-langgroup-sinhala"/>
-              <menuitem value="x-tamil"         data-l10n-id="fonts-langgroup-tamil"/>
-              <menuitem value="x-telu"          data-l10n-id="fonts-langgroup-telugu"/>
-              <menuitem value="th"              data-l10n-id="fonts-langgroup-thai"/>
-              <menuitem value="x-tibt"          data-l10n-id="fonts-langgroup-tibetan"/>
-              <menuitem value="x-cans"          data-l10n-id="fonts-langgroup-canadian"/>
-              <menuitem value="x-unicode"       data-l10n-id="fonts-langgroup-other"/>
-            </menupopup>
-          </menulist>
-        </hbox>
-      </caption>
-
-      <grid>
-        <columns>
-          <column/>
-          <column flex="1"/>
-          <column/>
-          <column/>
-        </columns>
-
-        <rows>
-          <row>
-            <separator class="thin"/>
-          </row>
+  <script type="application/javascript" src="chrome://mozapps/content/preferences/fontbuilder.js"/>
+  <script type="application/javascript" src="chrome://browser/content/preferences/fonts.js"/>
 
-          <row align="center">
-            <hbox align="center" pack="end">
-              <label data-l10n-id="fonts-proportional-header" control="defaultFontType"/>
-            </hbox>
-            <!-- This <hbox> is needed to position search tooltips correctly. -->
-            <hbox>
-              <menulist id="defaultFontType" flex="1" style="width: 0px;">
-                <menupopup>
-                  <menuitem value="serif" data-l10n-id="fonts-default-serif"/>
-                  <menuitem value="sans-serif" data-l10n-id="fonts-default-sans-serif"/>
-                </menupopup>
-              </menulist>
-            </hbox>
-            <hbox align="center" pack="end">
-              <label data-l10n-id="fonts-proportional-size" control="sizeVar"/>
-            </hbox>
-            <!-- This <hbox> is needed to position search tooltips correctly. -->
-            <hbox>
-              <menulist id="sizeVar" delayprefsave="true">
-                <menupopup>
-                  <menuitem value="9" label="9"/>
-                  <menuitem value="10" label="10"/>
-                  <menuitem value="11" label="11"/>
-                  <menuitem value="12" label="12"/>
-                  <menuitem value="13" label="13"/>
-                  <menuitem value="14" label="14"/>
-                  <menuitem value="15" label="15"/>
-                  <menuitem value="16" label="16"/>
-                  <menuitem value="17" label="17"/>
-                  <menuitem value="18" label="18"/>
-                  <menuitem value="20" label="20"/>
-                  <menuitem value="22" label="22"/>
-                  <menuitem value="24" label="24"/>
-                  <menuitem value="26" label="26"/>
-                  <menuitem value="28" label="28"/>
-                  <menuitem value="30" label="30"/>
-                  <menuitem value="32" label="32"/>
-                  <menuitem value="34" label="34"/>
-                  <menuitem value="36" label="36"/>
-                  <menuitem value="40" label="40"/>
-                  <menuitem value="44" label="44"/>
-                  <menuitem value="48" label="48"/>
-                  <menuitem value="56" label="56"/>
-                  <menuitem value="64" label="64"/>
-                  <menuitem value="72" label="72"/>
-                </menupopup>
-              </menulist>
-            </hbox>
-          </row>
-          <row align="center">
-            <hbox align="center" pack="end">
-              <label data-l10n-id="fonts-serif" control="serif"/>
-            </hbox>
-            <hbox>
-              <menulist id="serif" flex="1" style="width: 0px;" delayprefsave="true"
-                        onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
-            </hbox>
-            <spacer/>
-          </row>
-          <row align="center">
-            <hbox align="center" pack="end">
-              <label data-l10n-id="fonts-sans-serif" control="sans-serif"/>
-            </hbox>
-            <hbox>
-              <menulist id="sans-serif" flex="1" style="width: 0px;" delayprefsave="true"
-                        onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
-            </hbox>
-            <spacer/>
-          </row>
-          <row align="center">
-            <hbox align="center" pack="end">
-              <label data-l10n-id="fonts-monospace" control="monospace"/>
-            </hbox>
-            <hbox>
-              <menulist id="monospace" flex="1" style="width: 0px;" crop="right" delayprefsave="true"
-                        onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
-            </hbox>
-            <hbox align="center" pack="end">
-              <label data-l10n-id="fonts-monospace-size" control="sizeMono"/>
-            </hbox>
-            <hbox>
-              <menulist id="sizeMono" delayprefsave="true">
-                <menupopup>
-                  <menuitem value="9" label="9"/>
-                  <menuitem value="10" label="10"/>
-                  <menuitem value="11" label="11"/>
-                  <menuitem value="12" label="12"/>
-                  <menuitem value="13" label="13"/>
-                  <menuitem value="14" label="14"/>
-                  <menuitem value="15" label="15"/>
-                  <menuitem value="16" label="16"/>
-                  <menuitem value="17" label="17"/>
-                  <menuitem value="18" label="18"/>
-                  <menuitem value="20" label="20"/>
-                  <menuitem value="22" label="22"/>
-                  <menuitem value="24" label="24"/>
-                  <menuitem value="26" label="26"/>
-                  <menuitem value="28" label="28"/>
-                  <menuitem value="30" label="30"/>
-                  <menuitem value="32" label="32"/>
-                  <menuitem value="34" label="34"/>
-                  <menuitem value="36" label="36"/>
-                  <menuitem value="40" label="40"/>
-                  <menuitem value="44" label="44"/>
-                  <menuitem value="48" label="48"/>
-                  <menuitem value="56" label="56"/>
-                  <menuitem value="64" label="64"/>
-                  <menuitem value="72" label="72"/>
-                </menupopup>
-              </menulist>
-            </hbox>
-          </row>
-        </rows>
-      </grid>
-      <separator class="thin"/>
-      <hbox flex="1">
-        <spacer flex="1"/>
-        <hbox align="center" pack="end">
-          <label data-l10n-id="fonts-minsize" control="minSize"/>
-          <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
+  <!-- Fonts for: [ Language ] -->
+  <groupbox>
+    <caption>
+      <hbox align="center">
+        <label data-l10n-id="fonts-langgroup-header" control="selectLangs"/>
+      </hbox>
+      <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
+      <hbox>
+        <menulist id="selectLangs" preference="font.language.group"
+                  onsyncfrompreference="return gFontsDialog.readFontLanguageGroup();">
+          <menupopup>
+            <menuitem value="ar"              data-l10n-id="fonts-langgroup-arabic"/>
+            <menuitem value="x-armn"          data-l10n-id="fonts-langgroup-armenian"/>
+            <menuitem value="x-beng"          data-l10n-id="fonts-langgroup-bengali"/>
+            <menuitem value="zh-CN"           data-l10n-id="fonts-langgroup-simpl-chinese"/>
+            <menuitem value="zh-HK"           data-l10n-id="fonts-langgroup-trad-chinese-hk"/>
+            <menuitem value="zh-TW"           data-l10n-id="fonts-langgroup-trad-chinese"/>
+            <menuitem value="x-cyrillic"      data-l10n-id="fonts-langgroup-cyrillic"/>
+            <menuitem value="x-devanagari"    data-l10n-id="fonts-langgroup-devanagari"/>
+            <menuitem value="x-ethi"          data-l10n-id="fonts-langgroup-ethiopic"/>
+            <menuitem value="x-geor"          data-l10n-id="fonts-langgroup-georgian"/>
+            <menuitem value="el"              data-l10n-id="fonts-langgroup-el"/>
+            <menuitem value="x-gujr"          data-l10n-id="fonts-langgroup-gujarati"/>
+            <menuitem value="x-guru"          data-l10n-id="fonts-langgroup-gurmukhi"/>
+            <menuitem value="he"              data-l10n-id="fonts-langgroup-hebrew"/>
+            <menuitem value="ja"              data-l10n-id="fonts-langgroup-japanese"/>
+            <menuitem value="x-knda"          data-l10n-id="fonts-langgroup-kannada"/>
+            <menuitem value="x-khmr"          data-l10n-id="fonts-langgroup-khmer"/>
+            <menuitem value="ko"              data-l10n-id="fonts-langgroup-korean"/>
+            <menuitem value="x-western"       data-l10n-id="fonts-langgroup-latin"/>
+            <menuitem value="x-mlym"          data-l10n-id="fonts-langgroup-malayalam"/>
+            <menuitem value="x-math"          data-l10n-id="fonts-langgroup-math"/>
+            <menuitem value="x-orya"          data-l10n-id="fonts-langgroup-odia"/>
+            <menuitem value="x-sinh"          data-l10n-id="fonts-langgroup-sinhala"/>
+            <menuitem value="x-tamil"         data-l10n-id="fonts-langgroup-tamil"/>
+            <menuitem value="x-telu"          data-l10n-id="fonts-langgroup-telugu"/>
+            <menuitem value="th"              data-l10n-id="fonts-langgroup-thai"/>
+            <menuitem value="x-tibt"          data-l10n-id="fonts-langgroup-tibetan"/>
+            <menuitem value="x-cans"          data-l10n-id="fonts-langgroup-canadian"/>
+            <menuitem value="x-unicode"       data-l10n-id="fonts-langgroup-other"/>
+          </menupopup>
+        </menulist>
+      </hbox>
+    </caption>
+
+    <grid>
+      <columns>
+        <column/>
+        <column flex="1"/>
+        <column/>
+        <column/>
+      </columns>
+
+      <rows>
+        <row>
+          <separator class="thin"/>
+        </row>
+
+        <row align="center">
+          <hbox align="center" pack="end">
+            <label data-l10n-id="fonts-proportional-header" control="defaultFontType"/>
+          </hbox>
+          <!-- This <hbox> is needed to position search tooltips correctly. -->
           <hbox>
-            <menulist id="minSize" oncommand="gFontsDialog.confirmMinSizeChange();">
+            <menulist id="defaultFontType" flex="1" style="width: 0px;">
               <menupopup>
-                <menuitem value="0" data-l10n-id="fonts-minsize-none"/>
+                <menuitem value="serif" data-l10n-id="fonts-default-serif"/>
+                <menuitem value="sans-serif" data-l10n-id="fonts-default-sans-serif"/>
+              </menupopup>
+            </menulist>
+          </hbox>
+          <hbox align="center" pack="end">
+            <label data-l10n-id="fonts-proportional-size" control="sizeVar"/>
+          </hbox>
+          <!-- This <hbox> is needed to position search tooltips correctly. -->
+          <hbox>
+            <menulist id="sizeVar" delayprefsave="true">
+              <menupopup>
                 <menuitem value="9" label="9"/>
                 <menuitem value="10" label="10"/>
                 <menuitem value="11" label="11"/>
                 <menuitem value="12" label="12"/>
                 <menuitem value="13" label="13"/>
                 <menuitem value="14" label="14"/>
                 <menuitem value="15" label="15"/>
                 <menuitem value="16" label="16"/>
@@ -239,56 +133,159 @@
                 <menuitem value="44" label="44"/>
                 <menuitem value="48" label="48"/>
                 <menuitem value="56" label="56"/>
                 <menuitem value="64" label="64"/>
                 <menuitem value="72" label="72"/>
               </menupopup>
             </menulist>
           </hbox>
-        </hbox>
-      </hbox>
-      <separator/>
-      <separator class="groove"/>
-      <hbox>
-        <checkbox id="useDocumentFonts"
-                  data-l10n-id="fonts-allow-own"
-                  preference="browser.display.use_document_fonts"
-                  onsyncfrompreference="return gFontsDialog.readUseDocumentFonts();"
-                  onsynctopreference="return gFontsDialog.writeUseDocumentFonts();"/>
-      </hbox>
-    </groupbox>
-
-    <!-- Text Encoding -->
-    <groupbox>
-      <caption><label data-l10n-id="fonts-languages-fallback-header"/></caption>
-      <description data-l10n-id="fonts-languages-fallback-desc"/>
-      <hbox align="center">
-        <label data-l10n-id="fonts-languages-fallback-label" control="DefaultCharsetList"/>
+        </row>
+        <row align="center">
+          <hbox align="center" pack="end">
+            <label data-l10n-id="fonts-serif" control="serif"/>
+          </hbox>
+          <hbox>
+            <menulist id="serif" flex="1" style="width: 0px;" delayprefsave="true"
+                      onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
+          </hbox>
+          <spacer/>
+        </row>
+        <row align="center">
+          <hbox align="center" pack="end">
+            <label data-l10n-id="fonts-sans-serif" control="sans-serif"/>
+          </hbox>
+          <hbox>
+            <menulist id="sans-serif" flex="1" style="width: 0px;" delayprefsave="true"
+                      onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
+          </hbox>
+          <spacer/>
+        </row>
+        <row align="center">
+          <hbox align="center" pack="end">
+            <label data-l10n-id="fonts-monospace" control="monospace"/>
+          </hbox>
+          <hbox>
+            <menulist id="monospace" flex="1" style="width: 0px;" crop="right" delayprefsave="true"
+                      onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
+          </hbox>
+          <hbox align="center" pack="end">
+            <label data-l10n-id="fonts-monospace-size" control="sizeMono"/>
+          </hbox>
+          <hbox>
+            <menulist id="sizeMono" delayprefsave="true">
+              <menupopup>
+                <menuitem value="9" label="9"/>
+                <menuitem value="10" label="10"/>
+                <menuitem value="11" label="11"/>
+                <menuitem value="12" label="12"/>
+                <menuitem value="13" label="13"/>
+                <menuitem value="14" label="14"/>
+                <menuitem value="15" label="15"/>
+                <menuitem value="16" label="16"/>
+                <menuitem value="17" label="17"/>
+                <menuitem value="18" label="18"/>
+                <menuitem value="20" label="20"/>
+                <menuitem value="22" label="22"/>
+                <menuitem value="24" label="24"/>
+                <menuitem value="26" label="26"/>
+                <menuitem value="28" label="28"/>
+                <menuitem value="30" label="30"/>
+                <menuitem value="32" label="32"/>
+                <menuitem value="34" label="34"/>
+                <menuitem value="36" label="36"/>
+                <menuitem value="40" label="40"/>
+                <menuitem value="44" label="44"/>
+                <menuitem value="48" label="48"/>
+                <menuitem value="56" label="56"/>
+                <menuitem value="64" label="64"/>
+                <menuitem value="72" label="72"/>
+              </menupopup>
+            </menulist>
+          </hbox>
+        </row>
+      </rows>
+    </grid>
+    <separator class="thin"/>
+    <hbox flex="1">
+      <spacer flex="1"/>
+      <hbox align="center" pack="end">
+        <label data-l10n-id="fonts-minsize" control="minSize"/>
         <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
         <hbox>
-          <menulist id="DefaultCharsetList" preference="intl.charset.fallback.override">
+          <menulist id="minSize" oncommand="gFontsDialog.confirmMinSizeChange();">
             <menupopup>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-auto"        value=""/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-arabic"      value="windows-1256"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-baltic"      value="windows-1257"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-ceiso"       value="ISO-8859-2"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-cewindows"   value="windows-1250"/>
-              <!-- Using gbk instead of GBK for compat with previously-stored prefs.
-                  The value gets normalized in dom/encoding/FallbackEncoding.cpp. -->
-              <menuitem data-l10n-id="fonts-languages-fallback-name-simplified"  value="gbk"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-traditional" value="Big5"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-cyrillic"    value="windows-1251"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-greek"       value="ISO-8859-7"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-hebrew"      value="windows-1255"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-japanese"    value="Shift_JIS"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-korean"      value="EUC-KR"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-thai"        value="windows-874"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-turkish"     value="windows-1254"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-vietnamese"  value="windows-1258"/>
-              <menuitem data-l10n-id="fonts-languages-fallback-name-other"       value="windows-1252"/>
+              <menuitem value="0" data-l10n-id="fonts-minsize-none"/>
+              <menuitem value="9" label="9"/>
+              <menuitem value="10" label="10"/>
+              <menuitem value="11" label="11"/>
+              <menuitem value="12" label="12"/>
+              <menuitem value="13" label="13"/>
+              <menuitem value="14" label="14"/>
+              <menuitem value="15" label="15"/>
+              <menuitem value="16" label="16"/>
+              <menuitem value="17" label="17"/>
+              <menuitem value="18" label="18"/>
+              <menuitem value="20" label="20"/>
+              <menuitem value="22" label="22"/>
+              <menuitem value="24" label="24"/>
+              <menuitem value="26" label="26"/>
+              <menuitem value="28" label="28"/>
+              <menuitem value="30" label="30"/>
+              <menuitem value="32" label="32"/>
+              <menuitem value="34" label="34"/>
+              <menuitem value="36" label="36"/>
+              <menuitem value="40" label="40"/>
+              <menuitem value="44" label="44"/>
+              <menuitem value="48" label="48"/>
+              <menuitem value="56" label="56"/>
+              <menuitem value="64" label="64"/>
+              <menuitem value="72" label="72"/>
             </menupopup>
           </menulist>
         </hbox>
       </hbox>
-    </groupbox>
-  </vbox>
+    </hbox>
+    <separator/>
+    <separator class="groove"/>
+    <hbox>
+      <checkbox id="useDocumentFonts"
+                data-l10n-id="fonts-allow-own"
+                preference="browser.display.use_document_fonts"
+                onsyncfrompreference="return gFontsDialog.readUseDocumentFonts();"
+                onsynctopreference="return gFontsDialog.writeUseDocumentFonts();"/>
+    </hbox>
+  </groupbox>
+
+  <!-- Text Encoding -->
+  <groupbox>
+    <caption><label data-l10n-id="fonts-languages-fallback-header"/></caption>
+    <description data-l10n-id="fonts-languages-fallback-desc"/>
+    <hbox align="center">
+      <label data-l10n-id="fonts-languages-fallback-label" control="DefaultCharsetList"/>
+      <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
+      <hbox>
+        <menulist id="DefaultCharsetList" preference="intl.charset.fallback.override">
+          <menupopup>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-auto"        value=""/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-arabic"      value="windows-1256"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-baltic"      value="windows-1257"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-ceiso"       value="ISO-8859-2"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-cewindows"   value="windows-1250"/>
+            <!-- Using gbk instead of GBK for compat with previously-stored prefs.
+                The value gets normalized in dom/encoding/FallbackEncoding.cpp. -->
+            <menuitem data-l10n-id="fonts-languages-fallback-name-simplified"  value="gbk"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-traditional" value="Big5"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-cyrillic"    value="windows-1251"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-greek"       value="ISO-8859-7"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-hebrew"      value="windows-1255"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-japanese"    value="Shift_JIS"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-korean"      value="EUC-KR"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-thai"        value="windows-874"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-turkish"     value="windows-1254"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-vietnamese"  value="windows-1258"/>
+            <menuitem data-l10n-id="fonts-languages-fallback-name-other"       value="windows-1252"/>
+          </menupopup>
+        </menulist>
+      </hbox>
+    </hbox>
+  </groupbox>
 </dialog>
--- a/browser/components/preferences/in-content/preferences.xul
+++ b/browser/components/preferences/in-content/preferences.xul
@@ -185,17 +185,17 @@
             </hbox>
           </hbox>
           <textbox
             type="search" id="searchInput"
             data-l10n-id="search-input-box"
             data-l10n-attrs="style"
             hidden="true" clickSelectsAll="true"/>
         </hbox>
-        <vbox id="mainPrefPane" class="prefpane prefwindow">
+        <vbox id="mainPrefPane">
 #include searchResults.xul
 #include main.xul
 #include home.xul
 #include search.xul
 #include privacy.xul
 #include containers.xul
 #include sync.xul
         </vbox>
--- a/browser/components/preferences/in-content/subdialogs.js
+++ b/browser/components/preferences/in-content/subdialogs.js
@@ -335,23 +335,26 @@ SubDialog.prototype = {
       Cu.reportError("This dialog (" + this._frame.contentWindow.location.href + ") " +
                      "set a height in non-px-non-em units ('" + frameHeight + "'), " +
                      "which is likely to lead to bad sizing in in-content preferences. " +
                      "Please consider changing this.");
       comparisonFrameHeight = parseFloat(frameHeight);
     }
 
     if (comparisonFrameHeight > maxHeight) {
-      // If the height is bigger than that of the window, we should let the contents scroll:
+      // If the height is bigger than that of the window, we should let the
+      // contents scroll. The class is set on the "dialog" element, unless a
+      // content pane exists, which is usually the case when the "window"
+      // element is used to implement the subdialog instead.
       frameHeight = maxHeight + "px";
       frameMinHeight = maxHeight + "px";
-      let containers = this._frame.contentDocument.querySelectorAll(".largeDialogContainer");
-      for (let container of containers) {
-        container.classList.add("doScroll");
-      }
+      let contentPane =
+          this._frame.contentDocument.querySelector(".contentPane") ||
+          this._frame.contentDocument.documentElement;
+      contentPane.classList.add("doScroll");
     }
 
     this._frame.style.height = frameHeight;
     this._box.style.minHeight = "calc(" +
                                 (boxVerticalBorder + titleBarHeight + frameVerticalMargin) +
                                 "px + " + frameMinHeight + ")";
 
     this._overlay.dispatchEvent(new CustomEvent("dialogopen", {
--- a/browser/components/preferences/in-content/syncDisconnect.xul
+++ b/browser/components/preferences/in-content/syncDisconnect.xul
@@ -3,17 +3,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/. -->
 
 <?xml-stylesheet href="chrome://global/skin/"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/in-content/syncDisconnect.css" type="text/css"?>
 
-<window id="syncDisconnectDialog" class="windowDialog"
+<window id="syncDisconnectDialog"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         role="dialog"
         onload="gSyncDisconnectDialog.init();"
         data-l10n-id="sync-disconnect-dialog"
         data-l10n-attrs="title, style">
 
   <linkset>
     <link rel="localization" href="browser/branding/sync-brand.ftl"/>
--- a/browser/components/preferences/languages.xul
+++ b/browser/components/preferences/languages.xul
@@ -2,17 +2,17 @@
 
 <!-- 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"?>
 
-<dialog id="LanguagesDialog" type="child" class="prefwindow"
+<dialog id="LanguagesDialog" type="child"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         data-l10n-id="webpage-languages-window"
         data-l10n-attrs="title, style"
         buttons="accept,cancel,help"
         persist="lastSelected screenX screenY"
         role="dialog"
         onload="gLanguagesDialog.onLoad();"
         helpTopic="prefs-languages"
@@ -25,58 +25,54 @@
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
   <script type="application/javascript" src="chrome://browser/content/preferences/languages.js"/>
 
   <keyset>
     <key data-l10n-id="languages-close-key" modifiers="accel" oncommand="Preferences.close(event)"/>
   </keyset>
 
-  <vbox id="LanguagesDialogPane" class="prefpane largeDialogContainer">
-
-    <stringbundleset id="languageSet">
-      <stringbundle id="bundleAccepted"     src="resource://gre/res/language.properties"/>
-    </stringbundleset>
+  <stringbundleset id="languageSet">
+    <stringbundle id="bundleAccepted"     src="resource://gre/res/language.properties"/>
+  </stringbundleset>
 
-    <description data-l10n-id="languages-description"/>
-    <checkbox id="spoofEnglish"
-              data-l10n-id="languages-customize-spoof-english"
-              preference="privacy.spoof_english"
-              onsyncfrompreference="return gLanguagesDialog.readSpoofEnglish();"
-              onsynctopreference="return gLanguagesDialog.writeSpoofEnglish();"/>
-    <grid flex="1">
-      <columns>
-        <column flex="1"/>
-        <column/>
-      </columns>
-      <rows>
-        <row flex="1">
-          <richlistbox id="activeLanguages" flex="1"
-                       seltype="multiple"
-                       onselect="gLanguagesDialog.onLanguageSelect();"/>
-          <vbox>
-            <button id="up" class="up" oncommand="gLanguagesDialog.moveUp();" disabled="true"
-                    data-l10n-id="languages-customize-moveup"
-                    preference="pref.browser.language.disable_button.up"/>
-            <button id="down" class="down" oncommand="gLanguagesDialog.moveDown();" disabled="true"
-                    data-l10n-id="languages-customize-movedown"
-                    preference="pref.browser.language.disable_button.down"/>
-            <button id="remove" oncommand="gLanguagesDialog.removeLanguage();" disabled="true"
-                    data-l10n-id="languages-customize-remove"
-                    preference="pref.browser.language.disable_button.remove"/>
-          </vbox>
-        </row>
-        <row>
-          <!-- This <vbox> is needed to position search tooltips correctly. -->
-          <vbox>
-            <menulist id="availableLanguages" oncommand="gLanguagesDialog.onAvailableLanguageSelect();"
-                      data-l10n-id="languages-customize-select-language" data-l10n-attrs="placeholder">
-              <menupopup id="availableLanguagesPopup"/>
-            </menulist>
-          </vbox>
-          <button id="addButton" class="add-web-language" oncommand="gLanguagesDialog.addLanguage();" disabled="true"
-                  data-l10n-id="languages-customize-add"/>
-        </row>
-      </rows>
-    </grid>
-    <separator/>
-  </vbox>
+  <description data-l10n-id="languages-description"/>
+  <checkbox id="spoofEnglish"
+            data-l10n-id="languages-customize-spoof-english"
+            preference="privacy.spoof_english"
+            onsyncfrompreference="return gLanguagesDialog.readSpoofEnglish();"
+            onsynctopreference="return gLanguagesDialog.writeSpoofEnglish();"/>
+  <grid flex="1">
+    <columns>
+      <column flex="1"/>
+      <column/>
+    </columns>
+    <rows>
+      <row flex="1">
+        <richlistbox id="activeLanguages" flex="1"
+                     seltype="multiple"
+                     onselect="gLanguagesDialog.onLanguageSelect();"/>
+        <vbox>
+          <button id="up" class="up" oncommand="gLanguagesDialog.moveUp();" disabled="true"
+                  data-l10n-id="languages-customize-moveup"
+                  preference="pref.browser.language.disable_button.up"/>
+          <button id="down" class="down" oncommand="gLanguagesDialog.moveDown();" disabled="true"
+                  data-l10n-id="languages-customize-movedown"
+                  preference="pref.browser.language.disable_button.down"/>
+          <button id="remove" oncommand="gLanguagesDialog.removeLanguage();" disabled="true"
+                  data-l10n-id="languages-customize-remove"
+                  preference="pref.browser.language.disable_button.remove"/>
+        </vbox>
+      </row>
+      <row>
+        <!-- This <vbox> is needed to position search tooltips correctly. -->
+        <vbox>
+          <menulist id="availableLanguages" oncommand="gLanguagesDialog.onAvailableLanguageSelect();"
+                    data-l10n-id="languages-customize-select-language" data-l10n-attrs="placeholder">
+            <menupopup id="availableLanguagesPopup"/>
+          </menulist>
+        </vbox>
+        <button id="addButton" class="add-web-language" oncommand="gLanguagesDialog.addLanguage();" disabled="true"
+                data-l10n-id="languages-customize-add"/>
+      </row>
+    </rows>
+  </grid>
 </dialog>
--- a/browser/components/preferences/permissions.xul
+++ b/browser/components/preferences/permissions.xul
@@ -3,17 +3,17 @@
 <!-- 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/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/preferences/sitePermissions.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
 
-<window id="PermissionsDialog" class="windowDialog"
+<window id="PermissionsDialog"
         windowtype="Browser:Permissions"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         data-l10n-id="permissions-window"
         data-l10n-attrs="title, style"
         onload="gPermissionManager.onLoad();"
         onunload="gPermissionManager.uninit();"
         persist="screenX screenY width height"
         onkeypress="gPermissionManager.onWindowKeyPress(event);">
@@ -26,17 +26,17 @@
 
   <stringbundle id="bundlePreferences"
                 src="chrome://browser/locale/preferences/preferences.properties"/>
 
   <keyset>
     <key data-l10n-id="permissions-close-key" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
-  <vbox class="contentPane largeDialogContainer" flex="1">
+  <vbox class="contentPane">
     <description id="permissionsText" control="url"/>
     <separator class="thin"/>
     <label id="urlLabel" control="url" data-l10n-id="permissions-address"/>
     <hbox align="start">
       <textbox id="url" flex="1"
                oninput="gPermissionManager.onHostInput(event.target);"
                onkeypress="gPermissionManager.onHostKeyPress(event);"/>
     </hbox>
@@ -56,28 +56,27 @@
         <treecol id="siteCol" data-l10n-id="permissions-site-name" flex="3" width="0"
                  onclick="gPermissionManager.buildPermissionsList(event.target)"/>
         <treecol id="statusCol" data-l10n-id="permissions-status" flex="1" width="0"
                  data-isCurrentSortCol="true"
                  onclick="gPermissionManager.buildPermissionsList(event.target);"/>
       </listheader>
     </richlistbox>
   </vbox>
-  <vbox>
-    <hbox class="actionButtons" align="left" flex="1">
-      <button id="removePermission" disabled="true"
-              data-l10n-id="permissions-remove"
-              icon="remove"
-              oncommand="gPermissionManager.onPermissionDelete();"/>
-      <button id="removeAllPermissions"
-              data-l10n-id="permissions-remove-all"
-              icon="clear"
-              oncommand="gPermissionManager.onAllPermissionsDelete();"/>
-    </hbox>
-    <spacer flex="1"/>
-    <hbox class="actionButtons" align="right" flex="1">
-      <button oncommand="close();" icon="close"
-              data-l10n-id="permissions-button-cancel" />
-      <button id="btnApplyChanges" oncommand="gPermissionManager.onApplyChanges();" icon="save"
-              data-l10n-id="permissions-button-ok" />
-    </hbox>
-  </vbox>
+
+  <hbox class="actionButtons" align="left" flex="1">
+    <button id="removePermission" disabled="true"
+            data-l10n-id="permissions-remove"
+            icon="remove"
+            oncommand="gPermissionManager.onPermissionDelete();"/>
+    <button id="removeAllPermissions"
+            data-l10n-id="permissions-remove-all"
+            icon="clear"
+            oncommand="gPermissionManager.onAllPermissionsDelete();"/>
+  </hbox>
+  <spacer flex="1"/>
+  <hbox class="actionButtons" align="right" flex="1">
+    <button oncommand="close();" icon="close"
+            data-l10n-id="permissions-button-cancel" />
+    <button id="btnApplyChanges" oncommand="gPermissionManager.onApplyChanges();" icon="save"
+            data-l10n-id="permissions-button-ok" />
+  </hbox>
 </window>
--- a/browser/components/preferences/sanitize.xul
+++ b/browser/components/preferences/sanitize.xul
@@ -12,17 +12,17 @@
   <!ENTITY % preferencesDTD SYSTEM "chrome://global/locale/preferences.dtd">
   %preferencesDTD;
   <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
   %brandDTD;
   <!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
   %sanitizeDTD;
 ]>
 
-<dialog id="SanitizeDialog" type="child" class="prefwindow"
+<dialog id="SanitizeDialog" type="child"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         buttons="accept,cancel,help"
         persist="lastSelected screenX screenY"
         role="dialog"
         ondialoghelp="openPrefsHelp()"
         style="width: &sanitizePrefs2.modal.width;"
         title="&sanitizePrefs2.title;"
         helpTopic="prefs-clear-private-data"
@@ -30,67 +30,64 @@
 
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
 
   <keyset>
     <key key="&windowClose.key;" modifiers="accel" oncommand="Preferences.close(event)"/>
   </keyset>
 
-  <vbox id="SanitizeDialogPane" class="prefpane">
+  <script type="application/javascript" src="chrome://browser/content/preferences/sanitize.js"/>
 
-    <script type="application/javascript" src="chrome://browser/content/preferences/sanitize.js"/>
-
-    <description>&clearDataSettings4.label;</description>
+  <description>&clearDataSettings4.label;</description>
 
-    <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.clearOnShutdown.history"/>
-            <checkbox label="&itemCookies.label;"
-                      accesskey="&itemCookies.accesskey;"
-                      preference="privacy.clearOnShutdown.cookies"/>
-          </row>
-          <row>
-            <checkbox label="&itemActiveLogins.label;"
-                      accesskey="&itemActiveLogins.accesskey;"
-                      preference="privacy.clearOnShutdown.sessions"/>
-            <checkbox label="&itemCache.label;"
-                      accesskey="&itemCache.accesskey;"
-                      preference="privacy.clearOnShutdown.cache"/>
-          </row>
-          <row>
-            <checkbox label="&itemFormSearchHistory.label;"
-                      accesskey="&itemFormSearchHistory.accesskey;"
-                      preference="privacy.clearOnShutdown.formdata"/>
-          </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.clearOnShutdown.siteSettings"/>
-            <checkbox label="&itemOfflineApps.label;"
-                      accesskey="&itemOfflineApps.accesskey;"
-                      preference="privacy.clearOnShutdown.offlineApps"/>
-          </row>
-        </rows>
-      </grid>
-    </groupbox>
-  </vbox>
+  <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.clearOnShutdown.history"/>
+          <checkbox label="&itemCookies.label;"
+                    accesskey="&itemCookies.accesskey;"
+                    preference="privacy.clearOnShutdown.cookies"/>
+        </row>
+        <row>
+          <checkbox label="&itemActiveLogins.label;"
+                    accesskey="&itemActiveLogins.accesskey;"
+                    preference="privacy.clearOnShutdown.sessions"/>
+          <checkbox label="&itemCache.label;"
+                    accesskey="&itemCache.accesskey;"
+                    preference="privacy.clearOnShutdown.cache"/>
+        </row>
+        <row>
+          <checkbox label="&itemFormSearchHistory.label;"
+                    accesskey="&itemFormSearchHistory.accesskey;"
+                    preference="privacy.clearOnShutdown.formdata"/>
+        </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.clearOnShutdown.siteSettings"/>
+          <checkbox label="&itemOfflineApps.label;"
+                    accesskey="&itemOfflineApps.accesskey;"
+                    preference="privacy.clearOnShutdown.offlineApps"/>
+        </row>
+      </rows>
+    </grid>
+  </groupbox>
 </dialog>
--- a/browser/components/preferences/siteDataSettings.xul
+++ b/browser/components/preferences/siteDataSettings.xul
@@ -7,17 +7,16 @@
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/preferences/siteDataSettings.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/in-content/siteDataSettings.css" type="text/css"?>
 
 <window id="SiteDataSettingsDialog" windowtype="Browser:SiteDataSettings"
         data-l10n-id="site-data-settings-window"
         data-l10n-attrs="title"
-        class="windowDialog"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         style="width: 45em;"
         onload="gSiteDataSettings.init();"
         onkeypress="gSiteDataSettings.onKeyPress(event);"
         persist="screenX screenY width height">
 
   <linkset>
     <link rel="localization" href="branding/brand.ftl"/>
--- a/browser/components/preferences/sitePermissions.xul
+++ b/browser/components/preferences/sitePermissions.xul
@@ -3,17 +3,17 @@
 <!-- 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/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/preferences/sitePermissions.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
 
-<window id="SitePermissionsDialog" class="windowDialog"
+<window id="SitePermissionsDialog"
         windowtype="Browser:SitePermissions"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         data-l10n-id="permissions-window"
         data-l10n-attrs="title, style"
         onload="gSitePermissionsManager.onLoad();"
         onunload="gSitePermissionsManager.uninit();"
         persist="screenX screenY width height"
         onkeypress="gSitePermissionsManager.onWindowKeyPress(event);">
@@ -25,17 +25,17 @@
 
   <script src="chrome://browser/content/preferences/sitePermissions.js"/>
   <script type="application/javascript" src="chrome://browser/content/preferences/in-content/extensionControlled.js"/>
 
   <keyset>
     <key data-l10n-id="permissions-close-key" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
-  <vbox class="contentPane largeDialogContainer" flex="1">
+  <vbox class="contentPane">
     <description id="permissionsText" control="url"/>
     <separator class="thin"/>
     <hbox align="start">
       <textbox id="searchBox" flex="1" data-l10n-id="permissions-searchbox"
                type="search" oncommand="gSitePermissionsManager.buildPermissionsList();"/>
     </hbox>
     <separator class="thin"/>
     <richlistbox id="permissionsBox" flex="1" selected="false"
@@ -45,38 +45,38 @@
         <treecol id="siteCol" data-l10n-id="permissions-site-name" flex="3" width="50"
                  onclick="gSitePermissionsManager.buildPermissionsList(event.target)"/>
         <treecol id="statusCol" data-l10n-id="permissions-status" flex="1" width="50"
                  data-isCurrentSortCol="true"
                  onclick="gSitePermissionsManager.buildPermissionsList(event.target);"/>
       </listheader>
     </richlistbox>
   </vbox>
-  <vbox>
-    <hbox class="actionButtons" align="left" flex="1">
-      <button id="removePermission" disabled="true"
-              data-l10n-id="permissions-remove"
-              icon="remove"
-              oncommand="gSitePermissionsManager.onPermissionDelete();"/>
-      <button id="removeAllPermissions"
-              data-l10n-id="permissions-remove-all"
-              icon="clear"
-              oncommand="gSitePermissionsManager.onAllPermissionsDelete();"/>
-    </hbox>
-    <spacer flex="1"/>
-    <checkbox id="permissionsDisableCheckbox"/>
-    <description id="permissionsDisableDescription"/>
-    <spacer flex="1"/>
-    <hbox id="browserNotificationsPermissionExtensionContent" 
-          class="extension-controlled" align="center" hidden="true">
-      <description control="disableNotificationsPermissionExtension" flex="1"/>
-      <button id="disableNotificationsPermissionExtension"
-              class="extension-controlled-button accessory-button"
-              data-l10n-id="disable-extension"/>
-    </hbox>
-    <hbox class="actionButtons" align="right" flex="1">
-      <button oncommand="close();" icon="close" id="cancel"
-              data-l10n-id="permissions-button-cancel" />
-      <button id="btnApplyChanges" oncommand="gSitePermissionsManager.onApplyChanges();" icon="save"
-              data-l10n-id="permissions-button-ok" />
-    </hbox>
-  </vbox>
+
+  <hbox class="actionButtons" align="left" flex="1">
+    <button id="removePermission" disabled="true"
+            data-l10n-id="permissions-remove"
+            icon="remove"
+            oncommand="gSitePermissionsManager.onPermissionDelete();"/>
+    <button id="removeAllPermissions"
+            data-l10n-id="permissions-remove-all"
+            icon="clear"
+            oncommand="gSitePermissionsManager.onAllPermissionsDelete();"/>
+  </hbox>
+
+  <spacer flex="1"/>
+  <checkbox id="permissionsDisableCheckbox"/>
+  <description id="permissionsDisableDescription"/>
+  <spacer flex="1"/>
+  <hbox id="browserNotificationsPermissionExtensionContent" 
+        class="extension-controlled" align="center" hidden="true">
+    <description control="disableNotificationsPermissionExtension" flex="1"/>
+    <button id="disableNotificationsPermissionExtension"
+            class="extension-controlled-button accessory-button"
+            data-l10n-id="disable-extension"/>
+  </hbox>
+  <hbox class="actionButtons" align="right" flex="1">
+    <button oncommand="close();" icon="close" id="cancel"
+            data-l10n-id="permissions-button-cancel" />
+    <button id="btnApplyChanges" oncommand="gSitePermissionsManager.onApplyChanges();" icon="save"
+            data-l10n-id="permissions-button-ok" />
+  </hbox>
 </window>
--- a/browser/components/preferences/translation.xul
+++ b/browser/components/preferences/translation.xul
@@ -2,17 +2,17 @@
 
 <!-- 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/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
 
-<window id="TranslationDialog" class="windowDialog"
+<window id="TranslationDialog"
         windowtype="Browser:TranslationExceptions"
         data-l10n-id="translation-window"
         data-l10n-attrs="title, style"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="gTranslationExceptions.onLoad();"
         onunload="gTranslationExceptions.uninit();"
         persist="screenX screenY width height"
         onkeypress="gTranslationExceptions.onWindowKeyPress(event);">
@@ -22,70 +22,67 @@
   </linkset>
 
   <script src="chrome://browser/content/preferences/translation.js"/>
 
   <keyset>
     <key data-l10n-id="translation-close-key" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
-  <vbox class="largeDialogContainer">
-    <vbox class="contentPane" flex="1">
+  <vbox class="contentPane">
+    <vbox flex="1">
       <label id="languagesLabel"
              data-l10n-id="translation-languages-disabled-desc"
              control="permissionsTree"/>
       <separator class="thin"/>
       <tree id="languagesTree" flex="1" style="height: 12em;"
             hidecolumnpicker="true"
             onkeypress="gTranslationExceptions.onLanguageKeyPress(event)"
             onselect="gTranslationExceptions.onLanguageSelected();">
         <treecols>
           <treecol id="languageCol" data-l10n-id="translation-languages-column" flex="1"/>
         </treecols>
         <treechildren/>
       </tree>
     </vbox>
-    <hbox align="end">
-      <hbox class="actionButtons" flex="1">
-        <button id="removeLanguage" disabled="true"
-                data-l10n-id="translation-languages-button-remove"
-                icon="remove"
-                oncommand="gTranslationExceptions.onLanguageDeleted();"/>
-        <button id="removeAllLanguages"
-                data-l10n-id="translation-languages-button-remove-all"
-                icon="clear"
-                oncommand="gTranslationExceptions.onAllLanguagesDeleted();"/>
-        <spacer flex="1"/>
-      </hbox>
+    <hbox class="actionButtons" align="end">
+      <button id="removeLanguage" disabled="true"
+              data-l10n-id="translation-languages-button-remove"
+              icon="remove"
+              oncommand="gTranslationExceptions.onLanguageDeleted();"/>
+      <button id="removeAllLanguages"
+              data-l10n-id="translation-languages-button-remove-all"
+              icon="clear"
+              oncommand="gTranslationExceptions.onAllLanguagesDeleted();"/>
+      <spacer flex="1"/>
     </hbox>
     <separator/>
-    <vbox class="contentPane" flex="1">
+    <vbox flex="1">
       <label id="languagesLabel"
              data-l10n-id="translation-sites-disabled-desc"
              control="permissionsTree"/>
       <separator class="thin"/>
       <tree id="sitesTree" flex="1" style="height: 12em;"
             hidecolumnpicker="true"
             onkeypress="gTranslationExceptions.onSiteKeyPress(event)"
             onselect="gTranslationExceptions.onSiteSelected();">
         <treecols>
           <treecol id="siteCol" data-l10n-id="translation-sites-column" flex="1"/>
         </treecols>
         <treechildren/>
       </tree>
     </vbox>
   </vbox>
-  <hbox align="end">
-    <hbox class="actionButtons" flex="1">
-      <button id="removeSite" disabled="true"
-              data-l10n-id="translation-sites-button-remove"
-              icon="remove"
-              oncommand="gTranslationExceptions.onSiteDeleted();"/>
-      <button id="removeAllSites"
-              data-l10n-id="translation-sites-button-remove-all"
-              icon="clear"
-              oncommand="gTranslationExceptions.onAllSitesDeleted();"/>
-      <spacer flex="1"/>
-      <button oncommand="close();" icon="close"
-              data-l10n-id="translation-button-close"/>
-    </hbox>
+
+  <hbox class="actionButtons" align="end">
+    <button id="removeSite" disabled="true"
+            data-l10n-id="translation-sites-button-remove"
+            icon="remove"
+            oncommand="gTranslationExceptions.onSiteDeleted();"/>
+    <button id="removeAllSites"
+            data-l10n-id="translation-sites-button-remove-all"
+            icon="clear"
+            oncommand="gTranslationExceptions.onAllSitesDeleted();"/>
+    <spacer flex="1"/>
+    <button oncommand="close();" icon="close"
+            data-l10n-id="translation-button-close"/>
   </hbox>
 </window>
--- a/browser/themes/linux/preferences/preferences.css
+++ b/browser/themes/linux/preferences/preferences.css
@@ -1,32 +1,15 @@
 /*
 # -*- 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/.
 */
 
-/* Pref Window & Pane */
-.prefwindow {
-  padding: 0px;
-}
-
-.prefwindow[type="child"] {
-  padding: 8px;
-}
-
-.prefpane {
-  padding: 8px;
-}
-
-.prefwindow[type="child"] > .prefpane {
-  padding: 0px;
-}
-
 /* General Pane */
 #useFirefoxSync,
 #getStarted {
   font-size: 90%;
 }
 
 #isNotDefaultLabel {
   font-weight: bold;
@@ -34,27 +17,19 @@
 
 /* Content Pane */
 #translationAttributionImage {
   width: 70px;
   cursor: pointer;
 }
 
 /* Modeless Window Dialogs */
-.windowDialog,
-.windowDialog .prefpane {
-  padding: 0px;
-}
-
-.contentPane {
-  margin: 9px 8px 5px 8px;
-}
 
 .actionButtons {
-  margin: 0px 3px 6px 3px !important;
+  margin: 0px 3px 6px 3px;
 }
 
 /* Sync Pane */
 
 #noFxaAccount {
   line-height: 1.2em;
 }
 
--- a/browser/themes/osx/preferences/in-content/dialog.css
+++ b/browser/themes/osx/preferences/in-content/dialog.css
@@ -1,14 +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/dialog.inc.css
 
-.prefwindow,
-.windowDialog {
+window {
   font: message-box !important;
 }
 
 :root > * {
   font-size: 1.18em;
 }
--- a/browser/themes/osx/preferences/preferences.css
+++ b/browser/themes/osx/preferences/preferences.css
@@ -2,43 +2,20 @@
 # -*- 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
 
-.windowDialog {
-  padding: 12px;
+window {
   font: -moz-dialog;
 }
 
-.prefwindow {
-  padding: 0;
-}
-
-.prefwindow[type="child"] {
-  padding-top: 18px;
-  padding-bottom: 15px;
-  padding-inline-start: 18px;
-  padding-inline-end: 20px;
-}
-
-.prefpane {
-  padding-top: 12px;
-  padding-bottom: 12px;
-  padding-inline-start: 0;
-  padding-inline-end: 12px;
-}
-
-.prefwindow[type="child"] > .prefpane {
-  padding: 0;
-}
-
 tabpanels {
   padding: 20px 7px 7px;
 }
 
 #popupPolicyRow {
   margin-bottom: 4px !important;
   padding-bottom: 4px !important;
   border-bottom: 1px solid #ccc;
--- a/browser/themes/shared/incontentprefs/dialog.inc.css
+++ b/browser/themes/shared/incontentprefs/dialog.inc.css
@@ -1,32 +1,41 @@
 %if 0
 /* - 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
 
-dialog,
 window,
-.prefpane,
-.windowDialog {
+dialog {
   -moz-appearance: none;
   background-color: #fbfbfb;
   color: #424e5a;
   margin: 0;
   padding: 0;
 }
 
 .contentPane {
-  margin: 0;
+  -moz-box-flex: 1;
+}
+
+.contentPane,
+dialog > .dialog-content-box {
+  /* This allows the focus ring to display fully when scrolling is enabled. */
+  padding: 4px;
+}
+
+.contentPane.doScroll,
+dialog.doScroll > .dialog-content-box {
+  overflow-y: auto;
 }
 
 tree:not(#rejectsTree) {
   min-height: 15em;
 }
 
 .actionButtons {
-  margin: 3px 0 0 !important;
+  margin: 3px 0 0;
 }
 
 menulist label {
   font-weight: unset;
 }
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -512,21 +512,16 @@ button > hbox > label {
 
 .dialogFrame {
   margin: 20px;
   -moz-box-flex: 1;
   /* Default dialog dimensions */
   width: 66ch;
 }
 
-.largeDialogContainer.doScroll {
-  overflow-y: auto;
-  -moz-box-flex: 1;
-}
-
 /**
  * End Dialog
  */
 
 /**
  * Font group and font dialog menulist fixes
  */
 
--- a/browser/themes/windows/preferences/preferences.css
+++ b/browser/themes/windows/preferences/preferences.css
@@ -1,38 +1,15 @@
 /*
 # -*- 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/.
 */
 
-/* Pref Window & Pane */
-.prefwindow {
-  padding: 0px;
-}
-
-.prefwindow[type="child"] {
-  padding-top: 8px;
-  padding-bottom: 10px;
-  padding-inline-start: 8px;
-  padding-inline-end: 10px;
-}
-
-.prefpane {
-  padding-top: 8px;
-  padding-bottom: 10px;
-  padding-inline-start: 8px;
-  padding-inline-end: 10px;
-}
-
-.prefwindow[type="child"] > .prefpane {
-  padding: 0px;
-}
-
 /* General Pane */
 
 #useFirefoxSync,
 #getStarted {
   font-size: 90%;
 }
 
 #isNotDefaultLabel {
@@ -41,26 +18,19 @@
 
 /* Content Pane */
 #translationAttributionImage {
   width: 70px;
   cursor: pointer;
 }
 
 /* Modeless Window Dialogs */
-.windowDialog {
-  padding: 0;
-}
-
-.contentPane {
-  margin: 9px 8px 5px;
-}
 
 .actionButtons {
-  margin: 0 3px 6px !important;
+  margin: 0 3px 6px;
 }
 
 /* Sync Pane */
 
 #noFxaAccount {
   line-height: 1.2em;
 }
 
--- a/toolkit/themes/shared/passwordmgr.css
+++ b/toolkit/themes/shared/passwordmgr.css
@@ -1,20 +1,16 @@
 /* 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/. */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
-.contentPane {
-  margin: 9px 8px 5px 8px;
-}
-
 .actionButtons {
-  margin: 0px 3px 6px 3px !important;
+  margin: 0px 3px 6px 3px;
 }
 
 treechildren::-moz-tree-image(siteCol) {
   list-style-image: url(chrome://mozapps/skin/places/defaultFavicon.svg);
   -moz-context-properties: fill;
   fill: currentColor;
   width: 16px;
   height: 16px;