Bug 1535265 - Stop using <toolbar> where it provides no benefit over <hbox>; r=mkmelin
authorGeoff Lankow <geoff@darktrojan.net>
Tue, 23 Apr 2019 11:17:45 +1200
changeset 26405 3bdcf6d1a44527cdef3f0d953e0ce722d8f73c6c
parent 26404 49b8214906f20ace770a1c5c0b39bba7e5629a6e
child 26406 0532fb6e8fa386c644c2ffc1c043f857a4458a1b
push id15825
push usermozilla@jorgk.com
push dateTue, 23 Apr 2019 08:03:28 +0000
treeherdercomm-central@0532fb6e8fa3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1535265
Bug 1535265 - Stop using <toolbar> where it provides no benefit over <hbox>; r=mkmelin
calendar/base/content/calendar-extract.js
calendar/base/content/calendar-task-view.xul
calendar/lightning/content/imip-bar-overlay.xul
calendar/lightning/content/lightning-menus.xul
calendar/lightning/content/lightning-toolbar.xul
calendar/lightning/themes/common/lightning-toolbar.css
mail/base/content/folderPane.js
mail/base/content/mailCore.js
mail/base/content/mainMailToolbox.inc.xul
mail/base/content/messenger.css
mail/base/content/messenger.xul
mail/base/content/msgAttachmentView.inc.xul
mail/base/content/msgHdrPopup.inc.xul
mail/base/content/msgHdrView.inc.xul
mail/base/content/msgHdrView.js
mail/base/content/multimessageview.xhtml
mail/base/content/specialTabs.js
mail/locales/en-US/chrome/messenger/messenger.dtd
mail/locales/en-US/chrome/messenger/msgHdrViewOverlay.dtd
mail/test/mozmill/attachment/test-attachment.js
mail/test/mozmill/message-header/test-header-toolbar.js
mail/test/mozmill/message-header/test-message-header.js
mail/themes/linux/mail/messageHeader.css
mail/themes/linux/mail/primaryToolbar.css
mail/themes/osx/mail/messageHeader.css
mail/themes/osx/mail/primaryToolbar.css
mail/themes/shared/mail/messageHeader.css
mail/themes/windows/mail/messageHeader.css
mail/themes/windows/mail/primaryToolbar.css
--- a/calendar/base/content/calendar-extract.js
+++ b/calendar/base/content/calendar-extract.js
@@ -226,18 +226,16 @@ var calendarExtract = {
                 msgTree.removeEventListener("select", this.setState);
             });
         }
     },
 
     setState: function() {
         let eventButton = document.getElementById("extractEventButton");
         let taskButton = document.getElementById("extractTaskButton");
-        let hdrEventButton = document.getElementById("hdrExtractEventButton");
-        let hdrTaskButton = document.getElementById("hdrExtractTaskButton");
         let contextMenu = document.getElementById("mailContext-calendar-convert-menu");
         let contextMenuEvent = document.getElementById("mailContext-calendar-convert-event-menuitem");
         let contextMenuTask = document.getElementById("mailContext-calendar-convert-task-menuitem");
         let eventDisabled = (gFolderDisplay.selectedCount == 0);
         let taskDisabled = (gFolderDisplay.selectedCount == 0);
         let contextEventDisabled = false;
         let contextTaskDisabled = false;
         let newEvent = document.getElementById("calendar_new_event_command");
@@ -254,22 +252,16 @@ var calendarExtract = {
         }
 
         if (eventButton) {
             eventButton.disabled = eventDisabled;
         }
         if (taskButton) {
             taskButton.disabled = taskDisabled;
         }
-        if (hdrEventButton) {
-            hdrEventButton.disabled = eventDisabled;
-        }
-        if (hdrTaskButton) {
-            hdrTaskButton.disabled = taskDisabled;
-        }
 
         contextMenuEvent.disabled = contextEventDisabled;
         contextMenuTask.disabled = contextTaskDisabled;
 
         contextMenu.disabled = contextEventDisabled && contextTaskDisabled;
     }
 };
 
--- a/calendar/base/content/calendar-task-view.xul
+++ b/calendar/base/content/calendar-task-view.xul
@@ -60,17 +60,16 @@
               visible-columns="completed priority title entryDate dueDate"
               persist="visible-columns ordinals widths sort-active sort-direction height"
               context="taskitem-context-menu"/>
         <splitter id="calendar-task-view-splitter" collapse="none" persist="state" class="calendar-splitter"/>
         <vbox id="calendar-task-details-container"
               class="main-header-area"
               flex="1"
               persist="height"
-              context="task-actions-toolbar-context-menu"
               hidden="true">
           <hbox id="calendar-task-details">
             <grid id="calendar-task-details-grid" flex="1">
               <columns id="calendar-task-details-columns">
                 <column id="calendar-header-name-column"/>
                 <column id="calendar-header-value-column" flex="1"/>
               </columns>
 
@@ -98,32 +97,18 @@
                            hidden="true"/>
                     <label id="calendar-task-details-priority-high"
                            value="&calendar.task-details.priority.high.label;"
                            class="task-details-value"
                            crop="end"
                            flex="1"
                            hidden="true"/>
                     <hbox id="other-actions-box" align="end" flex="1" pack="end">
-                      <menupopup id="task-actions-toolbar-context-menu">
-                        <menuitem id="CustomizeTaskActionsToolbar"
-                                  oncommand="CustomizeMailToolbar('task-actions-toolbox', 'CustomizeTaskActionsToolbar')"
-                                  label="&calendar.menu.customize.label;"
-                                  accesskey="&calendar.menu.customize.accesskey;"/>
-                      </menupopup>
-
-                      <toolbox id="task-actions-toolbox"
-                               minwidth="50px"
-                               mode="full"
-                               iconsize="small"
-                               labelalign="end"
-                               defaultmode="full"
-                               defaulticonsize="small"
-                               defaultlabelalign="end">
-                        <toolbarpalette id="task-actions-toolbar-palette">
+                      <vbox id="task-actions-toolbox">
+                        <hbox id="task-actions-toolbar">
                           <toolbarbutton id="task-actions-category"
                                          type="menu"
                                          label="&calendar.unifinder.tree.categories.label;"
                                          tooltiptext="&calendar.task.category.button.tooltip;"
                                          command="calendar_task_category_command"
                                          observes="calendar_task_category_command"
                                          class="toolbarbutton-1 msgHeaderView-button">
                               <menupopup id="task-actions-category-popup"
@@ -155,29 +140,18 @@
                                          class="toolbarbutton-1 msgHeaderView-button">
                             <menupopup is="calendar-task-priority-menupopup" id="task-actions-priority-menupopup"/>
                           </toolbarbutton>
                           <toolbarbutton id="calendar-delete-task-button"
                                          class="toolbarbutton-1 msgHeaderView-button"
                                          label="&calendar.taskview.delete.label;"
                                          tooltiptext="&calendar.context.deletetask.label;"
                                          observes="calendar_delete_todo_command"/>
-                        </toolbarpalette>
-
-                        <toolbar id="task-actions-toolbar" align="start"
-                                 class="inline-toolbar"
-                                 customizable="true"
-                                 mode="full"
-                                 iconsize="small"
-                                 labelalign="end"
-                                 defaultmode="full"
-                                 defaulticonsize="small"
-                                 context="task-actions-toolbar-context-menu"
-                                 defaultset="task-actions-category,task-actions-markcompleted,task-actions-priority,calendar-delete-task-button"/>
-                      </toolbox>
+                        </hbox>
+                      </vbox>
                     </hbox>
                   </hbox>
                 </row>
                 <row id="calendar-task-details-title-row"
                      align="top"
                      hidden="true">
                   <label value="&calendar.task-details.title.label;"
                          class="task-details-name"/>
--- a/calendar/lightning/content/imip-bar-overlay.xul
+++ b/calendar/lightning/content/imip-bar-overlay.xul
@@ -60,27 +60,18 @@
              -    * bubbling up of events from menuitems to toolbarbutton must be prevented
              -      by adding a trailing "if (event.target.id == this.id) " to the respective
              -      ltnImipBar.executeAction(...)
              -    * toolbarbutton's oncommand should end with the first menuitem's oncommand
              -      to not break automated conforming
              -      e.g. "if (event.target.id == this.id) ltnImipBar.executeAction('ACCEPTED');"
              -      and "ltnImipBar.executeAction('ACCEPTED');"
              //-->
-          <toolbox id="imip-view-toolbox"
-                   class="inline-toolbox"
-                   defaulticonsize="small"
-                   minwidth="50px"
-                   defaultlabelalign="end"
-                   labelalign="end"
-                   defaultmode="full"
-                   inlinetoolbox="true">
-            <toolbar id="imip-view-toolbar" class="inline-toolbar" align="start"
-                     customizable="false" mode="full"
-                     defaulticonsize="small" defaultmode="full">
+          <vbox id="imip-view-toolbox">
+            <hbox id="imip-view-toolbar">
 
               <!-- show event/invitation details -->
               <toolbarbutton id="imipDetailsButton"
                              label="&lightning.imipbar.btnDetails.label;"
                              tooltiptext="&lightning.imipbar.btnDetails.tooltiptext;"
                              class="toolbarbutton-1 msgHeaderView-button imipDetailsButton"
                              oncommand="ltnImipBar.executeAction('X-SHOWDETAILS')"
                              hidden="true"/>
@@ -305,14 +296,14 @@
                 <menupopup id="imipMoreDropdown">
                   <menuitem id="imipMoreButton_SaveCopy"
                             tooltiptext="&lightning.imipbar.btnSaveCopy.tooltiptext;"
                             label="&lightning.imipbar.btnSaveCopy.label;"
                             oncommand="ltnImipBar.executeAction('X-SAVECOPY');"/>
                   <!-- add here a menuitem as needed -->
                 </menupopup>
               </toolbarbutton>
-            </toolbar>
-          </toolbox>
+            </hbox>
+          </vbox>
         </hbox>
       </vbox>
     </vbox>
 </overlay>
--- a/calendar/lightning/content/lightning-menus.xul
+++ b/calendar/lightning/content/lightning-menus.xul
@@ -459,16 +459,33 @@
         <menuitem id="mailContext-calendar-convert-task-menuitem"
                   label="&calendar.context.convertmenu.task.label;"
                   accesskey="&calendar.context.convertmenu.task.accesskey;"
                   oncommand="calendarExtract.extractFromEmail(false)" />
       </menupopup>
     </menu>
   </menupopup>
 
+  <menupopup id="otherActionsPopup">
+    <menu id="otherActions-calendar-convert-menu"
+          label="&calendar.context.convertmenu.label;"
+          accesskey="&calendar.context.convertmenu.accesskey.mail;">
+      <menupopup id="otherActions-calendar-convert-menupopup">
+        <menuitem id="otherActions-calendar-convert-event-menuitem"
+                  label="&calendar.context.convertmenu.event.label;"
+                  accesskey="&calendar.context.convertmenu.event.accesskey;"
+                  oncommand="calendarExtract.extractFromEmail(true)" />
+        <menuitem id="otherActions-calendar-convert-task-menuitem"
+                  label="&calendar.context.convertmenu.task.label;"
+                  accesskey="&calendar.context.convertmenu.task.accesskey;"
+                  oncommand="calendarExtract.extractFromEmail(false)" />
+      </menupopup>
+    </menu>
+  </menupopup>
+
   <menupopup id="toolbar-context-menu"
              onpopupshowing="onToolbarsPopupShowingForTabType(event);"/>
 
 <!-- AppMenu integration -->
   <menupopup id="appmenu_newMenupopup">
     <menuitem id="appmenu_ltnNewEvent"
               label="&lightning.menupopup.new.event.label;"
               insertbefore="appmenu_newFolder"
--- a/calendar/lightning/content/lightning-toolbar.xul
+++ b/calendar/lightning/content/lightning-toolbar.xul
@@ -85,39 +85,16 @@
                    tooltiptext="&calendar.extract.task.button.tooltip;"
                    oncommand="calendarExtract.extractFromEmail(false);">
       <menupopup id="extractTaskLocaleList"
                  oncommand="calendarExtract.extractWithLocale(event, false);"
                  onpopupshowing="calendarExtract.onShowLocaleMenu(event.target);"/>
     </toolbarbutton>
   </toolbarpalette>
 
