Bug 1643088 - Add in the preferences around the <html:fieldset> a <html:div> for correct expanding when content is wrapping. r=mkmelin a=wsmwk
authorRichard Marti <richard.marti@gmail.com>
Wed, 03 Jun 2020 23:15:22 +0300
changeset 39325 e219e1d5682d1eb0c3832a9c73883da28a0e7086
parent 39324 bcf0deefc739faf033fb2e97e4bf87a83fc07d54
child 39326 a548cd3b25e36a39371d0d2e199d144be2e8e3ff
push id402
push userclokep@gmail.com
push dateMon, 29 Jun 2020 20:48:04 +0000
reviewersmkmelin, wsmwk
bugs1643088
Bug 1643088 - Add in the preferences around the <html:fieldset> a <html:div> for correct expanding when content is wrapping. r=mkmelin a=wsmwk
calendar/base/content/preferences/alarms.inc.xhtml
calendar/base/content/preferences/categories.inc.xhtml
calendar/base/content/preferences/general.inc.xhtml
calendar/base/content/preferences/views.inc.xhtml
mail/components/preferences/chat.inc.xhtml
mail/components/preferences/colors.xhtml
mail/components/preferences/compose.inc.xhtml
mail/components/preferences/connection.xhtml
mail/components/preferences/dockoptions.xhtml
mail/components/preferences/fonts.xhtml
mail/components/preferences/general.inc.xhtml
mail/components/preferences/privacy.inc.xhtml
mail/components/preferences/sendoptions.xhtml
mail/extensions/am-e2e/am-e2e.inc.xhtml
mailnews/base/prefs/content/SmtpServerEdit.xhtml
mailnews/base/prefs/content/am-addressing.inc.xhtml
mailnews/base/prefs/content/am-archiveoptions.xhtml
mailnews/base/prefs/content/am-copies.inc.xhtml
mailnews/base/prefs/content/am-identity-edit.xhtml
mailnews/base/prefs/content/am-junk.xhtml
mailnews/base/prefs/content/am-main.xhtml
mailnews/base/prefs/content/am-offline.xhtml
mailnews/base/prefs/content/am-server.xhtml
mailnews/base/prefs/content/am-serverwithnoidentities.xhtml
mailnews/extensions/mdn/content/am-mdn.xhtml
mailnews/extensions/newsblog/content/am-newsblog.xhtml
--- a/calendar/base/content/preferences/alarms.inc.xhtml
+++ b/calendar/base/content/preferences/alarms.inc.xhtml
@@ -1,11 +1,12 @@
 # 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/.
+    <html:div>
     <html:fieldset data-category="paneCalendar">
         <html:legend data-l10n-id="reminder-legend"></html:legend>
         <vbox id="alarm-sound-box">
             <hbox align="center">
                 <checkbox id="alarmSoundCheckbox"
                           preference="calendar.alarms.playsound"
                           data-l10n-id="reminder-play-checkbox"/>
                 <spacer flex="1"/>
@@ -48,17 +49,19 @@
                       data-l10n-id="reminder-dialog-label"/>
         </hbox>
         <hbox align="center" flex="1">
             <checkbox id="missedalarms"
                       preference="calendar.alarms.showmissed"
                       data-l10n-id="missed-reminder-label"/>
         </hbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset data-category="paneCalendar">
         <html:legend data-l10n-id="reminder-default-legend"></html:legend>
         <hbox align="center">
             <label data-l10n-id="default-snooze-label"
                    control="defaultsnoozelength"/>
             <html:input id="defaultsnoozelength" type="number" class="size3"
                         min="0"
                         preference="calendar.alarms.defaultsnoozelength"
@@ -169,8 +172,9 @@
                             </menulist>
                         </hbox>
                     </html:td>
                 </html:tr>
             </html:table>
             <spacer flex="1"/>
         </hbox>
     </html:fieldset>
+    </html:div>
--- a/calendar/base/content/preferences/categories.inc.xhtml
+++ b/calendar/base/content/preferences/categories.inc.xhtml
@@ -1,11 +1,12 @@
 # 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/.
+    <html:div>
     <html:fieldset data-category="paneCalendar">
         <separator class="thin"/>
         <richlistbox id="categorieslist"
                      flex="1"
                      seltype="multiple"
                      onselect="gCategoriesPane.updateButtons()"
                      ondblclick="gCategoriesPane.listOnDblClick(event)"/>
         <hbox pack="end">
@@ -14,8 +15,9 @@
             <button id="editCButton"
                     data-l10n-id="edit-tag-button"
                     oncommand="gCategoriesPane.editCategory()"/>
             <button id="deleteCButton"
                     data-l10n-id="delete-tag-button"
                     oncommand="gCategoriesPane.deleteCategory()"/>
         </hbox>
     </html:fieldset>
+    </html:div>
--- a/calendar/base/content/preferences/general.inc.xhtml
+++ b/calendar/base/content/preferences/general.inc.xhtml
@@ -1,11 +1,12 @@
 # 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/.
+    <html:div>
     <html:fieldset data-category="paneCalendar">
         <html:legend data-l10n-id="todaypane-legend"></html:legend>
         <hbox align="center">
             <label data-l10n-id="soon-label"
                    control="soondays-menulist"/>
             <menulist id="soondays-menulist"
                       preference="calendar.agendaListbox.soondays">
                 <menupopup id="soondaysdurationpopup">
@@ -18,17 +19,19 @@
                     <menuitem value="7"/>
                     <menuitem value="14"/>
                     <menuitem value="21"/>
                     <menuitem value="28"/>
                 </menupopup>
             </menulist>
         </hbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset id="defaults-itemtype-groupbox" data-category="paneCalendar">
         <html:legend data-l10n-id="event-task-legend"></html:legend>
         <vbox id="defaults-itemtype-box">
             <hbox id="defaults-event-grid-box" align="center">
                 <label id="default-event-length-label"
                        data-l10n-id="default-length-label"
                        control="defaultlength"/>
                 <html:input id="defaultlength" type="number"
@@ -159,17 +162,20 @@
             </html:table>
         </vbox>
         <hbox align="center">
             <checkbox id="tabedit" pack="end"
                       data-l10n-id="edit-intab-label"
                       preference="calendar.item.editInTab"/>
         </hbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset id="systemColorsGroupbox" data-category="paneCalendar">
         <html:legend data-l10n-id="accessibility-legend"></html:legend>
         <hbox align="center">
             <checkbox id="systemColors" pack="end"
                       data-l10n-id="accessibility-colors-label"
                       preference="calendar.view.useSystemColors"/>
         </hbox>
     </html:fieldset>
+    </html:div>
--- a/calendar/base/content/preferences/views.inc.xhtml
+++ b/calendar/base/content/preferences/views.inc.xhtml
@@ -1,12 +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/.
 
+    <html:div>
     <html:fieldset data-category="paneCalendar">
         <separator/>
         <hbox align="center">
           <label data-l10n-id="dateformat-label"
                  control="dateformat"/>
           <menulist id="dateformat" crop="none"
                     preference="calendar.date.format">
               <menupopup id="dateformatpopup">
@@ -91,17 +92,19 @@
                               class="dayOffCheckbox"
                               data-l10n-id="day-7-checkbox"
                               orient="vertical"
                               preference="calendar.week.d6saturdaysoff"/>
                 </hbox>
             </vbox>
         </hbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset data-category="paneCalendar">
         <html:legend data-l10n-id="dayweek-legend"></html:legend>
         <html:table id="dayAndWeekViewsTable">
             <html:tr>
                 <html:th>
                    <label data-l10n-id="visible-hours-label"
                           control="visiblehours"/>
                 </html:th>
@@ -217,17 +220,19 @@
                 </html:td>
             </html:tr>
         </html:table>
         <checkbox id="showLocation" pack="end"
                   data-l10n-id="location-checkbox"
                   preference="calendar.view.showLocation"/>
         <spacer/>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset id="viewsMultiweekGroupbox" data-category="paneCalendar">
         <html:legend data-l10n-id="multiweek-legend"></html:legend>
         <hbox align="center">
             <label data-l10n-id="number-of-weeks-label"
                    control="viewsMultiweekTotalWeeks"/>
             <menulist id="viewsMultiweekTotalWeeks"
                       preference="calendar.weeks.inview">
                 <menupopup>
@@ -248,8 +253,9 @@
                 <menupopup>
                     <menuitem data-l10n-id="week-0-label" value="0"/>
                     <menuitem data-l10n-id="week-1-label" value="1"/>
                     <menuitem data-l10n-id="week-2-label" value="2"/>
                 </menupopup>
             </menulist>
         </hbox>
     </html:fieldset>