-  <toolbarpalette id="header-view-toolbar-palette">
-    <toolbarbutton id="hdrExtractEventButton"
-                   class="toolbarbutton-1 msgHeaderView-button"
-                   type="menu-button"
-                   label="&calendar.extract.event.button;"
-                   tooltiptext="&calendar.extract.event.button.tooltip;"
-                   oncommand="calendarExtract.extractFromEmail(true)">
-      <menupopup id="hdrExtractEventLocaleList"
-                 oncommand="calendarExtract.extractWithLocale(event, true);"
-                 onpopupshowing="calendarExtract.onShowLocaleMenu(event.target);"/>
-    </toolbarbutton>
-    <toolbarbutton id="hdrExtractTaskButton"
-                   class="toolbarbutton-1 msgHeaderView-button"
-                   type="menu-button"
-                   label="&calendar.extract.task.button;"
-                   tooltiptext="&calendar.extract.task.button.tooltip;"
-                   oncommand="calendarExtract.extractFromEmail(false)">
-      <menupopup id="hdrExtractTaskLocaleList"
-                 oncommand="calendarExtract.extractWithLocale(event, false);"
-                 onpopupshowing="calendarExtract.onShowLocaleMenu(event.target);"/>
-    </toolbarbutton>
-  </toolbarpalette>
-
   <toolbox id="calendar-toolbox"
            class="mail-toolbox"
            mode="full"
            defaultmode="full"
            iconsize="small"
            defaulticonsize="small"
            labelalign="end"
            defaultlabelalign="end">
--- a/calendar/lightning/themes/common/lightning-toolbar.css
+++ b/calendar/lightning/themes/common/lightning-toolbar.css
@@ -15,24 +15,22 @@
 /* Toolbar buttons */
 #calendar-synchronize-button,
 #task-synchronize-button {
     list-style-image: url(chrome://calendar-common/skin/icons/synchronize.svg);
 }
 
 #extractEventButton,
 #task-newevent-button,
-#hdrExtractEventButton,
 #calendar-newevent-button {
     list-style-image: url(chrome://calendar-common/skin/icons/newevent.svg);
 }
 
 #extractTaskButton,
 #task-newtask-button,
-#hdrExtractTaskButton,
 #calendar-newtask-button {
     list-style-image: url(chrome://calendar-common/skin/icons/newtask.svg);
 }
 
 #calendar-edit-button,
 #task-edit-button {
     list-style-image: url(chrome://calendar-common/skin/icons/edit.svg);
 }
--- a/mail/base/content/folderPane.js
+++ b/mail/base/content/folderPane.js
@@ -139,16 +139,23 @@ var IFolderTreeMode = {
 var gFolderTreeView = {
   messengerBundle: null,
 
   /**
    * Called when the window is initially loaded.  This function initializes the
    * folder-pane to the view last shown before the application was closed.
    */
   load(aTree, aJSONFile) {
+    // Add the folder pane toolbar to the list of toolbars that can be shown and hidden.
+    // It's really not a toolbar any more, but some people like it, some don't.
+    let toolbox = document.getElementById("mail-toolbox");
+    if (toolbox) {
+      toolbox.externalToolbars.push(document.getElementById("folderPane-toolbar"));
+    }
+
     this._treeElement = aTree;
     this.messengerBundle = document.getElementById("bundle_messenger");
 
     // the folder pane can be used for other trees which may not have these elements.
     if (document.getElementById("folderpane_splitter"))
       document.getElementById("folderpane_splitter").collapsed = false;
     if (document.getElementById("folderPaneBox"))
       document.getElementById("folderPaneBox").collapsed = false;
--- a/mail/base/content/mailCore.js
+++ b/mail/base/content/mailCore.js
@@ -134,18 +134,16 @@ function overlayOnLoad() {
   let toolbox = null;
   if ("arguments" in window && window.arguments[0])
     toolbox = window.arguments[0];
   else if (window.frameElement && "toolbox" in window.frameElement)
     toolbox = window.frameElement.toolbox;
 
   let toolbarWindow = document.getElementById("CustomizeToolbarWindow");
   toolbarWindow.setAttribute("toolboxId", toolbox.id);
-  if (toolbox.getAttribute("inlinetoolbox") == "true")
-    toolbarWindow.setAttribute("inlinetoolbox", "true");
   toolbox.setAttribute("doCustomization", "true");
 
   let mode = toolbox.getAttribute("mode");
   let align = toolbox.getAttribute("labelalign");
   if (mode == "full" && align == "end")
     toolbox.setAttribute("mode", "textbesideicon");
 
   onLoad();
--- a/mail/base/content/mainMailToolbox.inc.xul
+++ b/mail/base/content/mainMailToolbox.inc.xul
@@ -314,29 +314,16 @@
                    label="&stopButton.label;"
                    tooltiptext="&stopButton.tooltip;"
                    command="cmd_stop"/>
     <toolbarbutton id="button-appmenu"
                    type="menu"
                    class="toolbarbutton-1 button-appmenu"
                    label="&appmenuButton.label;"
                    tooltiptext="&appmenuButton1.tooltip;"/>
-    <toolbaritem id="folderpane-mode-selector"
-                 title="&folderModeSelector.label;"
-                 align="center">
-      <menulist id="folderpane-mode-selector-menulist"
-                sizetopopup="none"
-                crop="center"
-                flex="1"
-                label="&folderModeSelector.label;"
-                oncommand="gFolderTreeView.mode = this.value;">
-        <menupopup id="folderpane-mode-selector-popup"
-                   onpopupshowing="gFolderTreeView._initFolderModeSelector();"/>
-      </menulist>
-    </toolbaritem>
 #ifdef MAIN_WINDOW
     <!-- gloda search widget; provides global (message) searching.  -->
     <toolbaritem id="gloda-search" insertafter="button-stop"
                  title="&glodaSearch.title;"
                  align="center"
                  flex="1"
                  class="chromeclass-toolbar-additional">
         <textbox id="searchInput"
--- a/mail/base/content/messenger.css
+++ b/mail/base/content/messenger.css
@@ -263,18 +263,17 @@ toolbar[type="menubar"][autohide="true"]
 :root[lwthemeicons~="--prevUnread-icon"] #button-previousUnread:-moz-lwtheme {
   list-style-image: var(--prevUnread-icon) !important;
 }
 
 :root[lwthemeicons~="--mark-icon"] #button-mark:-moz-lwtheme {
   list-style-image: var(--mark-icon) !important;
 }
 
-:root[lwthemeicons~="--tag-icon"] #button-tag:-moz-lwtheme,
-:root[lwthemeicons~="--tag-icon"] #hdrTagButton:-moz-lwtheme {
+:root[lwthemeicons~="--tag-icon"] #button-tag:-moz-lwtheme {
   list-style-image: var(--tag-icon) !important;
 }
 
 :root[lwthemeicons~="--back-icon"] #button-goback:-moz-lwtheme {
   list-style-image: var(--back-icon) !important;
 }
 
 :root[lwthemeicons~="--forward-icon"] #button-goforward:-moz-lwtheme {
@@ -301,18 +300,17 @@ toolbar[type="menubar"][autohide="true"]
 :root[lwthemeicons~="--prevMsg-icon"] #button-previousMsg:-moz-lwtheme {
   list-style-image: var(--prevMsg-icon) !important;
 }
 
 :root[lwthemeicons~="--QFB-icon"] #qfb-show-filter-bar:-moz-lwtheme {
   list-style-image: var(--QFB-icon) !important;
 }
 
-:root[lwthemeicons~="--conversation-icon"] #button-showconversation:-moz-lwtheme,
-:root[lwthemeicons~="--conversation-icon"] #hdrOpenConversationButton:-moz-lwtheme {
+:root[lwthemeicons~="--conversation-icon"] #button-showconversation:-moz-lwtheme {
   list-style-image: var(--conversation-icon) !important;
 }
 
 :root[lwthemeicons~="--conversation-icon"] #button-showconversation:-moz-lwtheme {
   list-style-image: var(--conversation-icon) !important;
 }
 
 :root[lwthemeicons~="--app_menu-icon"] .button-appmenu:-moz-lwtheme {
--- a/mail/base/content/messenger.xul
+++ b/mail/base/content/messenger.xul
@@ -449,30 +449,37 @@
              beneath both of them. -->
         <box id="mailContent" orient="vertical" flex="1">
           <!-- mail-toolbox with the main toolbarbuttons -->
 #include mainMailToolbox.inc.xul
 
           <box id="messengerBox" orient="horizontal" flex="1" minheight="100" height="100" persist="height">
             <vbox id="folderPaneBox" minwidth="125" width="200" persist="width">
               <sidebarheader id="folderPaneHeader" hidden="true" align="center"/>
-              <toolbox id="folderPane-toolbox">
-                <toolbar id="folderPane-toolbar"
-                         class="inline-toolbar"
-                         toolboxid="mail-toolbox"
-                         toolbarname="&folderPaneBar.label;"
-                         accesskey="&folderPaneBar.accesskey;"
-                         customizable="true"
-                         align="start"
-                         mode="icons" defaultmode="icons" lockmode="true"
-                         iconsize="small" defaulticonsize="small" lockiconsize="true"
-                         context="toolbar-context-menu"
-                         defaultset="folderpane-mode-selector"
-                         collapsed="true"/>
-              </toolbox>
+              <vbox id="folderPane-toolbox">
+                <hbox id="folderPane-toolbar"
+                      class="inline-toolbar"
+                      toolboxid="mail-toolbox"
+                      toolbarname="&folderPaneBar.label;"
+                      accesskey="&folderPaneBar.accesskey;"
+                      context="toolbar-context-menu"
+                      collapsed="true">
+                  <toolbaritem id="folderpane-mode-selector"
+                               flex="1">
+                    <menulist id="folderpane-mode-selector-menulist"
+                              sizetopopup="none"
+                              crop="center"
+                              flex="1"
+                              oncommand="gFolderTreeView.mode = this.value;">
+                      <menupopup id="folderpane-mode-selector-popup"
+                                 onpopupshowing="gFolderTreeView._initFolderModeSelector();"/>
+                    </menulist>
+                  </toolbaritem>
+                </hbox>
+              </vbox>
               <tree id="folderTree" class="plain" flex="1"
                     hidecolumnpicker="true" persist="mode" mode="all"
                     keepcurrentinview="true"
                     context="folderPaneContext"
                     disableKeyNavigation="true"
                     ondragstart="gFolderTreeView._onDragStart(event);"
                     ondragover="gFolderTreeView._onDragOver(event);"
                     ondrop="gFolderTreeView._onDragDrop(event);"
@@ -700,52 +707,51 @@
           </box>
         </box> <!-- end of mailContent -->
 #include ../../components/im/content/chat-messenger.inc.xul
       </tabpanels>
      </tabbox>
     </tabmail>
     <vbox id="contentTab" collapsed="true">
       <vbox flex="1" class="contentTabInstance">
-        <toolbox id="dummycontenttoolbox" class="contentTabToolbox">
-          <toolbar id="dummycontenttoolbar" class="contentTabToolbar">
-            <toolbarspacer/>
-            <toolbaritem class="contentTabAddress" align="center">
-              <hbox class="themeableSearchBox" align="center">
+        <vbox id="dummycontenttoolbox" class="contentTabToolbox">
+          <hbox id="dummycontenttoolbar" class="contentTabToolbar">
+            <toolbaritem class="contentTabAddress" align="center" flex="1">
+              <hbox class="themeableSearchBox" align="center" flex="1">
                 <image class="contentTabSecurity"/>
-                <description class="contentTabUrlbar"/>
+                <label class="contentTabUrlbar" crop="end" flex="1"/>
               </hbox>
             </toolbaritem>
-          </toolbar>
-        </toolbox>
+          </hbox>
+        </vbox>
         <notificationbox flex="1" notificationside="top">
           <browser id="dummycontentbrowser" type="content" flex="1"
                    disablehistory="true" autocompletepopup="PopupAutoComplete"
                    context="mailContext"/>
         </notificationbox>
       </vbox>
     </vbox>
 
     <vbox id="chromeTab" collapsed="true">
       <vbox flex="1" class="chromeTabInstance">
-        <toolbox id="dummychrometoolbox" class="contentTabToolbox">
-          <toolbar id="dummychrometoolbar" class="contentTabToolbar"></toolbar>
-        </toolbox>
+        <vbox id="dummychrometoolbox" class="contentTabToolbox">
+          <hbox id="dummychrometoolbar" class="contentTabToolbar"></hbox>
+        </vbox>
         <notificationbox flex="1" notificationside="top">
           <browser id="dummychromebrowser" flex="1"
                    disablesecurity="true" disablehistory="true"
                    autocompletepopup="PopupAutoComplete"/>
         </notificationbox>
       </vbox>
     </vbox>
 
     <vbox id="glodaTab" collapsed="true">
       <vbox flex="1" class="chromeTabInstance">
-        <toolbox class="contentTabToolbox">
-          <toolbar class="glodaTabToolbar inline-toolbar chromeclass-toolbar">
+        <vbox class="contentTabToolbox">
+          <hbox class="glodaTabToolbar inline-toolbar chromeclass-toolbar" flex="1">
             <spacer flex="1" />
             <spacer flex="1" />
             <hbox flex="1" class="remote-gloda-search-container">
               <textbox class="remote-gloda-search searchBox"
                        flex="1"
                        type="glodacomplete"
                        searchbutton="true"
                        autocompletesearch="gloda"
@@ -757,18 +763,18 @@
                        emptytextbase="&search.label.base1;"
                        keyLabelNonMac="&search.keyLabel.nonmac;"
                        keyLabelMac="&search.keyLabel.mac;">
                 <hbox>
                   <image class="gloda-search-icon" />
                 </hbox>
               </textbox>
             </hbox>
-          </toolbar>
-        </toolbox>
+          </hbox>
+        </vbox>
         <iframe flex="1"/>
       </vbox>
     </vbox>
     <vbox id="preferencesTab" collapsed="true">
       <vbox flex="1">
         <notificationbox flex="1">
           <browser id="preferencesbrowser"
                    type="content"
--- a/mail/base/content/msgAttachmentView.inc.xul
+++ b/mail/base/content/msgAttachmentView.inc.xul
@@ -22,24 +22,19 @@
                                    ondragstart="nsDragAndDrop.startDrag(event, attachmentNameDNDObserver);"/>
                             <label id="attachmentSize"/>
                           </hbox>
                           <!-- Use a very large flex value here so that attachmentCount doesn't take
                                up more space than necessary, but still crops itself if there's not
                                enough space. -->
                           <spacer flex="9999"/>
 
-                          <toolbox id="attachment-view-toolbox"
-                                   class="inline-toolbox"
-                                   defaulticonsize="small"
-                                   minwidth="50px"
-                                   defaultlabelalign="end"
-                                   defaultmode="full"
-                                   inlinetoolbox="true">
-                            <toolbarpalette id="attachment-view-toolbar-palette">
+                          <vbox id="attachment-view-toolbox">
+                            <hbox id="attachment-view-toolbar"
+                                  context="attachment-toolbar-context-menu">
                               <toolbaritem id="attachmentSaveAll"
                                            title="&saveAllAttachmentsButton1.label;">
                                 <toolbarbutton type="menu-button" id="attachmentSaveAllSingle"
                                                class="toolbarbutton-1 msgHeaderView-button"
                                                label="&saveAttachmentButton1.label;"
                                                tooltiptext="&saveAttachmentButton1.tooltip;"
                                                onclick="event.stopPropagation();"
                                                oncommand="TryHandleAllAttachments('saveAs'); RestoreFocusAfterHdrButton();"
@@ -88,23 +83,18 @@
                                               accesskey="&detachAllAttachmentsCmd.accesskey;"/>
                                     <menuitem id="button-deleteAllAttachments"
                                               oncommand="TryHandleAllAttachments('delete'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
                                               label="&deleteAllAttachmentsCmd.label;"
                                               accesskey="&deleteAllAttachmentsCmd.accesskey;"/>
                                   </menupopup>
                                 </toolbarbutton>
                               </toolbaritem>
-                            </toolbarpalette>
-                            <toolbar id="attachment-view-toolbar" class="inline-toolbar"
-                                     customizable="true" mode="full"
-                                     context="attachment-toolbar-context-menu"
-                                     defaulticonsize="small" defaultmode="full"
-                                     defaultset="attachmentSaveAll"/>
-                          </toolbox>
+                            </hbox>
+                          </vbox>
                         </hbox>
                         <richlistbox id="attachmentList"
                                      class="attachmentList"
                                      orient="horizontal"
                                      flex="1"
                                      seltype="multiple"
                                      context="attachmentListContext"
                                      itemcontext="attachmentItemContext"
--- a/mail/base/content/msgHdrPopup.inc.xul
+++ b/mail/base/content/msgHdrPopup.inc.xul
@@ -110,35 +110,23 @@
      <menuitem label="&detachAllAttachmentsCmd.label;"
                accesskey="&detachAllAttachmentsCmd.accesskey;"
                command="cmd_detachAllAttachments" />
      <menuitem label="&deleteAllAttachmentsCmd.label;"
                accesskey="&deleteAllAttachmentsCmd.accesskey;"
                command="cmd_deleteAllAttachments" />
   </menupopup>
 
-  <menupopup id="header-toolbar-context-menu">
-    <menuitem id="CustomizeHeaderToolbar"
-              oncommand="CustomizeMailToolbar('header-view-toolbox', 'CustomizeHeaderToolbar')"
-              label="&customizeToolbar.label;"
-              accesskey="&customizeToolbar.accesskey;"/>
-  </menupopup>
-
   <menupopup id="attachment-toolbar-context-menu"
              onpopupshowing="return onShowAttachmentToolbarContextMenu(event);">
     <menuitem id="context-expandAttachmentBar"
               type="checkbox"
               label="&startExpandedCmd.label;"
               accesskey="&startExpandedCmd.accesskey;"
               oncommand="Services.prefs.setBoolPref('mailnews.attachments.display.start_expanded', this.getAttribute('checked'));"/>
-    <menuseparator/>
-    <menuitem id="CustomizeAttachmentToolbar"
-              oncommand="CustomizeMailToolbar('attachment-view-toolbox', 'CustomizeAttachmentToolbar')"
-              label="&customizeToolbar.label;"
-              accesskey="&customizeToolbar.accesskey;"/>
   </menupopup>
 
   <menupopup id="copyUrlPopup"
              popupanchor="bottomleft">
     <menuitem label="&copyLinkCmd.label;"
               accesskey="&copyLinkCmd.accesskey;"
               oncommand="CopyWebsiteAddress(document.popupNode)"/>
   </menupopup>
--- a/mail/base/content/msgHdrView.inc.xul
+++ b/mail/base/content/msgHdrView.inc.xul
@@ -13,84 +13,25 @@
                             <vbox id="expandedHeadersBox" flex="1">
 
                               <!-- This hbox has display:block set to imbue it with the HTML layout
                                    model. This lets us float the message header toolbar to the right
                                    so we don't waste space when the From field and the toolbar could
                                    fit alongside each other. -->
                               <hbox id="expandedHeadersTopBox" flex="1">
 
-                                <toolbox id="header-view-toolbox"
-                                         class="inline-toolbox"
-                                         defaulticonsize="small"
-                                         minwidth="50px"
-                                         defaultlabelalign="end"
-                                         defaultmode="full"
-                                         inlinetoolbox="true">
-                                  <toolbarpalette id="header-view-toolbar-palette">
+                                <vbox id="header-view-toolbox">
+                                  <hbox id="header-view-toolbar">
                                     <!-- XXXdmose need to move these commands to a controller, either
                                          on the header view, the message pane, or the default
                                          controller -->
 
                                     <!-- XXXdmose need to audit our shortcut/a11y setup and make sure
                                          these buttons are doing the right thing -->
 
-                                    <toolbarbutton id="hdrForwardButton"
-                                                   label="&hdrForwardButton1.label;"
-                                                   tooltiptext="&hdrForwardButton1.tooltip;"
-                                                   oncommand="MsgForwardMessage(event); RestoreFocusAfterHdrButton();"
-                                                   observes="button_forward"
-                                                   class="toolbarbutton-1 msgHeaderView-button hdrForwardButton"/>
-                                    <toolbaritem id="hdrMenuForwardButton" label="&hdrMenuForwardButton.label;">
-                                    <!-- This toolbaritem is a dummy and should only be shown when
-                                         customizing the toolbar to distinguish the forward button
-                                         from the forward dual-button. -->
-                                      <toolbarbutton id="hdrDualForwardButton"
-                                                     label="&hdrForwardButton1.label;"
-                                                     tooltiptext="&hdrForwardButton1.tooltip;"
-                                                     oncommand="MsgForwardMessage(event); RestoreFocusAfterHdrButton();"
-                                                     observes="button_forward"
-                                                     class="toolbarbutton-1 msgHeaderView-button hdrForwardButton"
-                                                     type="menu-button">
-                                        <menupopup id="hdrForwardDropdown">
-                                          <menuitem id="hdrForwardAsInlineMenu"
-                                                    label="&buttonMenuForwardAsInline.label;"
-                                                    tooltiptext="&forwardAsInline.tooltip;"
-                                                    command="cmd_forwardInline"/>
-                                          <menuitem id="hdrForwardAsAttachmentMenu"
-                                                    label="&buttonMenuForwardAsAttachment.label;"
-                                                    tooltiptext="&forwardAsAttachment.tooltip;"
-                                                    command="cmd_forwardAttachment"/>
-                                        </menupopup>
-                                      </toolbarbutton>
-                                    </toolbaritem>
-                                    <toolbarbutton id="hdrArchiveButton"
-                                                   label="&hdrArchiveButton1.label;"
-                                                   tooltiptext="&hdrArchiveButton1.tooltip;"
-                                                   oncommand="MsgArchiveSelectedMessages(event); RestoreFocusAfterHdrButton();"
-                                                   observes="button_archive"
-                                                   class="toolbarbutton-1 msgHeaderView-button hdrArchiveButton"/>
-                                    <toolbarbutton id="hdrJunkButton" label="&hdrJunkButton1.label;"
-                                                   tooltiptext="&hdrJunkButton1.tooltip;"
-                                                   observes="button_junk"
-                                                   class="toolbarbutton-1 msgHeaderView-button hdrJunkButton"
-                                                   oncommand="goDoCommand('button_junk'); RestoreFocusAfterHdrButton();"/>
-                                    <toolbarbutton id="hdrTrashButton"
-                                                   label="&hdrTrashButton1.label;"
-                                                   tooltiptext="&hdrTrashButton1.tooltip;"
-                                                   observes="button_delete"
-                                                   class="toolbarbutton-1 msgHeaderView-button hdrTrashButton"
-                                                   oncommand="goDoCommand(event.shiftKey ? 'button_shiftDelete' :
-                                                                          'button_delete'); RestoreFocusAfterHdrButton();"/>
-                                    <toolbarbutton id="hdrOpenConversationButton"
-                                                   label="&hdrOpenConversationButton1.label;"
-                                                   tooltiptext="&hdrOpenConversationButton1.tooltip;"
-                                                   observes="button_showconversation"
-                                                   class="toolbarbutton-1 msgHeaderView-button hdrConversationButton"
-                                                   oncommand="gConversationOpener.openConversationForMessages(gFolderDisplay.selectedMessages); RestoreFocusAfterHdrButton();"/>
                                     <toolbarbutton id="hdrReplyToSenderButton" label="&hdrReplyButton1.label;"
                                                    tooltiptext="&hdrReplyButton2.tooltip;"
                                                    oncommand="MsgReplySender(event); RestoreFocusAfterHdrButton();"
                                                    observes="button_reply"
                                                    class="toolbarbutton-1 msgHeaderView-button hdrReplyToSenderButton"/>
                                     <toolbaritem id="hdrSmartReplyButton" label="&hdrSmartReplyButton1.label;">
                                       <!-- This button is a dummy and should only be shown when
                                            customizing the toolbar to distinguish the smart reply
@@ -175,38 +116,40 @@
                                                     label="&hdrReplyButton1.label;"
                                                     tooltiptext="&hdrReplyButton2.tooltip;"
                                                     observes="button_reply"
                                                     oncommand="MsgReplySender(event); event.stopPropagation();
                                                                RestoreFocusAfterHdrButton();"/>
                                         </menupopup>
                                       </toolbarbutton>
                                     </toolbaritem>