+    </html:div>
--- a/mail/components/preferences/chat.inc.xhtml
+++ b/mail/components/preferences/chat.inc.xhtml
@@ -9,16 +9,17 @@
                   src="chrome://messenger/locale/preferences/messagestyle.properties"/>
 
     <hbox id="chatPaneCategory"
           class="subcategory"
           data-category="paneChat">
       <html:h1 data-l10n-id="chat-pane-header"/>
     </hbox>
 
+    <html:div>
     <html:fieldset data-category="paneChat">
       <html:legend data-l10n-id="chat-status-title"></html:legend>
         <!-- Startup -->
         <hbox align="center">
           <label id="chatStartupAction"
                  data-l10n-id="startup-label"
                  control="messengerStartupAction"/>
           <menulist id="messengerStartupAction" preference="messenger.startup.action">
@@ -49,17 +50,19 @@
             <spacer flex="1"/>
           </hbox>
           <html:input id="defaultIdleAwayMessage"
                       type="text"
                       class="idle-reporting-enabled indent"
                       preference="messenger.status.defaultIdleAwayMessage"/>
         </vbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset data-category="paneChat">
       <html:legend data-l10n-id="chat-notifications-title"></html:legend>
       <hbox>
         <checkbox id="sendTyping"
                   data-l10n-id="send-typing-label"
                   preference="purple.conversations.im.send_typing"/>
         <spacer flex="1"/>
       </hbox>
@@ -118,23 +121,25 @@
                       preference-editable="true"
                       aria-labelledby="chatSoundCustom"/>
           <button id="browseForChatSound"
                   data-l10n-id="chat-browse-sound-button"
                   oncommand="gChatPane.browseForSoundFile();"/>
         </hbox>
       </radiogroup>
     </html:fieldset>
+    </html:div>
 
     <hbox id="chatPaneStylingCategory"
           class="subcategory"
           data-category="paneChat">
       <html:h1 data-l10n-id="chat-pane-styling-header"/>
     </hbox>
 
+    <html:div>
     <html:fieldset data-category="paneChat">
       <separator/>
       <hbox align="center">
         <label data-l10n-id="theme-label" control="messagestyle-themename"/>
         <menulist id="messagestyle-themename"
                   flex="1" crop="end"
                   preference="messenger.options.messagesStyle.theme"
                   onselect="previewObserver.currentThemeChanged();">
@@ -177,10 +182,11 @@
         <label data-l10n-id="chat-variant-label" control="themevariant"/>
         <menulist id="themevariant"
                   preference="messenger.options.messagesStyle.variant"
                   onselect="previewObserver.currentVariantChanged();"/>
       </hbox>
       <checkbox id="showHeaderCheckbox" data-l10n-id="chat-header-label"
                 preference="messenger.options.messagesStyle.showHeader"/>
     </html:fieldset>
+    </html:div>
 
   </prefpane>
--- a/mail/components/preferences/colors.xhtml
+++ b/mail/components/preferences/colors.xhtml
@@ -20,16 +20,17 @@
 
   <linkset>
     <html:link rel="localization" href="messenger/preferences/colors.ftl"/>
   </linkset>
 
   <prefpane id="ColorsDialogPane">
     <hbox>
       <hbox flex="1">
+      <html:div>
       <html:fieldset>
         <html:legend data-l10n-id="colors-dialog-legend"></html:legend>
         <hbox align="center">
           <label data-l10n-id="text-color-label" control="foregroundtextmenu"/>
           <spacer flex="1"/>
           <html:input type="color" id="foregroundtextmenu" preference="browser.display.foreground_color"/>
         </hbox>
         <hbox align="center" style="margin-top: 5px">
@@ -38,18 +39,20 @@
           <html:input type="color" id="backgroundmenu" preference="browser.display.background_color"/>
         </hbox>
         <separator class="thin"/>
         <hbox align="center">
           <checkbox id="browserUseSystemColors" data-l10n-id="use-system-colors"
                     preference="browser.display.use_system_colors"/>
         </hbox>
       </html:fieldset>
+      </html:div>
       </hbox>
       <hbox flex="1">
+      <html:div>
       <html:fieldset>
         <html:legend data-l10n-id="colors-link-legend"></html:legend>
         <hbox align="center">
           <label data-l10n-id="link-color-label" control="unvisitedlinkmenu"/>
           <spacer flex="1"/>
           <html:input type="color" id="unvisitedlinkmenu" preference="browser.anchor_color"/>
         </hbox>
         <hbox align="center" style="margin-top: 5px">
@@ -58,16 +61,17 @@
           <html:input type="color" id="visitedlinkmenu" preference="browser.visited_color"/>
         </hbox>
         <separator class="thin"/>
         <hbox align="center">
           <checkbox id="browserUnderlineAnchors" data-l10n-id="underline-link-checkbox"
                     preference="browser.underline_anchors"/>
         </hbox>
       </html:fieldset>
+      </html:div>
       </hbox>
     </hbox>
 #ifdef XP_WIN
     <vbox align="start">
 #else
     <vbox>
 #endif
       <label data-l10n-id="override-color-label"
--- a/mail/components/preferences/compose.inc.xhtml
+++ b/mail/components/preferences/compose.inc.xhtml
@@ -10,16 +10,17 @@
     <stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
 
     <hbox id="compositionMainCategory"
           class="subcategory"
           data-category="paneCompose">
       <html:h1 data-l10n-id="composition-category-header"/>
     </hbox>
 
+    <html:div>
     <html:fieldset data-category="paneCompose">
       <separator class="thin"/>
       <hbox align="center">
         <label data-l10n-id="forward-label" control="forwardMessageMode"/>
         <menulist id="forwardMessageMode" preference="mail.forward_message_mode">
           <menupopup>
             <menuitem value="2" data-l10n-id="inline-label"/>
             <menuitem value="0" data-l10n-id="as-attachment-label"/>
@@ -43,16 +44,18 @@
       </hbox>
       <hbox>
         <checkbox id="mailWarnOnSendAccelKey"
                   data-l10n-id="warn-on-send-accel-key"
                   preference="mail.warn_on_send_accel_key"/>
         <spacer flex="1"/>
       </hbox>
     </html:fieldset>
+    </html:div>
+    <html:div>
     <html:fieldset data-category="paneCompose">
       <html:legend data-l10n-id="composition-spelling-title"></html:legend>
       <hbox>
         <checkbox id="spellCheckBeforeSend"
                   data-l10n-id="spellcheck-label"
                   preference="mail.SpellCheckBeforeSend"/>
         <spacer flex="1"/>
       </hbox>
@@ -73,16 +76,18 @@
           </menupopup>
         </menulist>
         <label id="downloadDictionaries" class="text-link"
                 onclick="if (event.button == 0) { openDictionaryList('tab'); }"
                 data-l10n-id="download-dictionaries-link"/>
         <spacer flex="1"/>
       </hbox>
     </html:fieldset>
+    </html:div>
+    <html:div>
     <html:fieldset data-category="paneCompose">
       <html:legend data-l10n-id="compose-html-style-title"></html:legend>
       <hbox>
         <vbox flex="1">
           <hbox align="center">
             <label control="FontSelect" data-l10n-id="font-label"/>
             <menulist id="FontSelect" preference="msgcompose.font_face"
                       sizetopopup="pref" crop="center" flex="1">
@@ -145,23 +150,25 @@
       </hbox>
 
       <hbox align="center">
         <description flex="1" data-l10n-id="format-description"/>
         <button data-l10n-id="send-options-label"
                 oncommand="gComposePane.sendOptionsDialog();"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
     <hbox id="compositionAddressingCategory"
           class="subcategory"
           data-category="paneCompose">
       <html:h1 data-l10n-id="composition-addressing-header"/>
     </hbox>
 
+    <html:div>
     <html:fieldset data-category="paneCompose">
       <!-- Address Autocomplete -->
       <separator class="thin"/>
 
       <description data-l10n-id="autocomplete-description"/>
 
       <hbox align="center">
         <checkbox id="addressingAutocomplete" data-l10n-id="ab-label"
@@ -203,23 +210,25 @@
                   oncommand="gComposePane.setDefaultStartupDir(this.value);"
                   data-l10n-id="default-last-label"
                   data-l10n-attrs="none"
                   alladdressbooks="true"
                   mailinglists="true"
                   flex="1"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
     <hbox id="compositionAttachmentsCategory"
           class="subcategory"
           data-category="paneCompose">
       <html:h1 data-l10n-id="composition-attachments-header"/>
     </hbox>
 
+    <html:div>
     <html:fieldset data-category="paneCompose">
       <hbox align="center">
         <checkbox id="attachment_reminder_label"
                   data-l10n-id="attachment-label"
                   preference="mail.compose.attachment_reminder"/>
         <spacer flex="1"/>
         <button id="attachment_reminder_button"
                 data-l10n-id="attachment-options-label"
@@ -267,10 +276,11 @@
               </vbox>
               <vbox id="cloudFileSettingsWrapper" flex="1">
               </vbox>
             </deck>
           </vbox>
         </hbox>
       </vbox>
     </html:fieldset>
+    </html:div>
 
   </prefpane>
--- a/mail/components/preferences/connection.xhtml
+++ b/mail/components/preferences/connection.xhtml
@@ -24,16 +24,17 @@
     <html:link rel="localization" href="messenger/preferences/connection.ftl"/>
   </linkset>
 
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://global/content/editMenuOverlay.js"/>
   <script src="chrome://global/content/preferencesBindings.js"/>
   <script src="chrome://messenger/content/preferences/connection.js"/>
 
+  <html:div>
   <html:fieldset>
     <html:legend data-l10n-id="connection-proxy-legend"></html:legend>
 
     <radiogroup id="networkProxyType" preference="network.proxy.type">
       <radio value="0" data-l10n-id="proxy-type-no"/>
       <radio value="4" data-l10n-id="proxy-type-wpad"/>
       <radio value="5" data-l10n-id="proxy-type-system"
              id="systemPref" hidden="true"/>
@@ -104,16 +105,17 @@
                     preference="network.proxy.autoconfig_url"
                     oninput="gConnectionsDialog.updateReloadButton();"/>
         <button id="autoReload" data-l10n-id="proxy-reload-label"
                 oncommand="gConnectionsDialog.reloadPAC();"
                 preference="pref.advanced.proxies.disable_button.reload"/>
       </hbox>
     </radiogroup>
   </html:fieldset>
+  </html:div>
   <separator class="thin"/>
   <label data-l10n-id="no-proxy-label" control="networkProxyNone"/>
   <html:textarea id="networkProxyNone" rows="2" preference="network.proxy.no_proxies_on"/>
   <label data-l10n-id="no-proxy-example" control="networkProxyNone"/>
   <label id="networkProxyNoneLocalhost" control="networkProxyNone" data-l10n-id="no-proxy-localhost-label"/>
   <separator class="thin"/>
   <checkbox id="autologinProxy"
             data-l10n-id="proxy-password-prompt"
--- a/mail/components/preferences/dockoptions.xhtml
+++ b/mail/components/preferences/dockoptions.xhtml
@@ -21,31 +21,33 @@
   </linkset>
 
   <prefpane id="DockOptionsDialogPane">
     <hbox orient="vertical">
       <checkbox id="newMailNotificationBounce"
                 data-l10n-id="bounce-system-dock-icon"
                 preference="mail.biff.animate_dock_icon"/>
       <separator class="thin"/>
+      <html:div>
       <html:fieldset>
         <html:legend data-l10n-id="dock-icon-legend"></html:legend>
         <vbox>
         <separator class="thin"/>
         <label data-l10n-id="dock-icon-show-label"/>
         <radiogroup id="dockCount"
                     preference="mail.biff.use_new_count_in_mac_dock"
                     class="indent" orient="vertical">
           <radio id="dockCountAll" value="false"
                  data-l10n-id="count-unread-messages-radio"/>
           <radio id="dockCountNew" value="true"
                  data-l10n-id="count-new-messages-radio"/>
         </radiogroup>
         </vbox>
       </html:fieldset>
+      </html:div>
       <separator/>
       <description class="bold" data-l10n-id="notification-settings-info"/>
     </hbox>
   </prefpane>
 
   <script src="chrome://global/content/preferencesBindings.js"/>
   <script src="chrome://messenger/content/preferences/dockoptions.js"/>
 </dialog>
--- a/mail/components/preferences/fonts.xhtml
+++ b/mail/components/preferences/fonts.xhtml
@@ -25,16 +25,17 @@
     <script src="chrome://global/content/preferencesBindings.js"/>
     <script src="chrome://mozapps/content/preferences/fontbuilder.js"/>
     <script src="chrome://messenger/content/preferences/fonts.js"/>
     <script src="chrome://messenger/content/menulist-charsetpicker.js"/>
     <linkset>
       <html:link rel="localization" href="messenger/preferences/fonts.ftl"/>
     </linkset>
 
+    <html:div>
     <html:fieldset>
       <box style="display: grid; grid-template-columns: auto 1fr auto auto;">
         <!-- title row -->
         <hbox align="center" pack="end">
           <label id="fontsTitle" control="selectLangs"
                  data-l10n-id="fonts-language-legend"/>
         </hbox>
         <hbox align="center">
@@ -227,33 +228,37 @@
               <menuitem value="56" label="56"/>
               <menuitem value="64" label="64"/>
               <menuitem value="72" label="72"/>
             </menupopup>
           </menulist>
         </hbox>
       </hbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset>
       <html:legend data-l10n-id="font-control-legend"></html:legend>
 
       <hbox>
         <checkbox id="useDocumentFonts"
                   data-l10n-id="use-document-fonts-checkbox"
                   preference="browser.display.use_document_fonts"/>
       </hbox>
 
       <hbox>
         <checkbox id="mailFixedWidthMessages"
                   data-l10n-id="use-fixed-width-plain-checkbox"
                   preference="mail.fixed_width_messages"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset>
       <html:legend data-l10n-id="text-encoding-legend"></html:legend>
 
       <label data-l10n-id="text-encoding-description"/>
 
       <separator class="thin"/>
       <hbox>
         <vbox pack="end">
@@ -275,12 +280,13 @@
       </hbox>
 
       <separator class="thin"/>
 
       <checkbox id="replyInDefaultCharset"
                 data-l10n-id="default-font-reply-checkbox"
                 preference="mailnews.reply_in_default_charset"/>
     </html:fieldset>
+    </html:div>
     <separator/>
   </vbox>
 </dialog>
 </window>
--- a/mail/components/preferences/general.inc.xhtml
+++ b/mail/components/preferences/general.inc.xhtml
@@ -34,16 +34,17 @@
 #endif
 
     <hbox id="generalCategory"
           class="subcategory"
           data-category="paneGeneral">
       <html:h1 data-l10n-id="pane-general-title"/>
     </hbox>
 
+    <html:div>
     <html:fieldset data-category="paneGeneral">
       <html:legend data-l10n-id="general-legend"></html:legend>
       <vbox>
         <hbox align="start">
           <checkbox id="mailnewsStartPageEnabled"
                     preference="mailnews.start_page.enabled"
                     data-l10n-id="start-page-label"/>
         </hbox>
@@ -54,33 +55,37 @@
                       preference="mailnews.start_page.url"/>
           <button id="browseForStartPageUrl"
                   data-l10n-id="restore-default-label"
                   oncommand="gGeneralPane.restoreDefaultStartPage();">
           </button>
         </hbox>
       </vbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset data-category="paneGeneral">
       <html:legend data-l10n-id="default-search-engine"></html:legend>
       <hbox align="center">
         <menulist id="defaultWebSearch">
           <menupopup id="defaultWebSearchPopup"/>
         </menulist>
         <button id="addSearchEngine"
                 data-l10n-id="add-search-engine"
                 oncommand="gGeneralPane.addSearchEngine();"/>
         <button id="removeSearchEngine"
                 data-l10n-id="remove-search-engine"
                 oncommand="gGeneralPane.removeSearchEngine();"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
 #ifdef HAVE_SHELL_SERVICE
+    <html:div>
     <html:fieldset id="systemDefaultsGroup" data-category="paneGeneral">
       <html:legend data-l10n-id="system-integration-legend"></html:legend>
       <vbox>
       <hbox id="checkDefaultBox" align="center">
         <checkbox id="alwaysCheckDefault"
                   preference="mail.shell.checkDefaultClient"
                   data-l10n-id="always-check-default"/>
         <spacer flex="1"/>
@@ -97,25 +102,27 @@
 #endif
       <hbox id="searchIntegrationContainer">
         <checkbox id="searchIntegration"
                   preference="searchintegration.enable"
                   data-l10n-id="search-integration-label"/>
       </hbox>
       </vbox>
     </html:fieldset>
+    </html:div>
 #endif
 
     <hbox id="languageAndAppearanceCategory"
           class="subcategory"
           data-category="paneGeneral">
       <html:h1 data-l10n-id="general-language-and-appearance-header"/>
     </hbox>
 
     <!-- Fonts and Colors -->
+    <html:div>
     <html:fieldset id="fontsGroup" data-category="paneGeneral">
       <html:legend data-l10n-id="fonts-legend"></html:legend>
 
       <hbox id="fontSettings" flex="1">
         <vbox id="fontRow" flex="1">
           <hbox align="center">
             <label data-l10n-id="default-font-label" control="defaultFont"/>
             <menulist id="defaultFont" flex="1" sizetopopup="pref" crop="center">
@@ -194,32 +201,36 @@
             <menuitem value="1" data-l10n-id="bigger-size-item"/>
             <menuitem value="2" data-l10n-id="smaller-size-item"/>
           </menupopup>
         </menulist>
         <label data-l10n-id="quoted-text-color" control="citationmenu"/>
         <html:input type="color" id="citationmenu" preference="mail.citation_color"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
     <!-- Date and time formatting -->