-                                    <toolbarbutton id="hdrTagButton"
-                                                   type="menu"
-                                                   class="toolbarbutton-1 msgHeaderView-button hdrTagButton"
-                                                   label="&tagButton.label;"
-                                                   tooltiptext="&tagButton.tooltip;"
-                                                   command="cmd_tag">
-                                      <menupopup id="hdrTagDropdown"
-                                                 onpopupshowing="InitMessageTags(this);">
-                                        <menuitem id="hdrTagDropdown-addNewTag"
-                                                  label="&addNewTag.label;"
-                                                  accesskey="&addNewTag.accesskey;"
-                                                  command="cmd_addTag"/>
-                                        <menuitem id="manageTags"
-                                                  label="&manageTags.label;"
-                                                  accesskey="&manageTags.accesskey;"
-                                                  command="cmd_manageTags"/>
-                                        <menuseparator id="hdrTagDropdown-sep-afterAddNewTag"/>
-                                        <menuitem id="hdrTagDropdown-tagRemoveAll"
-                                                  command="cmd_removeTags"/>
-                                        <menuseparator id="hdrTagDropdown-sep-afterTagRemoveAll"/>
-                                      </menupopup>
-                                    </toolbarbutton>
+                                    <toolbarbutton id="hdrForwardButton"
+                                                   label="&hdrForwardButton1.label;"
+                                                   tooltiptext="&hdrForwardButton1.tooltip;"
+                                                   oncommand="MsgForwardMessage(event); RestoreFocusAfterHdrButton();"
+                                                   observes="button_forward"
+                                                   class="toolbarbutton-1 msgHeaderView-button hdrForwardButton"/>
+                                    <toolbarbutton id="hdrArchiveButton"
+                                                   label="&hdrArchiveButton1.label;"
+                                                   tooltiptext="&hdrArchiveButton1.tooltip;"
+                                                   oncommand="MsgArchiveSelectedMessages(event); RestoreFocusAfterHdrButton();"
+                                                   observes="button_archive"
+                                                   class="toolbarbutton-1 msgHeaderView-button hdrArchiveButton"/>
+                                    <toolbarbutton id="hdrJunkButton" label="&hdrJunkButton1.label;"
+                                                   tooltiptext="&hdrJunkButton1.tooltip;"
+                                                   observes="button_junk"
+                                                   class="toolbarbutton-1 msgHeaderView-button hdrJunkButton"
+                                                   oncommand="goDoCommand('button_junk'); RestoreFocusAfterHdrButton();"/>
+                                    <toolbarbutton id="hdrTrashButton"
+                                                   label="&hdrTrashButton1.label;"
+                                                   tooltiptext="&hdrTrashButton1.tooltip;"
+                                                   observes="button_delete"
+                                                   class="toolbarbutton-1 msgHeaderView-button hdrTrashButton"
+                                                   oncommand="goDoCommand(event.shiftKey ? 'button_shiftDelete' :
+                                                                          'button_delete'); RestoreFocusAfterHdrButton();"/>
                                     <toolbarbutton type="menu"
                                                    id="otherActionsButton"
                                                    label="&otherActionsButton2.label;"
                                                    tooltiptext="&otherActionsButton.tooltip;"
                                                    class="toolbarbutton-1 msgHeaderView-button">
                                       <menupopup id="otherActionsPopup"
                                                  onpopupshowing="onShowOtherActionsPopup();">
 #ifdef MAIN_WINDOW
@@ -223,16 +166,35 @@
                                                   label="&otherActionsOpenInNewTab1.label;"
                                                   accesskey="&otherActionsOpenInNewTab1.accesskey;"
                                                   oncommand="OpenMessageInNewTab(event);"/>
                                         <menuitem id="viewSourceMenuItem"
                                                   label="&viewSourceMenuItem1.label;"
                                                   accesskey="&viewSourceMenuItem1.accesskey;"
                                                   oncommand="ViewPageSource(gFolderDisplay.selectedMessageUris);" />
                                         <menuseparator id="otherActionsSeparator"/>
+                                        <menu id="otherActionsTag"
+                                              label="&tagMenu.label;"
+                                              accesskey="&tagMenu.accesskey;">
+                                          <menupopup id="hdrTagDropdown"
+                                                     onpopupshowing="InitMessageTags(this);">
+                                            <menuitem id="hdrTagDropdown-addNewTag"
+                                                      label="&addNewTag.label;"
+                                                      accesskey="&addNewTag.accesskey;"
+                                                      command="cmd_addTag"/>
+                                            <menuitem id="manageTags"
+                                                      label="&manageTags.label;"
+                                                      accesskey="&manageTags.accesskey;"
+                                                      command="cmd_manageTags"/>
+                                            <menuseparator id="hdrTagDropdown-sep-afterAddNewTag"/>
+                                            <menuitem id="hdrTagDropdown-tagRemoveAll"
+                                                      command="cmd_removeTags"/>
+                                            <menuseparator id="hdrTagDropdown-sep-afterTagRemoveAll"/>
+                                          </menupopup>
+                                        </menu>
                                         <menuitem id="markAsReadMenuItem"
                                                   label="&markAsReadMenuItem1.label;"
                                                   accesskey="&markAsReadMenuItem1.accesskey;"
                                                   oncommand="MsgMarkMsgAsRead();"/>
                                         <menuitem id="markAsUnreadMenuItem"
                                                   label="&markAsUnreadMenuItem1.label;"
                                                   accesskey="&markAsUnreadMenuItem1.accesskey;"
                                                   oncommand="MsgMarkMsgAsRead();"/>
@@ -240,24 +202,18 @@
                                                   accesskey="&saveAsMenuItem1.accesskey;"
                                                   oncommand="MsgSaveAsFile();"/>
                                         <menuitem id="otherActionsPrint"
                                                   label="&otherActionsPrint1.label;"
                                                   accesskey="&otherActionsPrint1.accesskey;"
                                                   oncommand="PrintEnginePrint();"/>
                                       </menupopup>
                                     </toolbarbutton>
-                                  </toolbarpalette>
-
-                                  <toolbar id="header-view-toolbar" class="inline-toolbar" align="start"
-                                           customizable="true" mode="full"
-                                           context="header-toolbar-context-menu"
-                                           defaulticonsize="small" defaultmode="full"
-                                           defaultset="hdrReplyToSenderButton,hdrSmartReplyButton,hdrForwardButton,hdrArchiveButton,hdrJunkButton,hdrTrashButton,otherActionsButton"/>
-                                </toolbox>
+                                  </hbox>
+                                </vbox>
 
                                 <!-- This box ensures that the expandedHeaders grid below is aligned
                                      with the bottom of the message header toolbar. Like the
                                      expandedHeadersTopBox, this uses display:block to give us HTML
                                      layouting. -->
                                 <box id="expandedBoxSpacer"/>
 
                                 <!-- Theoretically, we should be able to replace this grid with just
--- a/mail/base/content/msgHdrView.js
+++ b/mail/base/content/msgHdrView.js
@@ -259,74 +259,19 @@ function OnLoadMsgHeaderPane() {
 
   // Dispatch an event letting any listeners know that we have loaded
   // the message pane.
   var headerViewElement = document.getElementById("msgHeaderView");
   headerViewElement.loaded = true;
   headerViewElement.dispatchEvent(new Event("messagepane-loaded",
     { bubbles: false, cancelable: true }));
 
-  initInlineToolbox("header-view-toolbox", "header-view-toolbar",
-                    "CustomizeHeaderToolbar", function() {
-                      UpdateJunkButton();
-                      UpdateReplyButtons();
-                    });
-  initInlineToolbox("attachment-view-toolbox", "attachment-view-toolbar",
-                    "CustomizeAttachmentToolbar", function() {
-                      updateSaveAllAttachmentsButton();
-                    });
-
   top.controllers.appendController(AttachmentMenuController);
 }
 
-/**
- * Initialize an inline toolbox and its toolbar to have the appropriate
- * attributes necessary for customization and persistence.
- *
- * @param toolboxId  the id for the toolbox to initialize
- * @param toolbarId  the id for the toolbar to initialize
- * @param popupId  the id for the menupopup to initialize
- * @param customizeChange  (optional) a function to call when a toolbar button
- *                         has been added or removed from the toolbar
- */
-function initInlineToolbox(toolboxId, toolbarId, popupId, customizeChange) {
-  let toolbox = document.getElementById(toolboxId);
-  toolbox.customizeDone = function(aEvent) {
-    MailToolboxCustomizeDone(aEvent, popupId);
-  };
-  if (customizeChange)
-    toolbox.customizeChange = customizeChange;
-
-  let toolbarset = document.getElementById("customToolbars");
-  toolbox.toolbarset = toolbarset;
-
-  // Check whether we did an upgrade to a customizable header pane.
-  // If yes, set the header pane toolbar mode to icons besides text
-  let toolbar = document.getElementById(toolbarId);
-  if (toolbox && toolbar) {
-    if (!toolbox.getAttribute("mode")) {
-      /* set toolbox attributes to default values */
-      let mode = toolbox.getAttribute("defaultmode");
-      let align = toolbox.getAttribute("defaultlabelalign");
-      let iconsize = toolbox.getAttribute("defaulticonsize");
-      toolbox.setAttribute("mode", mode);
-      toolbox.setAttribute("labelalign", align);
-      toolbox.setAttribute("iconsize", iconsize);
-      Services.xulStore.persist(toolbox, "mode");
-      Services.xulStore.persist(toolbox, "iconsize");
-      Services.xulStore.persist(toolbox, "labelalign");
-
-      /* set toolbar attributes to default values */
-      iconsize = toolbar.getAttribute("defaulticonsize");
-      toolbar.setAttribute("iconsize", iconsize);
-      Services.xulStore.persist(toolbar, "iconsize");
-    }
-  }
-}
-
 function OnUnloadMsgHeaderPane() {
   Services.prefs.removeObserver("mail.showCondensedAddresses", MsgHdrViewObserver);
   Services.prefs.removeObserver("mailnews.headers.showReferences", MsgHdrViewObserver);
 
   MailServices.ab.removeAddressBookListener(AddressBookListener);
 
   // dispatch an event letting any listeners know that we have unloaded
   // the message pane
--- a/mail/base/content/multimessageview.xhtml
+++ b/mail/base/content/multimessageview.xhtml
@@ -11,18 +11,17 @@
   <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
   %brandDTD;
   <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
   %globalDTD;
   <!ENTITY % startDTD SYSTEM "chrome://messenger/locale/multimessageview.dtd">
   %startDTD;
   ]>
 
-<html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <link rel="stylesheet" media="screen" type="text/css"
           href="chrome://messenger/skin/messenger.css"/>
     <link rel="stylesheet" media="screen" type="text/css"
           href="chrome://messenger/skin/primaryToolbar.css"/>
     <link rel="stylesheet" media="screen" type="text/css"
           href="chrome://messenger/skin/messageHeader.css"/>
     <link rel="stylesheet" media="screen, print" type="text/css"
@@ -30,32 +29,29 @@
     <link rel="stylesheet" media="print" type="text/css"
           href="chrome://messenger/content/multimessageview_print.css"/>
     <title>&window.title;</title>
     <script type="application/javascript"
             src="chrome://messenger/content/multimessageview.js"/>
   </head>
   <body>
     <div id="heading_wrapper">
-      <xul:toolbox id="header-view-toolbox" class="inline-toolbox"
-                   labelalign="end"
-                   xmlns:html="http://www.w3.org/1999/xhtml"
-                   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-        <toolbar id="header-view-toolbar" class="inline-toolbar"
-                 align="start" iconsize="small" mode="full">
+      <vbox id="header-view-toolbox" class="inline-toolbox"
+            xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+        <hbox id="header-view-toolbar">
           <toolbarbutton id="hdrArchiveButton"
                          class="toolbarbutton-1 msgHeaderView-button hdrArchiveButton"
                          label="&archiveButton.label;"
                          onclick="if (event.button == 0) window.top.MsgArchiveSelectedMessages(null);" />
           <toolbarbutton id="hdrTrashButton"
                          class="toolbarbutton-1 msgHeaderView-button hdrTrashButton"
                          label="&deleteButton.label;"
                          onclick="if (event.button == 0) window.top.DefaultController.doCommand('cmd_delete');"/>