+    <html:div>
     <html:fieldset data-category="paneGeneral">
       <html:legend data-l10n-id="datetime-formatting-legend"></html:legend>
       <radiogroup id="formatLocale" align="start"
                   preference="intl.regional_prefs.use_os_locales"
                   orient="vertical">
         <radio id="appLocale"
                value="false"/>
                <!-- label and accesskey will be set dynamically -->
         <radio id="rsLocale"
                value="true"/>
                <!-- label and accesskey will be set dynamically -->
       </radiogroup>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset id="messengerLanguagesBox" data-category="paneGeneral" hidden="hidden">
       <html:legend data-l10n-id="language-selector-legend"></html:legend>
         <vbox align="start">
         <description flex="1"
                      controls="chooseMessengerLanguage"
                      data-l10n-id="choose-messenger-language-description"/>
         <hbox>
           <menulist id="defaultMessengerLanguage"
@@ -235,41 +246,45 @@
       <hbox id="confirmMessengerLanguage"
             class="message-bar"
             align="center"
             hidden="true">
         <image class="message-bar-icon"/>
         <vbox class="message-bar-content-container" align="stretch" flex="1"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
     <!-- Scrolling -->
+    <html:div>
     <html:fieldset id="scrollingGroup" data-category="paneGeneral">
       <html:legend data-l10n-id="scrolling-legend"></html:legend>
       <hbox>
         <checkbox id="useAutoScroll"
                   data-l10n-id="autoscroll-label"
                   preference="general.autoScroll"/>
         <spacer flex="1"/>
       </hbox>
       <hbox>
         <checkbox id="useSmoothScrolling"
                   data-l10n-id="smooth-scrolling-label"
                   preference="general.smoothScroll"/>
         <spacer flex="1"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
 
     <hbox id="incomingMailCategory"
           class="subcategory"
           data-category="paneGeneral">
       <html:h1 data-l10n-id="general-incoming-mail-header"/>
     </hbox>
 
+    <html:div>
     <html:fieldset data-category="paneGeneral">
       <html:legend data-l10n-id="new-message-arrival"></html:legend>
 #ifdef XP_MACOSX
       <hbox align="center">
         <description flex="1" data-l10n-id="change-dock-icon"/>
         <button id="dockOptions"
                 oncommand="gGeneralPane.configureDockOptions();"
                 data-l10n-id="app-icon-options"/>
@@ -335,23 +350,25 @@
                     preference="mail.biff.play_sound.url"
                     preference-editable="true"
                     aria-labelledby="custom"/>
         <button id="browseForSound"
                 data-l10n-id="mail-browse-sound-button"
                 oncommand="gGeneralPane.browseForSoundFile();"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
     <hbox id="filesAttachmentCategory"
           class="subcategory"
           data-category="paneGeneral">
       <html:h1 data-l10n-id="general-files-and-attachment-header"/>
     </hbox>
 
+    <html:div>
     <html:fieldset data-category="paneGeneral">
       <hbox>
         <search-textbox id="filter"
                         flex="1"
                         data-l10n-id="search-input"
                         data-l10n-attrs="placeholder"
                         aria-controls="handlersView"
                         oncommand="gGeneralPane._rebuildView();"/>
@@ -396,23 +413,25 @@
           <hbox>
             <radio id="alwaysAsk"
                    value="false"
                    data-l10n-id="always-ask-label"/>
           </hbox>
         </radiogroup>
       </vbox>
     </html:fieldset>
+    </html:div>
 
     <hbox id="tagsCategory"
           class="subcategory"
           data-category="paneGeneral">
       <html:h1 data-l10n-id="general-tags-header"/>
     </hbox>
 
+    <html:div>
     <html:fieldset data-category="paneGeneral">
       <label control="tagList" data-l10n-id="display-tags-text"/>
       <hbox>
         <richlistbox id="tagList"
                      flex="1"
                      height="180px"
                      ondblclick="gGeneralPane.editTag();"
                      onselect="gGeneralPane.onSelectTag();"/>
@@ -423,24 +442,26 @@
                   data-l10n-id="edit-tag-button"
                   oncommand="gGeneralPane.editTag();"/>
           <button id="removeTagButton" disabled="true"
                   data-l10n-id="delete-tag-button"
                   oncommand="gGeneralPane.removeTag();"/>
         </vbox>
       </hbox>
     </html:fieldset>
+    </html:div>
 
 
     <hbox id="readingAndDisplayCategory"
           class="subcategory"
           data-category="paneGeneral">
       <html:h1 data-l10n-id="general-reading-and-display-header"/>
     </hbox>
 
+    <html:div>
     <html:fieldset data-category="paneGeneral">
       <vbox>
         <hbox>
           <checkbox id="automaticallyMarkAsRead"
                     preference="mailnews.mark_message_read.auto"
                     data-l10n-id="auto-mark-as-read"/>
         </hbox>
 
@@ -502,25 +523,27 @@
 
       <hbox align="center">
         <description flex="1" data-l10n-id="return-receipts-description"/>
         <button id="showReturnReceipts"
                 data-l10n-id="return-receipts-button"
                 oncommand="gGeneralPane.showReturnReceipts();"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
 #ifdef MOZ_UPDATER
     <hbox id="updatesCategory"
           class="subcategory"
           data-category="paneGeneral">
       <html:h1 data-l10n-id="general-updates-header"/>
     </hbox>
 
     <!-- Update -->
+    <html:div>
     <html:fieldset id="updateApp" data-category="paneGeneral">
       <html:legend data-l10n-id="update-app-legend"></html:legend>
       <hbox align="center">
         <vbox>
           <description>
             <label id="version"/>
             <label is="text-link" id="releasenotes" hidden="true">&releaseNotes.link;</label>
           </description>
@@ -632,49 +655,55 @@
 
 #ifdef MOZ_MAINTENANCE_SERVICE
       <separator class="thin"/>
       <checkbox id="useService"
                 data-l10n-id="use-service"
                 preference="app.update.service.enabled"/>
 #endif
     </html:fieldset>
+    </html:div>
 #endif
 
     <hbox id="networkAndDiskspaceCategory"
           class="subcategory"
           data-category="paneGeneral">
       <html:h1 data-l10n-id="general-network-and-diskspace-header"/>
     </hbox>
 
     <!-- Networking & Disk Space -->
+    <html:div>
     <html:fieldset data-category="paneGeneral">
       <html:legend data-l10n-id="networking-legend"></html:legend>
       <hbox align="center">
         <description control="catProxiesButton"
                      data-l10n-id="proxy-config-description"
                      flex="1"/>
         <button id="catProxiesButton"
                 data-l10n-id="network-settings-button"
                 oncommand="gGeneralPane.showConnections();"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset data-category="paneGeneral">
       <html:legend data-l10n-id="offline-legend"></html:legend>
       <hbox align="center">
         <description data-l10n-id="offline-settings"
                      control="offlineSettingsButton"
                      flex="1"/>
         <button id="offlineSettingsButton"
                 data-l10n-id="offline-settings-button"
                 oncommand="gGeneralPane.showOffline();"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset data-category="paneGeneral">
       <html:legend data-l10n-id="diskspace-legend"></html:legend>
       <hbox align="center">
         <label id="actualDiskCacheSize" flex="1"/>
         <button id="clearCacheButton"
                 data-l10n-id="clear-cache-button"
                 oncommand="gGeneralPane.clearCache();"/>
       </hbox>
@@ -699,17 +728,19 @@
                     oncommand="gGeneralPane.updateCompactOptions(this.checked);"/>
           <html:input id="offlineCompactFolderMin" type="number" class="size4"
                       min="1" max="2048" value="200"
                       preference="mail.purge_threshhold_mb"
                       aria-labelledby="offlineCompactFolder offlineCompactFolderMin compactFolderMB"/>
           <label id="compactFolderMB" data-l10n-id="compact-folder-size" value=""/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset data-category="paneGeneral">
       <html:legend data-l10n-id="general-indexing-label"></html:legend>
       <vbox>
         <hbox>
           <checkbox id="enableGloda"
                     preference="mailnews.database.global.indexer.enabled"
                     data-l10n-id="enable-gloda-search-label"/>
         </hbox>
@@ -731,20 +762,23 @@
           <checkbox id="allowHWAccel"
                     preference="layers.acceleration.disabled"
                     data-l10n-id="allow-hw-accel"/>
         </hbox>
       </vbox>
       <vbox>
       </vbox>
     </html:fieldset>
+    </html:div>
 
     <separator class="thin" data-category="paneGeneral"/>
 
+    <html:div>
     <html:fieldset data-category="paneGeneral">
       <hbox pack="end">
         <button id="configEditor"
                 data-l10n-id="config-editor-button"
                 oncommand="gGeneralPane.showConfigEdit();"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
   </prefpane>