-        </toolbar>
-      </xul:toolbox>
+        </hbox>
+      </vbox>
 
       <h1 id="heading">
         <span id="summary_title">&selectedmessages.label;</span>&#x200B;<span
               id="summary_subtitle"/>
       </h1>
     </div>
     <div id="content">
       <ul id="message_list"/>
--- a/mail/base/content/specialTabs.js
+++ b/mail/base/content/specialTabs.js
@@ -152,19 +152,17 @@ tabProgressListener.prototype = {
         level = "high";
         break;
       case wpl.STATE_IS_BROKEN:
         level = "broken";
         break;
     }
     if (level) {
       this.mTab.security.setAttribute("level", level);
-      this.mTab.security.hidden = false;
     } else {
-      this.mTab.security.hidden = true;
       this.mTab.security.removeAttribute("level");
     }
   },
   onContentBlockingEvent(aWebProgress, aRequest, aEvent) {
     if (this.mProgressListener)
       this.mProgressListener.onContentBlockingEvent(aWebProgress, aRequest, aEvent);
   },
   onRefreshAttempted(aWebProgress, aURI, aDelay, aSameURI) {
@@ -724,17 +722,17 @@ var specialTabs = {
       aTab.panel.appendChild(clone);
       aTab.root = clone;
 
       // Start setting up the browser.
       aTab.browser = aTab.panel.querySelector("browser");
       aTab.toolbar = aTab.panel.querySelector(".contentTabToolbar");
       aTab.security = aTab.panel.querySelector(".contentTabSecurity");
       aTab.urlbar = aTab.panel.querySelector(".contentTabUrlbar");
-      aTab.urlbar.textContent = aArgs.contentPage;
+      aTab.urlbar.setAttribute("value", aArgs.contentPage);
 
       ExtensionParent.apiManager.emit("extension-browser-inserted", aTab.browser);
 
       // As we're opening this tab, showTab may not get called, so set
       // the type according to if we're opening in background or not.
       let background = ("background" in aArgs) && aArgs.background;
       aTab.browser.setAttribute("type", "content");
       if (background)
--- a/mail/locales/en-US/chrome/messenger/messenger.dtd
+++ b/mail/locales/en-US/chrome/messenger/messenger.dtd
@@ -167,17 +167,16 @@
 <!ENTITY favoriteFolders.label "Favorite">
 <!ENTITY favoriteFolders.accesskey "F">
 <!ENTITY recentFolders.label "Recent">
 <!ENTITY recentFolders.accesskey "R">
 <!ENTITY compactVersion.label "Compact View">
 <!ENTITY compactVersion.accesskey "C">
 <!ENTITY folderPaneBar.label "Folder Pane Toolbar">
 <!ENTITY folderPaneBar.accesskey "F">
-<!ENTITY folderModeSelector.label "Folder Views">
 
 <!-- Sort Menu -->
 <!ENTITY sortMenu.label "Sort by">
 <!ENTITY sortMenu.accesskey "S">
 <!ENTITY sortByDateCmd.label "Date">
 <!ENTITY sortByDateCmd.accesskey "e">
 <!ENTITY sortByReceivedCmd.label "Received">
 <!ENTITY sortByReceivedCmd.accesskey "v">
--- a/mail/locales/en-US/chrome/messenger/msgHdrViewOverlay.dtd
+++ b/mail/locales/en-US/chrome/messenger/msgHdrViewOverlay.dtd
@@ -19,28 +19,25 @@
 <!ENTITY userAgentField4.label "User agent">
 <!ENTITY referencesField4.label "References">
 <!ENTITY messageIdField4.label "Message ID">
 <!ENTITY inReplyToField4.label "In reply to">
 <!ENTITY originalWebsite4.label "Website">
 
 <!ENTITY hdrArchiveButton1.label "Archive">
 <!ENTITY hdrArchiveButton1.tooltip "Archive this message">
-<!ENTITY hdrOpenConversationButton1.label "Conversation">
-<!ENTITY hdrOpenConversationButton1.tooltip "Show conversation of this message">
 <!ENTITY hdrSmartReplyButton1.label "Smart Reply">
 <!ENTITY hdrReplyButton1.label "Reply">
 <!ENTITY hdrReplyButton2.tooltip "Reply to the sender of this message">
 <!ENTITY hdrReplyAllButton1.label "Reply All">
 <!ENTITY hdrReplyAllButton1.tooltip "Reply to sender and all recipients">
 <!ENTITY hdrReplyListButton1.label "Reply List">
 <!ENTITY hdrReplyListButton1.tooltip "Reply to mailing list">
 <!ENTITY hdrFollowupButton1.label "Followup">
 <!ENTITY hdrFollowupButton1.tooltip "Post a followup to this newsgroup">
-<!ENTITY hdrMenuForwardButton.label "Forward As">
 <!ENTITY hdrForwardButton1.label "Forward">
 <!ENTITY hdrForwardButton1.tooltip "Forward this message">
 <!ENTITY hdrJunkButton1.label "Junk">
 <!ENTITY hdrJunkButton1.tooltip "Mark this message as junk">
 <!ENTITY hdrTrashButton1.label "Delete">
 <!ENTITY hdrTrashButton1.tooltip "Delete this message">
 
 <!ENTITY hdrViewToolbarShowFull.label "Show Icons and Text">
--- a/mail/test/mozmill/attachment/test-attachment.js
+++ b/mail/test/mozmill/attachment/test-attachment.js
@@ -385,47 +385,16 @@ function test_selected_attachments_are_c
 
   // Expand the attachment list again.
   mc.click(mc.eid("attachmentToggle"));
 
   assert_equals(attachmentList.selectedItems.length, 1,
                 "After loading a new message the first item should be selected");
 }
 
-function test_attachment_toolbar_customize() {
-  // This tests that removing the "save all" button from the attachment bar
-  // works correctly (i.e. it doesn't throw an error in the middle of processing
-  // the attachments when loading a later message).
-  be_in_folder(folder);
-
-  // First, select the message with one attachment.
-  select_click_row(2);
-
-  remove_from_toolbar(mc.e("attachment-view-toolbar"), "attachmentSaveAll");
-
-  // Now, select the message with two attachments and ensure that no errors
-  // are thrown.
-  select_click_row(3);
-
-  // Since we are viewing a message with two attachments, the attachment name
-  // element should be hidden. If not, we hit an error!
-  assert_true(mc.e("attachmentName").hidden,
-              "Attachment name should have been hidden!");
-
-  // Also, make sure that the save all button is, in fact, not on the toolbar.
-  // Otherwise, we didn't actually trigger the bug.
-  assert_equals(mc.e("attachmentSaveAllSingle"), null,
-                "'save' button should be null!");
-  assert_equals(mc.e("attachmentSaveAllMultiple"), null,
-                "'save all' button should be null!");
-
-  // Finally, restore the save all button, just to be polite.
-  add_to_toolbar(mc.e("attachment-view-toolbar"), "attachmentSaveAll");
-}
-
 function test_select_all_attachments_key() {
   be_in_folder(folder);
 
   // First, select the message with two attachments.
   select_none();
   select_click_row(3);
 
   // Expand the attachment list.
deleted file mode 100644
--- a/mail/test/mozmill/message-header/test-header-toolbar.js
+++ /dev/null
@@ -1,493 +0,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/. */
-
-/*
- * Test that we can add a tag to a message without messing up the header.
- */
-
-"use strict";
-
-var MODULE_NAME = 'test-header-toolbar';
-
-var RELATIVE_ROOT = '../shared-modules';
-var MODULE_REQUIRES = ['folder-display-helpers', 'window-helpers',
-                       'address-book-helpers', 'mouse-event-helpers',
-                       'customization-helpers'];
-
-var elib = ChromeUtils.import("chrome://mozmill/content/modules/elementslib.jsm");
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-var folder;
-var gCDHelper ;
-var originalPaneLayout;
-var kPaneLayout = "mail.pane_config.dynamic";
-
-function setupModule(module) {
-  let fdh = collector.getModule('folder-display-helpers');
-  fdh.installInto(module);
-  let wh = collector.getModule('window-helpers');
-  wh.installInto(module);
-  let abh = collector.getModule('address-book-helpers');
-  abh.installInto(module);
-  let meh = collector.getModule('mouse-event-helpers');
-  meh.installInto(module);
-  let cu = collector.getModule('customization-helpers');
-  cu.installInto(module);
-  gCDHelper = new CustomizeDialogHelper('header-view-toolbar',
-    'CustomizeHeaderToolbar', "mailnews:customizeToolbar");
-
-  folder = create_folder("HeaderToolbar");
-
-  // create a message that has the interesting headers that commonly
-  // show up in the message header pane for testing
-  let msg = create_message({cc: msgGen.makeNamesAndAddresses(20),
-                            subject: "This is a really, really, really, really, really, really, really, really, long subject.",
-                            clobberHeaders: {
-                              "Newsgroups": "alt.test",
-                              "Reply-To": "J. Doe <j.doe@momo.invalid>",
-                              "Content-Base": "http://example.com/",
-                              "Bcc": "Richard Roe <richard.roe@momo.invalid>"
-                            }});
-
-  add_message_to_folder(folder, msg);
-
-  // create a message that has boring headers to be able to switch to and
-  // back from, to force the more button to collapse again.
-  msg = create_message();
-  add_message_to_folder(folder, msg);
-}
-
-function setWideView() {
-  originalPaneLayout = Services.prefs.getIntPref(kPaneLayout);
-  Services.prefs.setIntPref(kPaneLayout, 1);
-}
-
-function restoreOriginalPaneLayout() {
-  Services.prefs.setIntPref(kPaneLayout, originalPaneLayout);
-}
-
-function teardownModule(module) {
-  restoreOriginalPaneLayout();
-}
-
-/**
- *  Make sure that opening the header toolbar customization dialog
- *  does not break the get messages button in main toolbar
- */
-function test_get_msg_button_customize_header_toolbar()
-{
-  select_message_in_folder(0);
-
-  // It is necessary to open the Get Message button's menu to get the popup menu
-  // populated
-  mc.click(mc.aid("button-getmsg", {class: "toolbarbutton-menubutton-dropmarker"}));
-  mc.ewait("button-getAllNewMsgSeparator");
-
-  let getMailButtonPopup = mc.e("button-getMsgPopup");
-  let originalServerCount = getMailButtonPopup.childElementCount;
-
-  // Open customization dialog, because it broke the Get Message Button popup menu
-  // see https://bugzilla.mozilla.org/show_bug.cgi?id=565045
-  let ctc = gCDHelper.open(mc);
-  gCDHelper.close(ctc);
-
-  // Press the Get Message Button to populate popup menu again
-  mc.click(mc.aid("button-getmsg", {class: "toolbarbutton-menubutton-dropmarker"}));
-  mc.ewait("button-getAllNewMsgSeparator");
-
-  getMailButtonPopup = mc.e("button-getMsgPopup");
-  let finalServerCount = getMailButtonPopup.childElementCount;
-
-  assert_equals(finalServerCount, originalServerCount,
-                "number of entries in Get Message Button popup menu after " +
-                "header toolbar customization not equal as before");
-}
-
-/**
- *  Test header pane toolbar customization: Check for default button sets
- */
-function test_customize_header_toolbar_check_default()
-{
-  let curMessage = select_message_in_folder(0);
-
-  let hdrToolbar = mc.e("header-view-toolbar");
-  let hdrBarDefaultSet = hdrToolbar.getAttribute("defaultset");
-  assert_equals(hdrToolbar.currentSet, hdrBarDefaultSet);
-  // In a fresh profile the currentset attribute does not
-  // exist, i.e. it returns empty. So check for both valid
-  // posiblities.
-  assert_true((hdrToolbar.getAttribute("currentset") == "") ||
-    (hdrToolbar.getAttribute("currentset") == hdrBarDefaultSet),
-    "Header Toolbar currentset should be empty or contain default buttons "+
-    "but contains: " + hdrToolbar.getAttribute("currentset"));
-  // Now make sure, that also the attribute gets set:
-  gCDHelper.restoreDefaultButtons(mc);
-
-  // Display message in new window and check that the default
-  // buttons are shown there.
-  let msgc = open_selected_message_in_new_window();
-  assert_selected_and_displayed(msgc, curMessage);
-  hdrToolbar = msgc.e("header-view-toolbar");
-  hdrBarDefaultSet = hdrToolbar.getAttribute("defaultset");
-  assert_equals(hdrToolbar.currentSet, hdrBarDefaultSet);
-  // In a fresh profile the currentset attribute does not
-  // exist, i.e. it returns empty. So check for both valid
-  // posiblities.
-  assert_true((hdrToolbar.getAttribute("currentset") == "") ||
-    (hdrToolbar.getAttribute("currentset") == hdrBarDefaultSet),
-    "Header Toolbar currentset should be empty or contain default buttons "+
-    "but contains: " + hdrToolbar.getAttribute("currentset"));
-  // Now make sure, that also the attribute gets set:
-  gCDHelper.restoreDefaultButtons(msgc);
-
-  close_window(msgc);
-}
-
-/**
- *  Test header pane toolbar customization: Reorder buttons
- */
-function test_customize_header_toolbar_reorder_buttons()
-{
-  // To avoid undrawn buttons on the toolbar, change pane layout to wide view.
-  setWideView();
-  Services.prefs.setBoolPref("toolkit.customization.unsafe_drag_events", true);
-
-  let curMessage = select_message_in_folder(0);
-
-  // Restore the default buttons to get defined starting conditions.
-  gCDHelper.restoreDefaultButtons(mc);
-
-  // Save the currentSet of the toolbar before opening the
-  // customization dialog, to get out of the way of the
-  // wrapper- prefix.
-  let toolbar = mc.e("header-view-toolbar");
-  let oldSet = toolbar.currentSet.split(",");
-
-  let ctc = gCDHelper.open(mc);
-  let currentSet = toolbar.currentSet.split(",");
-
-  for (let i = 1; i < currentSet.length; i++) {
-    let button1 = mc.e(currentSet[i]);
-    let button2 = mc.e(currentSet[i - 1]);
-    // Move each button to the left of the button which was placed left of it
-    // at the beginning of the test starting with the second button. This
-    // places the buttons in the reverse order as at the beginning of the test.
-    drag_n_drop_element(button1, mc.window, button2, mc.window, 0.25, 0.0, toolbar);
-  }
-  gCDHelper.close(ctc);
-
-  // Check, if the toolbar is really in reverse order of beginning.
-  let reverseSet = oldSet.reverse().join(",");
-  assert_equals(toolbar.currentSet, reverseSet);
-  assert_equals(toolbar.getAttribute("currentset"), reverseSet);
-
-  // Display message in new window and check that the default
-  // buttons are shown there.
-  let msgc = open_selected_message_in_new_window();
-  assert_selected_and_displayed(msgc, curMessage);
-  let hdrToolbar = msgc.e("header-view-toolbar");
-  let hdrBarDefaultSet = hdrToolbar.getAttribute("defaultset");
-  assert_equals(hdrToolbar.currentSet, hdrBarDefaultSet);
-  assert_equals(hdrToolbar.getAttribute("currentset"), hdrBarDefaultSet);
-  close_window(msgc);
-
-  restoreOriginalPaneLayout();
-
-  // Leave the toolbar in the default state.
-  gCDHelper.restoreDefaultButtons(mc);
-  Services.prefs.clearUserPref("toolkit.customization.unsafe_drag_events");
-}
-
-/**
- *  Test header pane toolbar customization: Change buttons in
- *  separate mail window
- */
-function test_customize_header_toolbar_separate_window()
-{
-  Services.prefs.setBoolPref("toolkit.customization.unsafe_drag_events", true);
-  let curMessage = select_message_in_folder(0);
-
-  // Restore the default buttons to get defined starting conditions.
-  gCDHelper.restoreDefaultButtons(mc);
-
-  // Display message in new window and check that the default
-  // buttons are shown there.
-  let msgc = open_selected_message_in_new_window();
-  assert_selected_and_displayed(msgc, curMessage);
-  let hdrToolbar = msgc.e("header-view-toolbar");
-  let hdrBarDefaultSet = hdrToolbar.getAttribute("defaultset");
-  assert_equals(hdrToolbar.currentSet, hdrBarDefaultSet);
-  assert_equals(hdrToolbar.getAttribute("currentset"), hdrBarDefaultSet);
-
-  // Save the currentSet of the toolbar before opening the
-  // customization dialog, to get out of the way of the
-  // wrapper- prefix.
-  let toolbar = msgc.e("header-view-toolbar");
-  let oldSet = toolbar.currentSet.split(",");
-
-  let ctc = gCDHelper.open(msgc);
-  let currentSet = toolbar.currentSet.split(",");
-  for (let i = 1; i < currentSet.length; i++) {
-    let button1 = msgc.e(currentSet[i]);
-    let button2 = msgc.e(currentSet[i - 1]);
-    // Move each button to the left of the button which was placed left of it
-    // at the beginning of the test starting with the second button. This
-    // places the buttons in the reverse order as at the beginning of the test.
-    drag_n_drop_element(button1, msgc.window, button2, msgc.window, 0.25, 0.0, toolbar);
-  }
-  gCDHelper.close(ctc);
-
-  // Check, if the toolbar is really in reverse order of beginning.
-  let reverseSet = oldSet.reverse().join(",");
-  assert_equals(toolbar.currentSet, reverseSet);
-  assert_equals(toolbar.getAttribute("currentset"), reverseSet);
-
-  // Make sure we have a different window open, so that we don't start shutting
-  // down just because the last window was closed
-  let abwc = openAddressBook();
-  // The 3pane window is closed and opened again.
-  close_window(mc);
-  close_window(msgc);
-
-  mc = open3PaneWindow();
-  abwc.window.close();
-  select_message_in_folder(0);
-
-  // Check, if the buttons in the mail3pane window are the correct ones.
-  hdrToolbar = mc.e("header-view-toolbar");
-  hdrBarDefaultSet = hdrToolbar.getAttribute("defaultset");
-  assert_equals(hdrToolbar.currentSet, hdrBarDefaultSet);
-  assert_equals(hdrToolbar.getAttribute("currentset"), hdrBarDefaultSet);
-
-  // Open separate mail window again and check another time.
-  msgc = open_selected_message_in_new_window();
-  assert_selected_and_displayed(msgc, curMessage);
-  toolbar = msgc.e("header-view-toolbar");
-  assert_equals(toolbar.currentSet, reverseSet);
-  assert_equals(toolbar.getAttribute("currentset"), reverseSet);
-
-  // Leave the toolbar in the default state.
-  gCDHelper.restoreDefaultButtons(msgc);
-  close_window(msgc);
-  Services.prefs.clearUserPref("toolkit.customization.unsafe_drag_events");
-}
-
-/**
- *  Test header pane toolbar customization: Remove buttons
- */
-function test_customize_header_toolbar_remove_buttons()
-{
-  Services.prefs.setBoolPref("toolkit.customization.unsafe_drag_events", true);
-  // Save currentset of toolbar for adding the buttons back
-  // at the end.
-  let lCurrentset;
-
-  select_message_in_folder(0);
-
-  // Restore the default buttons to get defined starting conditions.
-  gCDHelper.restoreDefaultButtons(mc);
-
-  let ctc = gCDHelper.open(mc);
-  let toolbar = mc.e("header-view-toolbar");
-  lCurrentset = toolbar.currentSet.split(",");
-  let target = ctc.e("palette-box");
-  for (let i = 0; i < lCurrentset.length; i++) {
-    let button = mc.e(lCurrentset[i]);
-    drag_n_drop_element(button, mc.window, target, ctc.window, 0.5, 0.5, toolbar);
-  }
-  gCDHelper.close(ctc);
-
-  // Check, if the toolbar is really empty.
-  toolbar = mc.e("header-view-toolbar");
-  assert_equals(toolbar.currentSet, "__empty");
-  assert_equals(toolbar.getAttribute("currentset"), "__empty");
-
-  // Move to the next message and Check again.
-  let curMessage = select_message_in_folder(1);
-  assert_equals(toolbar.currentSet, "__empty");
-  assert_equals(toolbar.getAttribute("currentset"), "__empty");
-
-  // Display message in new window and check that the default
-  // buttons are shown there.
-  let msgc = open_selected_message_in_new_window();
-  assert_selected_and_displayed(msgc, curMessage);
-  let hdrToolbar = msgc.e("header-view-toolbar");
-  let hdrBarDefaultSet = hdrToolbar.getAttribute("defaultset");
-  assert_equals(hdrToolbar.currentSet, hdrBarDefaultSet);
-  assert_equals(hdrToolbar.getAttribute("currentset"), hdrBarDefaultSet);
-  close_window(msgc);
-
-  // Check button persistence
-
-  // Make sure we have a different window open, so that we don't start shutting
-  // down just because the last window was closed
-  let abwc = openAddressBook();
-  // The 3pane window is closed.
-  close_window(mc);
-  mc = open3PaneWindow();
-  abwc.window.close();
-  select_message_in_folder(0);
-
-  toolbar = mc.e("header-view-toolbar");
-  assert_equals(toolbar.currentSet, "__empty");
-  assert_equals(toolbar.getAttribute("currentset"), "__empty");
-
-  // Check that all removed buttons show up in the palette
-  // and move it back in the toolbar.
-  ctc = gCDHelper.open(mc);
-  toolbar = mc.e("header-view-toolbar");
-  let palette = ctc.e("palette-box");
-  for (let i = 0; i < lCurrentset.length; i++) {
-    let button = ctc.e(lCurrentset[i]);
-    assert_true(button!=null, "Button " + lCurrentset[i] + " not in palette");
-    // Drop each button to the right end of the toolbar, so we should get the
-    // original order.
-    drag_n_drop_element(button, ctc.window, toolbar, mc.window, 0.99, 0.5, palette);
-  }
-  gCDHelper.close(ctc);
-
-  toolbar = mc.e("header-view-toolbar");
-  assert_equals(toolbar.currentSet, hdrBarDefaultSet);
-  assert_equals(toolbar.getAttribute("currentset"), hdrBarDefaultSet);
-  Services.prefs.clearUserPref("toolkit.customization.unsafe_drag_events");
-}
-
-/**
- *  Test header pane toolbar customization dialog layout
- */
-function test_customize_header_toolbar_dialog_style()
-{
-  select_message_in_folder(0);
-
-  // Restore the default buttons to get defined starting conditions.
-  gCDHelper.restoreDefaultButtons(mc);
-
-  let ctc = gCDHelper.open(mc);
-
-  // The full mode menulist entry is hidden, because in the header toolbar
-  // this mode is disabled.
-  let fullMode = ctc.window.document.getElementById("main-box").
-    querySelector("[value*='full']");
-  assert_equals(ctc.window.getComputedStyle(fullMode).getPropertyValue("display"), "none");
-  // The text besides icon menulist entry is selected, because in the header toolbar
-  // this is the default mode.
-  let textIconMode = ctc.e("textbesideiconItem");
-  assert_equals(textIconMode.getAttribute("selected"), "true");
-
-  // The small icons checkbox is hidden, because in the header toolbar
-  // this mode is the only possible (therefore, the checked attribute is true).
-  let smallIcons = ctc.e("smallicons");
-  assert_equals(smallIcons.getAttribute("checked"), "true");
-  assert_equals(ctc.window.getComputedStyle(smallIcons).getPropertyValue("display"), "none");
-
-  // The add new toolbar button is hidden, because in the header toolbar
-  // this functionality is not available.
-  let addNewToolbar = ctc.window.document.getElementById("main-box").
-    querySelector("[oncommand*='addNewToolbar();']");
-  assert_equals(ctc.window.getComputedStyle(addNewToolbar).getPropertyValue("display"), "none");
-
-  gCDHelper.close(ctc);
-}
-
-/**
- *  Test header pane toolbar customization dialog for button style changes
- */
-function test_customize_header_toolbar_change_button_style()
-{
-  select_message_in_folder(0);
-
-  // Restore the default buttons to get defined starting conditions.
-  gCDHelper.restoreDefaultButtons(mc);
-  // The default mode is label and icon visible.
-  subtest_buttons_style("-moz-box", "-moz-box");
-
-  // Change the button style to icon (only) mode
-  let ctc = gCDHelper.open(mc);
-  let iconMode = ctc.window.document.getElementById("main-box").
-    querySelector("[value*='icons']");
-  ctc.click(new elib.Elem(iconMode));
-  gCDHelper.close(ctc);
-
-  subtest_buttons_style("-moz-box", "none");
-
-  // Change the button style to text (only) mode
-  ctc = gCDHelper.open(mc);
-  let textMode = ctc.window.document.getElementById("main-box").
-    querySelector("[value*='text']");
-  ctc.click(new elib.Elem(textMode));
-  gCDHelper.close(ctc);
-
-  subtest_buttons_style("none", "-moz-box");
-
-  // The default mode is label and icon visible.
-  gCDHelper.restoreDefaultButtons(mc);
-  subtest_buttons_style("-moz-box", "-moz-box");
-}
-
-/**
- * Select message in current (global) folder.
- */
-function select_message_in_folder(aMessageNum)
-{
-  be_in_folder(folder);
-
-  // select and open the first message
-  let curMessage = select_click_row(aMessageNum);
-
-  // make sure it loads
-  wait_for_message_display_completion(mc);
-  assert_selected_and_displayed(mc, curMessage);
-
-  return curMessage;
-}
-
-/**
- *  Check all buttons in the toolbar for the correct style
- *  of text and icon.
- */
-function subtest_buttons_style(aIconVisibility, aLabelVisibility)
-{
-  let toolbar = mc.e("header-view-toolbar");
-  let currentSet = toolbar.currentSet.split(",");
-
-  for (let i = 0; i < currentSet.length; i++) {
-    // XXX For the moment only consider normal toolbar buttons.
-    // XXX Handling of toolbaritem buttons has to be added later,
-    // XXX especially the smart reply button!
-    let currentElement = mc.e(currentSet[i]);
-    // The otherActionsButton has no icon in "Icon beside Text" mode.
-    // To not fail, we do not handle this button.
-    if (currentElement.tagName == "toolbarbutton" && currentElement.id != "otherActionsButton") {
-      let icon = mc.a(currentSet[i], {class: "toolbarbutton-icon"});
-      let label = mc.a(currentSet[i], {class: "toolbarbutton-text"});
-      assert_equals(mc.window.getComputedStyle(icon).getPropertyValue("display"), aIconVisibility);
-      assert_equals(mc.window.getComputedStyle(label).getPropertyValue("display"), aLabelVisibility);
-    }
-  }
-}
-
-/**
- *  Helper functions to open an extra window, so that the 3pane
- *  window can be closed and opend again for persistancy checks.
- *  They are copied from the test-session-store.js.
- */
-function open3PaneWindow()
-{
-  plan_for_new_window("mail:3pane");
-  Services.ww.openWindow(null,
-                         "chrome://messenger/content/messenger.xul", "",
-                         "all,chrome,dialog=no,status,toolbar",
-                         null);
-  return wait_for_new_window("mail:3pane");
-}
-
-function openAddressBook()
-{
-  plan_for_new_window("mail:addressbook");
-  Services.ww.openWindow(null,
-                         "chrome://messenger/content/addressbook/addressbook.xul",
-                         "", "all,chrome,dialog=no,status,toolbar",
-                         null);
-  return wait_for_new_window("mail:addressbook");
-}
--- a/mail/test/mozmill/message-header/test-message-header.js
+++ b/mail/test/mozmill/message-header/test-message-header.js
@@ -888,53 +888,25 @@ function test_toolbar_collapse_and_expan
   // Select and open a message, in this case the last, for no particular reason.
   let curMessage = select_click_row(-1);
 
   try {
     let expandedHeadersTopBox = mc.e("expandedHeadersTopBox");
     let toolbar = mc.e("header-view-toolbar");
     let mode = toolbar.getAttribute("mode");
 
-    // Get really big, so that we can figure out how big we actually want to be.
     resize_to(mc, 1200, gDefaultWindowHeight);
-
-    let fromWidth = mc.e("expandedfromRow").clientWidth;
-
-    // This is the biggest we need to be.
-    let bigWidth = fromWidth + toolbar.clientWidth;
+    let shortHeight = expandedHeadersTopBox.clientHeight;
 
-    // Now change to icons-only mode for a much smaller toolbar.
-    toolbar.setAttribute("mode", "icons");
-    let smallWidth = fromWidth + toolbar.clientWidth;
-
-    // Re-set the mode to its original value.
-    toolbar.setAttribute("mode", mode);
-
-    // And resize to half way between the big and small widths, so that we
-    //  can toggle the mode to force the overflow.
-    resize_to(mc, Math.round((bigWidth + smallWidth) / 2), gDefaultWindowHeight);
-
-    // Make sure we are too small to contain the buttons and from line, so
-    //  we will be tall.
+    resize_to(mc, 600, gDefaultWindowHeight);
     let tallHeight = expandedHeadersTopBox.clientHeight;
 
-    // Change from icons and text to just icons to make our toolbar
-    //  narrower, and by extension our header shorter.
-    toolbar.setAttribute("mode", "icons");
-
-    let shortHeight = expandedHeadersTopBox.clientHeight;
     if (shortHeight >= tallHeight)
       throw new Error("The header box should have been made smaller!");
 
-    // Change back to icons and text to make our toolbar wider and our
-    //   header taller again.
-    toolbar.setAttribute("mode", mode);
-    if (expandedHeadersTopBox.clientHeight != tallHeight)
-      throw new Error("The header box should have returned to its original size!");
-
     // And make our window big to achieve the same effect as the just icons mode.
     resize_to(mc, 1200, gDefaultWindowHeight);
     mc.waitFor(() => expandedHeadersTopBox.clientHeight == shortHeight,
                "The header box should have returned to its wide size!")
   }
   finally {
     // restore window to nominal dimensions
     restore_default_window_size();
--- a/mail/themes/linux/mail/messageHeader.css
+++ b/mail/themes/linux/mail/messageHeader.css
@@ -137,36 +137,24 @@
 .toolbarbutton-menubutton-dropmarker,
 .toolbarbutton-1.msgHeaderView-button:not([disabled=true]):not([checked=true]):not([open]):not(:active):hover,
 .toolbarbutton-1.msgHeaderView-button:not([buttonover]):not([open]):not(:active):hover >
 .toolbarbutton-menubutton-dropmarker:not([disabled]) {
   background: var(--toolbarbutton-active-background);
   border-color: var(--toolbarbutton-active-bordercolor);
 }
 
-/* toolbar[mode="text"] is necessary so that we end up with more specificity
- * than the !important rule in toolkit's toolbar.css.
- */
-toolbar[mode="text"] .msgHeaderView-button .toolbarbutton-text,
-toolbar[mode="text"] toolbarpaletteitem .msgHeaderView-button .toolbarbutton-text {
-  margin: 0 !important;
-  padding-top: 1px !important;
-  padding-bottom: 2px !important;
-  padding-inline-start: 0px !important;
-  padding-inline-end: 0px !important;
-}
-
 /* For unclear reasons, toolkit's toolbarbutton.css forces a margin of 0,
  * jamming the image up against the text, so we need this !important
  * rule to override that.
  *
  * The second selector is a descendent selector rather than a child selector
  * so that we effect both buttons and menubuttons.
  */
-toolbox[labelalign="end"] toolbar[mode="full"] .msgHeaderView-button .toolbarbutton-text {
+.msgHeaderView-button .toolbarbutton-text {
   margin-inline-start: 2px !important;
 }
 
 .hdrReplyToSenderButton,
 .hdrDummyReplyButton,
 .hdrReplyButton {
   list-style-image: url("chrome://messenger/skin/icons/reply.svg");
 }
@@ -191,48 +179,21 @@ toolbox[labelalign="end"] toolbar[mode="
 .hdrJunkButton {
   list-style-image: url("chrome://messenger/skin/icons/junk.svg");
 }
 
 .hdrTrashButton {
   list-style-image: url("chrome://messenger/skin/icons/delete.svg");
 }
 
-.hdrTagButton {
-  list-style-image: url("chrome://messenger/skin/icons/tag.svg");
-}
-
-.hdrConversationButton {
-  list-style-image: url("chrome://messenger/skin/icons/conversation.svg");
-}
-
 #attachmentSaveAllSingle,
 #attachmentSaveAllMultiple {
   list-style-image: url("chrome://messenger/skin/icons/save.svg");
 }
 
-toolbar[mode="icons"] > #otherActionsButton > .toolbarbutton-menu-dropmarker {
-  margin-inline-start: 0;
-}
-
-/* show a icon in customize window */
-#CustomizeToolbarWindow toolbarpaletteitem > #otherActionsButton >
-  .toolbarbutton-icon {
-  display: -moz-box;
-  width: 8px;
-  padding-top: 4px;
-  padding-bottom: 4px;
-  list-style-image: url("chrome://messenger/skin/icons/dropmarker.svg");
-}
-
-.inline-toolbox[doCustomization] .inline-toolbar {
-  min-width: 100px;
-  min-height: 10px;
-}
-
 .headerName {
   color: #888a85; /* lower contrast */
   text-align: right;
   background-color: transparent;
   padding: 0px;
   margin-top: 0;
   margin-inline-end: 3px;
 }
@@ -307,21 +268,16 @@ mail-headerfield.headerValue:focus {
 
 .emailPopup {
   font-size: inherit;
   max-height: 7px; /* the height of the image */
   margin: 0.2em 2px 0px; /* 0.2em just to move it off the top of the text */
   list-style-image: url("chrome://messenger/skin/icons/arrow-dn-grey.png");
 }
 
-window[inlinetoolbox] #smallicons,
-window[inlinetoolbox] #newtoolbar {
-  display: none;
-}
-
 /* This is a workaround for #562608 in the rare case where the buttons_have_icons gconf key is set to true */
 .hdrArchiveButton > .button-box > .button-icon {
   list-style-image: url("chrome://messenger/skin/icons/archive.svg");
 }
 
 .hdrTrashButton > .button-box > .button-icon {
   list-style-image: url("chrome://messenger/skin/icons/tag.svg");
 }
--- a/mail/themes/linux/mail/primaryToolbar.css
+++ b/mail/themes/linux/mail/primaryToolbar.css
@@ -177,29 +177,20 @@
 #button-newMsgPopup .menuitem-iconic {
   fill: currentColor;
 }
 
 toolbar[mode="text"] .button-appmenu .toolbarbutton-icon {
   display: -moz-box;
 }
 
-#folderPane-toolbar #locationFolders,
-#folderPane-toolbar > #folder-location-container,
-#folderPane-toolbar > #folderpane-mode-selector {
-  -moz-box-flex: 1;
-}
-
 #folderPane-toolbar > .toolbarbutton-1,
 #folderPane-toolbar > toolbaritem > menulist {
   margin: 0;
-}
-
-#folderPane-toolbar > :-moz-any(*) + :-moz-any(*) {
-  margin-inline-start: 2px;
+  border: none;
 }
 
 /* Force the folder location and mail view items to fit in the available width
    in the Customize Toolbar dialog. */
 #palette-box #locationFolders,
 #palette-box #folder-location-container,
 #palette-box #folderpane-mode-selector,
 #palette-box #viewPicker {