--- a/mail/components/preferences/privacy.inc.xhtml
+++ b/mail/components/preferences/privacy.inc.xhtml
@@ -8,16 +8,17 @@
 
     <hbox id="privacyCategory"
           class="subcategory"
           data-category="panePrivacy">
       <html:h1 data-l10n-id="privacy-main-header"/>
     </hbox>
 
     <!-- Mail Content -->
+    <html:div>
     <html:fieldset id="mailContentGroup" data-category="panePrivacy">
       <html:legend data-l10n-id="mail-content"></html:legend>
       <hbox id="remoteContentBox">
         <checkbox id="acceptRemoteContent"
                   preference="mailnews.message_display.disable_remote_image"
                   data-l10n-id="remote-content-label"/>
         <spacer flex="1"/>
         <button id="remoteContentExceptions"
@@ -25,18 +26,20 @@
                 data-l10n-id="exceptions-button"/>
       </hbox>
       <hbox>
         <label is="text-link" id="acceptRemoteContentInfo"
                href="https://support.mozilla.org/kb/remote-content-in-messages"
                data-l10n-id="remote-content-info"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
     <!-- Web Content -->
+    <html:div>
     <html:fieldset id="webContentGroup" data-category="panePrivacy">
       <html:legend data-l10n-id="web-content"></html:legend>
       <checkbox id="keepHistory"
                 preference="places.history.enabled"
                 data-l10n-id="history-label"/>
       <hbox id="cookiesBox">
         <checkbox id="acceptCookies"
                   preference="network.cookie.cookieBehavior"
@@ -87,25 +90,27 @@
                   class="tail-with-learn-more"
                   data-l10n-id="do-not-track-label"
                   preference="privacy.donottrackheader.enabled"/>
         <label is="text-link" id="doNotTrackInfo"
                href="https://www.mozilla.org/dnt"
                data-l10n-id="learn-button"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
     <hbox id="privacyPasswordsCategory"
           class="subcategory"
           data-category="panePrivacy">
       <html:h1 data-l10n-id="privacy-passwords-header"/>
     </hbox>
 
     <separator data-category="panePrivacy"/>
 
+    <html:div>
     <html:fieldset data-category="panePrivacy">
       <hbox align="center">
         <description data-l10n-id="passwords-description"/>
         <spacer flex="1"/>
         <button id="showPasswords"
                 data-l10n-id="passwords-button"
                 oncommand="gPrivacyPane.showPasswords();"
                 preference="pref.privacy.disable_button.view_passwords"/>
@@ -120,25 +125,27 @@
                   data-l10n-id="master-password-label"
                   oncommand="gPrivacyPane.updateMasterPasswordButton();"/>
         <spacer flex="1"/>
         <button id="changeMasterPassword"
                 data-l10n-id="master-password-button"
                 oncommand="gPrivacyPane.changeMasterPassword();"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
     <hbox id="privacyJunkCategory"
           class="subcategory"
           data-category="panePrivacy">
       <html:h1 data-l10n-id="privacy-junk-header"/>
     </hbox>
 
     <separator data-category="panePrivacy"/>
 
+    <html:div>
     <html:fieldset data-category="panePrivacy">
       <description data-l10n-id="junk-description"/>
       <separator class="thin"/>
       <hbox>
         <checkbox id="manualMark"
                   data-l10n-id="junk-label"
                   preference="mail.spam.manualMark"
                   oncommand="gPrivacyPane.updateManualMarkMode(this.checked);"/>
@@ -170,30 +177,32 @@
       <hbox align="start">
         <checkbox id="enableJunkLogging" data-l10n-id="junk-log-label"
                   oncommand="gPrivacyPane.updateJunkLogButton(this.checked);"
                   preference="mail.spam.logging.enabled"/>
         <spacer flex="1"/>
         <button id="openJunkLogButton" data-l10n-id="junk-log-button"
                 oncommand="gPrivacyPane.openJunkLog();"/>
       </hbox>
-      <hbox align="start" style="padding-bottom:2em;">
+      <hbox align="start">
         <spacer flex="1"/>
         <button data-l10n-id="reset-junk-button"
                 oncommand="gPrivacyPane.resetTrainingData()"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
 #ifdef MOZ_DATA_REPORTING
     <hbox id="privacyDataCollectionCategory"
           class="subcategory"
           data-category="panePrivacy">
       <html:h1 data-l10n-id="collection-header"/>
     </hbox>
 
+    <html:div>
     <html:fieldset data-category="panePrivacy">
       <description>
         <label class="tail-with-learn-more" data-l10n-id="collection-description"/>
         <label id="dataCollectionPrivacyNotice"
                class="learnMore" is="text-link"
                data-l10n-id="collection-privacy-notice"/>
       </description>
       <description>
@@ -232,54 +241,56 @@
                   class="tail-with-learn-more"
                   preference="browser.crashReports.unsubmittedCheck.autoSubmit2"
                   data-l10n-id="collection-backlogged-crash-reports"/>
         <label id="crashReporterLearnMore"
                class="learnMore" is="text-link" data-l10n-id="collection-backlogged-crash-reports-link"/>
       </hbox>
 #endif
       </vbox>
-
-      <hbox align="start" style="padding-bottom:2em;">
-        <spacer flex="1"/>
-      </hbox>
     </html:fieldset>
+    </html:div>
 #endif
 
     <hbox id="privacySecurityCategory"
           class="subcategory"
           data-category="panePrivacy">
       <html:h1 data-l10n-id="privacy-security-header"/>
     </hbox>
 
+    <html:div>
     <html:fieldset data-category="panePrivacy">
       <html:legend data-l10n-id="privacy-scam-detection-title"></html:legend>
       <description data-l10n-id="phishing-description"/>
       <separator class="thin"/>
       <hbox>
         <checkbox id="enablePhishingDetector"
                   data-l10n-id="phishing-label"
                   preference="mail.phishing.detection.enabled"/>
         <spacer flex="1"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
     <!-- Anti Virus -->
+    <html:div>
     <html:fieldset data-category="panePrivacy">
       <html:legend data-l10n-id="privacy-anti-virus-title"></html:legend>
       <description data-l10n-id="antivirus-description"/>
       <separator class="thin"/>
       <hbox>
         <checkbox id="enableAntiVirusQuarantine"
                   data-l10n-id="antivirus-label"
                   preference="mailnews.downloadToTempFile"/>
         <spacer flex="1"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset data-category="panePrivacy">
       <html:legend data-l10n-id="privacy-certificates-title"></html:legend>
       <description id="CertSelectionDesc" control="certSelection"
                    data-l10n-id="certificate-description"/>
 
       <!--
         The values on these radio buttons may look like l12y issues, but
         they're not - this preference uses *those strings* as its values.
@@ -312,10 +323,11 @@
                   preference="security.disable_button.openCertManager"/>
           <button id="viewSecurityDevicesButton"
                   data-l10n-id="security-devices-button"
                   oncommand="gPrivacyPane.showSecurityDevices();"
                   preference="security.disable_button.openDeviceManager"/>
         </vbox>
       </hbox>
     </html:fieldset>
+    </html:div>
 
   </prefpane>
--- a/mail/components/preferences/sendoptions.xhtml
+++ b/mail/components/preferences/sendoptions.xhtml
@@ -24,16 +24,17 @@
 
     <stringbundle id="bundlePreferences" src="chrome://messenger/locale/preferences/preferences.properties"/>
 
     <linkset>
       <html:link rel="localization" href="branding/brand.ftl"/>
       <html:link rel="localization" href="messenger/preferences/sendoptions.ftl"/>
     </linkset>
 
+    <html:div>
     <html:fieldset style="padding-bottom:2em;">
       <html:legend data-l10n-id="send-mail-title"></html:legend>
       <vbox>
         <checkbox id="autoDowngrade"
                   data-l10n-id="auto-downgrade-label"
                   preference="mailnews.sendformat.auto_downgrade"/>
 
         <label data-l10n-id="default-html-format-label"
@@ -51,16 +52,17 @@
           </menulist>
         </hbox>
 
         <separator class="thin"/>
 
         <description data-l10n-id="default-html-format-info"/>
       </vbox>
     </html:fieldset>
+    </html:div>
 
     <separator class="thin"/>
 
     <tabbox>
       <tabs id="sendOptionsTabs">
         <tab data-l10n-id="html-tab-label"/>
         <tab data-l10n-id="plain-tab-label"/>
       </tabs>
--- a/mail/extensions/am-e2e/am-e2e.inc.xhtml
+++ b/mail/extensions/am-e2e/am-e2e.inc.xhtml
@@ -19,16 +19,17 @@
           <html:span class="tail-with-learn-more">&e2eIntro.description;</html:span>
           <label is="text-link" id="acceptLearnMoreE2E"
                  href="https://support.mozilla.org/kb/introduction-to-e2e-encryption"
                  value="&e2eLearnMore.label;"/>
         </description>
       </vbox>
 
 #ifdef MOZ_OPENPGP
+      <html:div>
       <html:fieldset id="openpgpOptions">
         <html:legend>&openpgpKeys.label;</html:legend>
 
         <label id="identity_openpgp_key_nameLabel"
                value="&openpgpKey.message;" control="identity_openpgp_key_id"/>
         <hbox align="center" class="input-container">
           <html:input id="identity_openpgp_key_id" type="text"
                       class="input-inline"
@@ -47,18 +48,20 @@
                   oncommand="pgpClearKey('identity_openpgp_key_id')"/>
         </hbox>
 
         <hbox align="right">
           <button id="openOpenPGPKeyManagerButton" oncommand="BondOpenPGP.openKeyManager(window);"
                   label="&manageKeys.label;"/>
         </hbox>
       </html:fieldset>
+      </html:div>
 #endif
 
+      <html:div>
       <html:fieldset id="smimeOptions">
         <html:legend>&certificates2.label;</html:legend>
 
         <label id="identity_signing_cert_nameLabel"
                value="&signingCert2.message;" control="identity_signing_cert_name"
                prefstring="mail.identity.%identitykey%.encryptionpolicy"/>
 
         <hbox align="center" class="input-container">
@@ -106,19 +109,21 @@
         <hbox align="right">
           <button id="openCertManagerButton" oncommand="openCertManager();"
                   label="&manageCerts3.label;" accesskey="&manageCerts3.accesskey;"/>
           <button id="openDeviceManagerButton" oncommand="openDeviceManager();"
                   label="&manageDevices2.label;" accesskey="&manageDevices2.accesskey;"/>
         </hbox>
 
       </html:fieldset>
+      </html:div>
 
       <html:legend>&sendingDefaults.label;</html:legend>
 
+      <html:div>
       <html:fieldset id="encryption_titlebox">
         <description flex="1">&e2eEnc.description;</description>
 
         <radiogroup id="encryptionChoices" class="indent">
           <radio id="encrypt_no" wsm_persist="true" value="0"
                  label="&doNotEncrypt.label;"
                  accesskey="&doNotEncrypt.accesskey;"/>
           <!--
@@ -152,9 +157,10 @@
           <radio id="technology_prefer_openpgp" wsm_persist="true" value="2"
                  label="&technologyOpenPGP.label;"/>
 
           <radio id="technology_prefer_smime" wsm_persist="true" value="1"
                  label="&technologySMIME.label;"/>
         </radiogroup>
 #endif
       </html:fieldset>
+      </html:div>
     </vbox>
--- a/mailnews/base/prefs/content/SmtpServerEdit.xhtml
+++ b/mailnews/base/prefs/content/SmtpServerEdit.xhtml
@@ -21,16 +21,17 @@
   <stringbundle id="bundle_messenger"
                 src="chrome://messenger/locale/messenger.properties"/>
 
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://global/content/editMenuOverlay.js"/>
   <script src="chrome://messenger/content/SmtpServerEdit.js"/>
 
   <vbox id="smtpServerEditor">
+    <html:div>
     <html:fieldset>
       <html:legend>&settings.caption;</html:legend>
       <hbox flex="1">
         <vbox>
           <hbox flex="1" align="center">
             <label id="smtp.description.label"
                    value="&serverDescription.label;"
                    accesskey="&serverDescription.accesskey;"
@@ -68,19 +69,21 @@
                           preftype="int"
                           prefstring="mail.smtpserver.%serverkey%.port"/>
               <label value="&serverPortDefault.label;"/>
               <label id="smtp.defaultPort"/>
           </hbox>
         </vbox>
       </hbox>
     </html:fieldset>
+    </html:div>
 
     <separator class="thin"/>
 
+    <html:div>
     <html:fieldset>
       <html:legend>&security.caption;</html:legend>
 
       <hbox flex="1">
         <vbox>
           <hbox flex="1" align="center">
             <label value="&connectionSecurity.label;"
                    accesskey="&connectionSecurity.accesskey;"
@@ -131,11 +134,12 @@
                         class="input-inline"
                         preftype="string"
                         prefstring="mail.smtpserver.%serverkey%.username"
                         aria-labelledby="smtpUsernameLabel"/>
           </hbox>
         </vbox>
       </hbox>
     </html:fieldset>
+    </html:div>
   </vbox>
 </dialog>
 </window>
--- a/mailnews/base/prefs/content/am-addressing.inc.xhtml
+++ b/mailnews/base/prefs/content/am-addressing.inc.xhtml
@@ -1,15 +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/.
 
     <vbox flex="1" id="compositionAndAddressing">
       <stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
 
+      <html:div>
       <html:fieldset>
         <html:legend>&compositionGroupTitle.label;</html:legend>
         <hbox align="center">
           <checkbox wsm_persist="true" id="identity.composeHtml" label="&useHtml.label;"
                     accesskey="&useHtml.accesskey;"
                     prefattribute="value"
                     prefstring="mail.identity.%identitykey%.compose_html"/>
         </hbox>
@@ -62,19 +63,21 @@
 
         <hbox pack="end">
           <button id="globalComposingPrefsLink"
                   label="&globalComposingPrefs.label;"
                   accesskey="&globalComposingPrefs.accesskey;"
                   oncommand="showGlobalComposingPrefs();"/>
         </hbox>
       </html:fieldset>
+      </html:div>
 
       <separator class="thin"/>
 
+      <html:div>
       <html:fieldset>
         <html:legend>&addressingGroupTitle.label;</html:legend>
 #ifndef MOZ_THUNDERBIRD
         <hbox align="center">
           <checkbox wsm_persist="true" id="identity.autocompleteToMyDomain"
                     label="&autocompleteToMyDomain.label;"
                     accesskey="&autocompleteToMyDomain.accesskey;"
                     prefattribute="value"
@@ -113,9 +116,10 @@
 
         <hbox pack="end">
           <button id="globalAddressingPrefsLink"
                   label="&globalAddressingPrefs.label;"
                   accesskey="&globalAddressingPrefs.accesskey;"
                   oncommand="showGlobalAddressingPrefs();"/>
         </hbox>
       </html:fieldset>
+      </html:div>
     </vbox>
--- a/mailnews/base/prefs/content/am-archiveoptions.xhtml
+++ b/mailnews/base/prefs/content/am-archiveoptions.xhtml
@@ -27,16 +27,17 @@
              accesskey="&archiveYearly.accesskey;" class="indent"/>
       <radio label="&archiveMonthly.label;"
              accesskey="&archiveMonthly.accesskey;" class="indent"/>
     </radiogroup>
     <checkbox id="archiveKeepFolderStructure"
               label="&keepFolderStructure.label;"
               accesskey="&keepFolderStructure.accesskey;"/>
 
+    <html:div>
     <html:fieldset flex="1">
       <html:legend>&archiveExample.label;</html:legend>
       <hbox flex="1">
       <tree id="archiveTree" hidecolumnpicker="true" disabled="true" flex="1" style="min-height:8em;">
         <treecols>
           <treecol primary="true" hideheader="true" flex="1"
                    id="folderNameCol"/>
         </treecols>
@@ -91,11 +92,12 @@
                 </treechildren>
               </treeitem>
             </treechildren>
           </treeitem>
         </treechildren>
       </tree>
       </hbox>
     </html:fieldset>
+    </html:div>
   </vbox>
 </dialog>
 </window>
--- a/mailnews/base/prefs/content/am-copies.inc.xhtml
+++ b/mailnews/base/prefs/content/am-copies.inc.xhtml
@@ -25,16 +25,17 @@
            pref="true" preftype="int" prefattribute="value"
            prefstring="mail.identity.%identitykey%.drafts_folder_picker_mode"/>
     <label id="identity.archivesFolderPickerMode" hidden="true" wsm_persist="true"
            pref="true" preftype="int" prefattribute="value"
            prefstring="mail.identity.%identitykey%.archives_folder_picker_mode"/>
     <label id="identity.tmplFolderPickerMode" hidden="true" wsm_persist="true"
            pref="true" preftype="int" prefattribute="value"
            prefstring="mail.identity.%identitykey%.tmpl_folder_picker_mode"/>
+    <html:div>
     <html:fieldset id="copiesGroup">
       <html:legend>&sendingPrefix.label;</html:legend>
 
       <hbox align="center">
         <checkbox id="identity.doFcc" wsm_persist="true" label="&fccMailFolder.label;"
                   accesskey="&fccMailFolder.accesskey;"
                   prefattribute="value"
                   prefstring="mail.identity.%identitykey%.fcc"