--- a/mail/themes/osx/mail/messageHeader.css
+++ b/mail/themes/osx/mail/messageHeader.css
@@ -201,21 +201,16 @@
   height: 18px;
   margin-inline-start: -4px !important;
   margin-inline-end: 3px !important;
   margin-bottom: 0 !important;
   background: hsla(0, 0%, 0%, .3) padding-box;
   box-shadow: 0 0 0 1px hsla(0, 0%, 100%, .2);
 }
 
-toolbar[mode="text"] .msgHeaderView-button .toolbarbutton-text {
-  margin-right: 2px;
-  margin-left: 2px;
-}
-
 .hdrReplyToSenderButton,
 .hdrDummyReplyButton,
 .hdrReplyButton {
   list-style-image: url("chrome://messenger/skin/icons/reply.svg");
 }
 
 .hdrReplyAllButton {
   list-style-image: url("chrome://messenger/skin/icons/replyall.svg");
@@ -237,55 +232,25 @@ toolbar[mode="text"] .msgHeaderView-butt
 .hdrJunkButton {
   list-style-image: url("chrome://messenger/skin/icons/junk.svg");
 }
 
 .hdrTrashButton {
   list-style-image: url("chrome://messenger/skin/icons/delete.svg");
 }
 
-.hdrTagButton {
-  list-style-image: url("chrome://messenger/skin/icons/tag.svg");
-}
-
-.hdrConversationButton {
-  list-style-image: url("chrome://messenger/skin/icons/conversation.svg");
-}
-
 #attachmentSaveAllSingle,
 #attachmentSaveAllMultiple {
   list-style-image: url("chrome://messenger/skin/icons/save.svg");
 }
 
 #otherActionsButton > .toolbarbutton-icon {
   display: none;
 }
 