@@ -122,17 +123,19 @@
                       type="text"
                       aria-labelledby="identity.doBcc"
                       prefstring="mail.identity.%identitykey%.doBccList"
                       class="uri-element input-inline"
                       placeholder="&bccAddressList.placeholder;"/>
         </vbox>
       </hbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset id="archivesGroup">
       <html:legend>&archivesTitle.label;</html:legend>
 
       <hbox pack="start">
         <checkbox id="identity.archiveEnabled" wsm_persist="true"
                   label="&keepArchives.label;"
                   accesskey="&keepArchives.accesskey;"
                   prefattribute="value"
@@ -183,17 +186,19 @@
       <hbox pack="end">
         <button id="archiveHierarchyButton"
                 class="depends-on-archive"
                 label="&archiveHierarchyButton.label;"
                 accesskey="&archiveHierarchyButton.accesskey;"
                 oncommand="ChangeArchiveHierarchy();"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset id="foldersGroup">
       <html:legend>&specialFolders.label;</html:legend>
 
       <hbox align="center">
         <label value="&keepDrafts2.label;" control="messageDrafts"/>
       </hbox>
 
       <radiogroup id="messageDrafts">
@@ -281,9 +286,10 @@
       </radiogroup>
       <hbox align="center">
         <checkbox id="identity.showSaveMsgDlg" wsm_persist="true" label="&saveMessageDlg.label;"
                   accesskey="&saveMessageDlg.accesskey;"
                   prefattribute="value"
                   prefstring="mail.identity.%identitykey%.showSaveMsgDlg"/>
       </hbox>
     </html:fieldset>
+    </html:div>
   </vbox>
--- a/mailnews/base/prefs/content/am-identity-edit.xhtml
+++ b/mailnews/base/prefs/content/am-identity-edit.xhtml
@@ -53,16 +53,17 @@
       <tab label="&copiesFoldersTab.label;"/>
       <tab label="&addressingTab.label;"/>
       <tab label="&e2eTitle.label;"/>
     </tabs>
 
     <tabpanels id="identityTabsPanels" flex="1">
       <!-- Identity Settings Tab -->
       <vbox flex="1" name="settings">
+        <html:div>
         <html:fieldset>
           <html:legend>&publicData.label;</html:legend>
           <html:table class="identity-table">
             <html:tr>
               <html:th>
                 <label id="identity.fullName.label"
                        value="&name.label;"
                        control="identity.fullName"
@@ -159,17 +160,19 @@
           <hbox align="center">
             <checkbox id="identity.attachVCard" label="&attachVCard.label;"
                       flex="1" accesskey="&attachVCard.accesskey;"/>
             <button class="push" label="&editVCard.label;"
                     accesskey="&editVCard.accesskey;" oncommand="editVCard()"/>
             <label id="identity.escapedVCard" hidden="true"/>
           </hbox>
         </html:fieldset>
+        </html:div>
 
+        <html:div>
         <html:fieldset>
           <html:legend>&privateData.label;</html:legend>
 
           <hbox align="center" class="input-container">
             <checkbox id="identity.catchAll"
                       label="&catchAll.label;"
                       accesskey="&catchAll.accesskey;"
                       style="margin-block:auto;"/>
@@ -209,16 +212,17 @@
                    style="margin-block: auto;"
                    control="identity.label"/>
             <html:input id="identity.label"
                         type="text"
                         class="input-inline"
                         aria-labelledby="identity.input.label"/>
           </hbox>
         </html:fieldset>
+        </html:div>
 
       </vbox>
 
       <!-- Copies & Folders Tab -->
 #include am-copies.inc.xhtml
 
       <!-- Composition & Addressing Tab -->
 #include am-addressing.inc.xhtml
--- a/mailnews/base/prefs/content/am-junk.xhtml
+++ b/mailnews/base/prefs/content/am-junk.xhtml
@@ -23,16 +23,17 @@
     <script src="chrome://messenger/content/am-prefs.js"/>
     <script src="chrome://messenger/content/amUtils.js"/>
     <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
 
     <hbox class="dialogheader">
       <label class="dialogheader-title" value="&junkSettings.label;"/>
     </hbox>
 
+    <html:div>
     <html:fieldset>
       <html:legend>&junkClassification.label;</html:legend>
 
       <label hidden="true"
              id="server.spamLevel"
              wsm_persist="true"
              pref="true"
              preftype="int"
@@ -118,20 +119,22 @@
         </hbox>
       </vbox>
 
       <separator class="thin"/>
 
       <description width="1">&ispHeadersWarning.label;</description>
 
     </html:fieldset>
+    </html:div>
 
     <separator/>
     <separator/>
 
+    <html:div>
     <html:fieldset>
       <html:legend>&junkActions.label;</html:legend>
 
       <checkbox id="server.moveOnSpam"
                 label="&move.label;"
                 accesskey="&move.accesskey;"
                 oncommand="updateJunkTargetsAndRetention();"
                 wsm_persist="true"
@@ -206,16 +209,17 @@
                     aria-labelledby="server.purgeSpam server.purgeSpamInterval purgeLabel"
                     prefstring="mail.server.%serverkey%.purgeSpamInterval"/>
         <label id="purgeLabel"
                value="&purge2.label;"
                control="server.purgeSpamInterval"/>
       </hbox>
 
     </html:fieldset>
+    </html:div>
 
     <separator class="thin"/>
 
     <hbox pack="end">
       <button id="globalJunkPrefsLink"
               label="&globalJunkPrefs.label;"
               accesskey="&globalJunkPrefs.accesskey;"
               oncommand="showGlobalJunkPrefs();"/>
--- a/mailnews/base/prefs/content/am-main.xhtml
+++ b/mailnews/base/prefs/content/am-main.xhtml
@@ -38,17 +38,18 @@
                   class="input-inline"
                   onblur="parent.setAccountLabel(gAccount.key, null, this.value);"
                   prefstring="mail.server.%serverkey%.name"
                   aria-labelledby="server.prettyName.label"/>
     </hbox>
 
     <separator/>
 
-    <html:fieldset style="width:20em !important;">
+    <html:div>
+    <html:fieldset>
       <html:legend>&identityTitle.label;</html:legend>
       <description>&identityDesc.label;</description>
       <separator class="thin"/>
       <html:table class="identity-table">
         <html:tr>
           <html:th>
             <label id="identity.fullName.label.label" value="&name.label;"
                    control="identity.fullName" accesskey="&name.accesskey;"/>
@@ -198,21 +199,21 @@
             <!-- list will be inserted here -->
           </menupopup>
         </menulist>
         <button id="editSmtp"
                 label="&smtpServerEdit.label;"
                 accesskey="&smtpServerEdit.accesskey;"
                 oncommand="editCurrentSMTP();"/>
       </hbox>
+    </html:fieldset>
+    </html:div>
 
-      <separator class="thin"/>
+    <separator class="thin"/>
 
-      <hbox align="center">
-        <spacer flex="1"/>
-        <button label="&manageIdentities.label;" oncommand="manageIdentities(event);"
-                accesskey="&manageIdentities.accesskey;"
-                wsm_persist="true" id="identity.manageIdentitiesbutton"/>
-      </hbox>
-    <!-- When the fieldset overflow works, move this back above the last separator -->
-    </html:fieldset>
+    <hbox align="center">
+      <spacer flex="1"/>
+      <button label="&manageIdentities.label;" oncommand="manageIdentities(event);"
+              accesskey="&manageIdentities.accesskey;"
+              wsm_persist="true" id="identity.manageIdentitiesbutton"/>
+    </hbox>
   </vbox></vbox>
 </window>
--- a/mailnews/base/prefs/content/am-offline.xhtml
+++ b/mailnews/base/prefs/content/am-offline.xhtml
@@ -23,16 +23,17 @@
            prefstring="mail.server.%serverkey%.autosync_max_age_days"/>
 
     <hbox id="headertitle" class="dialogheader">
       <label class="dialogheader-title"/>
     </hbox>
 
     <separator class="thin"/>
 
+    <html:div>
     <html:fieldset id="offline.titlebox" hidefor="movemail,pop3,none,rss">
       <html:legend>&syncGroupTitle.label;</html:legend>
 
       <vbox>
         <checkbox hidefor="movemail,pop3,nntp,none"
                   id="offline.folders" label="&allFoldersOffline2.label;"
                   oncommand="toggleOffline()"
                   accesskey="&allFoldersOffline2.accesskey;"/>
@@ -47,17 +48,19 @@
         </hbox>
 
         <hbox hidefor="movemail,pop3,imap,none" pack="end">
           <button label="&offlineSelectNntp.label;" accesskey="&offlineSelectNntp.accesskey;"
                   oncommand="onClickSelect()" id="selectNewsgroupsButton" class="selectForOfflineUseButton"/>
         </hbox>
       </vbox>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset id="diskspace.titlebox">
       <html:legend hidefor="movemail,pop3,none,rss">&diskspaceGroupTitle.label;</html:legend>
 
     <description hidefor="pop3,nntp,movemail,none,rss">&doNotDownloadImap.label;</description>
     <description hidefor="pop3,imap,movemail,none,rss">&doNotDownloadNntp.label;</description>
     <description hidefor="imap,nntp,none,rss">&doNotDownloadPop3Movemail.label;</description>
 
     <!-- IMAP Autosync Preference -->