-toolbar[mode="icons"] > #otherActionsButton > .toolbarbutton-menu-dropmarker >
-  .dropmarker-icon {
-  list-style-image: url("chrome://messenger/skin/icons/arrow-dn-grey.png");
-}
-
-/* show a icon in customize window */
-#CustomizeToolbarWindow toolbarpaletteitem > #otherActionsButton >
-  .toolbarbutton-icon {
-  display: -moz-box;
-  width: 9px;
-  padding-top: 5px;
-  padding-bottom: 5px;
-  list-style-image: url("chrome://messenger/skin/icons/toolbarbutton-arrow.svg");
-  -moz-context-properties: fill;
-  fill: currentColor;
-}
-
-.inline-toolbox[doCustomization] .inline-toolbar {
-  min-width: 100px;
-  min-height: 10px;
-}
-
 #msgHeaderView textbox {
   color: inherit;
 }
 
 .headerName {
   color: #A1A1A1; /* lower contrast */
   font-weight: bold;
   text-align: right;
@@ -395,16 +360,12 @@ mail-emailaddress[selected="true"] > .em
 
 .emailToggleHeaderfield {
   margin-inline-end: 3px;
   margin-inline-start: 1px;
 }
 
 /* ::::: collapsed view styles ::::: */
 
-window[inlinetoolbox] #newtoolbar {
-  display: none;
-}
-
 #header-view-toolbox {
   float: right;
   padding-top: 3px;
 }
--- a/mail/themes/osx/mail/primaryToolbar.css
+++ b/mail/themes/osx/mail/primaryToolbar.css
@@ -212,29 +212,20 @@ toolbar:not([mode="text"]) .badgeButton-
 .button-appmenu .toolbarbutton-menu-dropmarker {
   display: none;
 }
 
 toolbar[mode="text"] .button-appmenu .toolbarbutton-icon {
   display: -moz-box;
 }
 
-#folderPane-toolbar #locationFolders,
-#folderPane-toolbar > #folder-location-container,
-#folderPane-toolbar > #folderpane-mode-selector {
-  -moz-box-flex: 1;
-}
-
 #folderPane-toolbar > .toolbarbutton-1,
 #folderPane-toolbar > toolbaritem > menulist {
   margin: 0;
-}
-
-#folderPane-toolbar > :-moz-any(*) + :-moz-any(*) {
-  margin-inline-start: 2px;
+  border: none;
 }
 
 /* Force the folder location and mail view items to fit in the available width
    in the Customize Toolbar dialog. */
 #palette-box #locationFolders,
 #palette-box #folder-location-container,
 #palette-box #folderpane-mode-selector,
 #palette-box #viewPicker {
--- a/mail/themes/shared/mail/messageHeader.css
+++ b/mail/themes/shared/mail/messageHeader.css
@@ -10,19 +10,28 @@
   min-width: 1px;
 }
 
 #otherActionsButton > .toolbarbutton-icon {
   display: none;
 }
 
 .toolbarbutton-1.msgHeaderView-button {
+  -moz-box-orient: horizontal;
   fill: currentColor;
 }
 
+.msgHeaderView-button[type="menu"] {
+  -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu");
+}
+
+.msgHeaderView-button[type="menu-button"] > toolbarbutton {
+  -moz-box-orient: horizontal;
+}
+
 /* ::::: msg header toolbars ::::: */
 
 #expandedHeaderRows > row,
 #expandedHeader2Rows > row {
   /* Ensure that the header names and values are aligned with each other. */
   -moz-box-align: baseline;
 }
 
@@ -61,47 +70,20 @@
 }
 
 /* ::::: msg header captions ::::: */
 
 #header-view-toolbar .msgHeaderView-button[disabled="true"] {
   display: none;
 }
 
-toolbarpaletteitem > #hdrReplyToSenderButton {
-  display: -moz-box;
-}
-
-window[inlinetoolbox] #wrapper-spring {
-  display: none;
-}
-
-window[inlinetoolbox] #modefull {
-  display: none;
-}
-
-.inline-toolbox[doCustomization] {
-  background: grey;
-}
-
 #header-view-toolbar {
   -moz-box-pack: end;
 }
 
-/* Only show the dummy smart reply button when customizing. */
-.inline-toolbox[doCustomization] #hdrSmartReplyButton > toolbarbutton,
-toolbarpaletteitem #hdrSmartReplyButton > toolbarbutton {
-  display: none;
-}
-
-.inline-toolbox[doCustomization] #hdrDummyReplyButton,
-toolbarpaletteitem #hdrDummyReplyButton {
-  display: -moz-box !important;
-}
-
 .headerValue {
   overflow-wrap: anywhere;
   display: block;
 }
 
 .headerValue[containsEmail="true"] {
   margin-inline-start: 0px !important;
 }
--- a/mail/themes/windows/mail/messageHeader.css
+++ b/mail/themes/windows/mail/messageHeader.css
@@ -23,23 +23,16 @@
   overflow-x: hidden;
   max-height: 14em;
 }
 
 #expandedBoxSpacer {
   display: block;
 }
 
-/* ::::: expanded header pane ::::: */
-
-/* toolbars are optimized to look like OS-provided widgets; override this */
-.inline-toolbox {
-  -moz-appearance: none;
-}
-
 /* ::::: attachment view ::::: */
 
 #attachmentList {
   -moz-appearance: none;
   background-color: -moz-Field;
   color: -moz-FieldText;
 }
 
@@ -102,31 +95,16 @@
   line-height: 1.5em;
   margin: 0;
   padding: .1em 0;
   -moz-user-select: text;
   -moz-user-focus: normal;
   cursor: text;
 }
 
-#header-view-toolbox toolbarpaletteitem toolbarseparator,
-#header-view-toolbox toolbarseparator {
-  margin-top: 1px;
-}
-
-window[inlinetoolbox] #smallicons,
-window[inlinetoolbox] #newtoolbar {
-  display: none;
-}
-
-.inline-toolbox[doCustomization] #attachment-view-toolbar {
-  min-width: 100px;
-  min-height: 10px;
-}
-
 .msgHeaderView-button[type="menu-button"] {
   padding-top: 1px;
 }
 
 .msgHeaderView-button[type="menu-button"] > .button-menubutton-button:hover {
   border-right-color: ButtonShadow;
 }
 
@@ -279,22 +257,16 @@ mail-headerfield.headerValue:focus {
 
   .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
     padding-inline-start: 3px !important;
     padding-inline-end: 3px !important;
   }
 }
 
 @media (-moz-windows-default-theme) {
-  toolbar[mode="icons"] .msgHeaderView-button.toolbarbutton-menubutton-button,
-  toolbar[mode="icons"] .msgHeaderView-button:not([type="menu-button"]) {
-    padding-inline-start: 3px !important;
-    padding-inline-end: 3px !important;
-  }
-
   .toolbarbutton-1.msgHeaderView-button,
   .toolbarbutton-1.msgHeaderView-button > .toolbarbutton-menubutton-button,
   .toolbarbutton-1.msgHeaderView-button > .toolbarbutton-menubutton-dropmarker {
     background: var(--toolbarbutton-hover-background);
     border-color: var(--toolbarbutton-header-bordercolor);
   }
 
   .toolbarbutton-1.msgHeaderView-button:not([disabled=true]):-moz-any(:hover,[open]) >
@@ -324,48 +296,24 @@ mail-headerfield.headerValue:focus {
 .msgHeaderView-button[type="menu-button"] > .toolbarbutton-menubutton-button {
   min-width: 1em;
   margin: 0px;
   /* important required to override primaryToolbar.css rules */
   padding-inline-start: 3px !important;
   padding-inline-end: 3px !important;
 }
 
-/* toolbar[mode="text"] is necessary so that we end up with more specificity
-*  than the !important rule in toolkit's toolbar.css.
-*/
-toolbar[mode="text"] .msgHeaderView-button .toolbarbutton-text,
-toolbar[mode="text"] toolbarpaletteitem
-.msgHeaderView-button .toolbarbutton-text {
-  margin: 0 !important;
-  padding-top: 1px !important;
-  padding-bottom: 0px !important;
-  padding-inline-start: 0px !important;
-  padding-inline-end: 0px !important;
-}
-
-toolbar[iconsize="small"] .msgHeaderView-button .toolbarbutton-text {
-  margin-bottom: 1px !important;
-}
-
-toolbar[mode="text"] .msgHeaderView-button .toolbarbutton-text {
-  padding-top: 0 !important;
-}
-
 /* For unclear reasons, toolkit's toolbarbutton.css forces a margin of 0,
 *  jamming the image up against the text, so we need this !important
 *  rule to override that.
 *
 *  The second selector is a descendent selector rather than a child selector
 *  so that we effect both buttons and menubuttons.
 */
 
-toolbox[labelalign="end"] toolbar[mode="full"]
-toolbarpaletteitem .msgHeaderView-button .toolbarbutton-text,
-toolbox[labelalign="end"] toolbar[mode="full"]
 .msgHeaderView-button .toolbarbutton-text {
   margin-inline-start: 2px !important;
 }
 
 .hdrReplyToSenderButton,
 .hdrDummyReplyButton,
 .hdrReplyButton {
   list-style-image: url("chrome://messenger/skin/icons/reply.svg");
@@ -391,51 +339,30 @@ toolbox[labelalign="end"] toolbar[mode="
 .hdrJunkButton {
   list-style-image: url("chrome://messenger/skin/icons/junk.svg");
 }
 
 .hdrTrashButton {
   list-style-image: url("chrome://messenger/skin/icons/delete.svg");
 }
 
-.hdrTagButton {
-  list-style-image: url("chrome://messenger/skin/icons/tag.svg");
-}
-
-.hdrConversationButton {
-  list-style-image: url("chrome://messenger/skin/icons/conversation.svg");
-}
-
 #attachmentSaveAllSingle,
 #attachmentSaveAllMultiple {
   list-style-image: url("chrome://messenger/skin/icons/save.svg");
 }
 
 #otherActionsButton > hbox > vbox > .toolbarbutton-icon {
   display: none;
 }
 
 #otherActionsButton > hbox > .toolbarbutton-menu-dropmarker {
   padding-inline-end: 3px;
 }
 
-/* show a icon in customize window */
-#CustomizeToolbarWindow toolbarpaletteitem > #otherActionsButton >
-  .toolbarbutton-icon {
-  display: -moz-box;
-  width: 9px;
-  padding-top: 4px;
-  padding-bottom: 4px;
-  list-style-image: url("chrome://messenger/skin/icons/toolbarbutton-arrow.svg");
-  -moz-context-properties: fill;
-  fill: currentColor;
-}
-
-.msgHeaderView-button,
-toolbarpaletteitem .msgHeaderView-button {
+.msgHeaderView-button {
   -moz-appearance: none;
 }
 
 .headerName {
   color: #888a85; /* lower contrast */
 }
 
 #header-view-toolbox {
--- a/mail/themes/windows/mail/primaryToolbar.css
+++ b/mail/themes/windows/mail/primaryToolbar.css
@@ -171,29 +171,20 @@
 .button-appmenu .toolbarbutton-menu-dropmarker {
   display: none;
 }
 
 toolbar[mode="text"] .button-appmenu .toolbarbutton-icon {
   display: -moz-box;
 }
 
-#folderPane-toolbar #locationFolders,
-#folderPane-toolbar > #folder-location-container,
-#folderPane-toolbar > #folderpane-mode-selector {
-  -moz-box-flex: 1;
-}
-
 #folderPane-toolbar > .toolbarbutton-1,
 #folderPane-toolbar > toolbaritem > menulist {
   margin: 0;
-}
-
-#folderPane-toolbar > :-moz-any(*) + :-moz-any(*) {
-  margin-inline-start: 2px;
+  border: none;
 }
 
 /* Force the folder location and mail view items to fit in the available width
    in the Customize Toolbar dialog. */
 #palette-box #locationFolders,
 #palette-box #folder-location-container,
 #palette-box #folderpane-mode-selector,
 #palette-box #viewPicker {