@@ -161,10 +164,11 @@
                   label="&nntpRemoveMsgBody.label;" oncommand="onCheckItem('nntp.removeBodyMin', 'nntp.removeBody');"/>
         <html:input id="nntp.removeBodyMin" type="number"
                     class="size2 input-inline" min="1" value="30"
                     aria-labelledby="nntp.removeBody nntp.removeBodyMin daysOldMsg"/>
         <label value="&daysOld.label;" control="nntp.removeBodyMin" id="daysOldMsg"/>
     </hbox>
     </vbox>
     </html:fieldset>
+    </html:div>
   </vbox></vbox>
 </window>
--- a/mailnews/base/prefs/content/am-server.xhtml
+++ b/mailnews/base/prefs/content/am-server.xhtml
@@ -91,16 +91,17 @@
                     class="input-flex input-inline"
                     prefstring="mail.server.%serverkey%.realusername"
                     aria-labelledby="fixedUserName"/>
       </div>
     </div>
 
     <separator/>
 
+    <html:div>
     <html:fieldset hidefor="movemail">
       <html:legend>&securitySettings.label;</html:legend>
       <html:table>
         <html:tr>
           <html:td>
             <label value="&connectionSecurity.label;"
                    accesskey="&connectionSecurity.accesskey;"
                    control="server.socketType"/>
@@ -146,17 +147,19 @@
                 <menuitem id="authMethod-anysecure" value="8"/>
                 <menuitem id="authMethod-any" value="9"/>
               </menupopup>
             </menulist>
           </html:td>
         </html:tr>
       </html:table>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset>
       <html:legend>&serverSettings.label;</html:legend>
       <vbox align="start">
       <checkbox wsm_persist="true"
                 id="server.loginAtStartUp"
                 label="&loginAtStartup.label;"
                 accesskey="&loginAtStartup.accesskey;"
                 prefattribute="value"
@@ -347,17 +350,19 @@
       <label control="nntp.maxArticles" value="&maxMessagesEnd.label;" id="maxMessagesEnd"/>
     </hbox>
     <checkbox hidefor="pop3,imap,movemail" wsm_persist="true" id="nntp.pushAuth"
               label="&alwaysAuthenticate.label;"
               accesskey="&alwaysAuthenticate.accesskey;"
               prefattribute="value"
               prefstring="mail.server.%serverkey%.always_authenticate"/>
     </html:fieldset>
+    </html:div>
 
+    <html:div>
     <html:fieldset>
       <html:legend>&messageStorage.label;</html:legend>
 
       <hbox align="end">
         <vbox align="start" flex="1" id="exitHandlingBox=">
           <checkbox hidefor="pop3,nntp,movemail"
                     wsm_persist="true"
                     id="imap.cleanupInboxOnExit"
@@ -436,16 +441,17 @@
         <button id="browseForLocalFolder"
                 label="&browseFolder.label;"
                 filepickertitle="&localFolderPicker.label;"
                 accesskey="&browseFolder.accesskey;"
                 oncommand="BrowseForLocalFolders();"/>
       </hbox>
 
     </html:fieldset>
+    </html:div>
 
     <hbox hidefor="imap,pop3,movemail" align="center" valign="middle" iscontrolcontainer="true">
 
     <separator class="thin"/>
       <label value="&serverDefaultCharset2.label;" control="nntp.charset"/>
       <menulist is="menulist-charsetpicker-viewing" id="nntp.charset"
                 hidable="true"
                 hidefor="imap,pop3,movemail"
--- a/mailnews/base/prefs/content/am-serverwithnoidentities.xhtml
+++ b/mailnews/base/prefs/content/am-serverwithnoidentities.xhtml
@@ -44,16 +44,17 @@
                 size="30"
                 onblur="parent.setAccountLabel(gAccount.key, null, this.value);"
                 prefstring="mail.server.%serverkey%.name"
                 aria-labelledby="server.prettyName.label"/>
   </hbox>
 
   <separator class="thin"/>
 
+  <html:div>
   <html:fieldset>
     <html:legend>&messageStorage.label;</html:legend>
 
     <vbox align="start">
       <checkbox wsm_persist="true" id="server.emptyTrashOnExit"
                 label="&emptyTrashOnExit.label;"
                 accesskey="&emptyTrashOnExit.accesskey;"
                 prefattribute="value"
@@ -92,10 +93,11 @@
                     aria-labelledby="server.localPath.label"/>
       </hbox>
         <button id="browseForLocalFolder" label="&browseFolder.label;"
                 filepickertitle="&localFolderPicker.label;"
                 accesskey="&browseFolder.accesskey;"
                 oncommand="BrowseForLocalFolders()"/>
     </hbox>
   </html:fieldset>
+  </html:div>
   </vbox></vbox>
 </window>
--- a/mailnews/extensions/mdn/content/am-mdn.xhtml
+++ b/mailnews/extensions/mdn/content/am-mdn.xhtml
@@ -21,16 +21,17 @@
     <script src="chrome://messenger/content/am-mdn.js"/>
 
     <hbox class="dialogheader">
       <label class="dialogheader-title" value="&pane.title;"/>
     </hbox>
 
     <separator class="thin"/>
 
+    <html:div>
     <html:fieldset>
 
       <hbox id="prefChoices" align="center" flex="1">
         <radiogroup id="identity.use_custom_prefs" wsm_persist="true" genericattr="true"
                     preftype="bool" prefstring="mail.identity.%identitykey%.use_custom_prefs"
                     oncommand="EnableDisableCustomSettings();" flex="1">
           <radio id="identity.select_global_prefs"
                  value="false"
@@ -124,11 +125,12 @@
                   </menupopup>
                 </menulist>
               </vbox>
             </hbox>
           </radiogroup>
         </vbox>
       </vbox>
     </html:fieldset>
+    </html:div>
   </vbox></vbox>
 
 </window>
--- a/mailnews/extensions/newsblog/content/am-newsblog.xhtml
+++ b/mailnews/extensions/newsblog/content/am-newsblog.xhtml
@@ -47,26 +47,29 @@
                   size="30"
                   aria-labelledby="server.prettyNameLabel"
                   onblur="parent.setAccountLabel(gAccount.key, null, this.value);"
                   prefstring="mail.server.%serverkey%.name"/>
     </hbox>
 
     <separator class="thin"/>
 
+    <html:div>
     <html:fieldset>
       <html:legend>&serverSettings.label;</html:legend>
       <checkbox id="doBiff"
                 label="&biffAll.label;"
                 accesskey="&biffAll.accesskey;"
                 oncommand="setPrefs(this)"/>
     </html:fieldset>
+    </html:div>
 
     <separator class="thin"/>
 
+    <html:div>
     <html:fieldset>
       <html:legend>&newFeedSettings.label;</html:legend>
 
       <hbox align="center">
         <checkbox id="updateEnabled"
                   label="&biffStart.label;"
                   accesskey="&biffStart.accesskey;"
                   oncommand="setPrefs(this)"/>
@@ -103,27 +106,29 @@
                     label="&autotagUsePrefix.label;"
                     oncommand="setPrefs(this)"/>
           <html:input id="autotagPrefix" type="text" class="input-inline"
                       aria-labelledby="autotagUsePrefix"
                       placeholder="&autoTagPrefix.placeholder;"
                       onchange="setPrefs(this)"/>
       </hbox>
     </html:fieldset>
+    </html:div>
 
     <separator class="thin"/>
 
     <hbox pack="end">
       <button label="&manageSubscriptions.label;"
               accesskey="&manageSubscriptions.accesskey;"
               oncommand="openSubscriptionsDialog(gAccount.incomingServer.rootFolder);"/>
     </hbox>
 
     <separator class="thin"/>
 
+    <html:div>
     <html:fieldset>
       <html:legend>&messageStorage.label;</html:legend>
 
       <checkbox id="server.emptyTrashOnExit"
                 wsm_persist="true"
                 label="&emptyTrashOnExit.label;"
                 accesskey="&emptyTrashOnExit.accesskey;"
                 prefattribute="value"
@@ -146,10 +151,11 @@
                   label="&browseFolder.label;"
                   filepickertitle="&localFolderPicker.label;"
                   accesskey="&browseFolder.accesskey;"
                   oncommand="BrowseForLocalFolders();"/>
         </hbox>
       </vbox>
 
     </html:fieldset>
+    </html:div>
   </vbox></vbox>
 </window>