Bug 1507536 - Set skipintoolbarset="true" on some titlebar items to avoid redundant context menu items. r=dao
authorMike Conley <mconley@mozilla.com>
Tue, 27 Nov 2018 22:33:33 +0000
changeset 504830 d476f054342f039445afddff474f4c8b4d9edea2
parent 504829 5e887c4ebd791fc491977bdc0ee8fc787f46b33a
child 504831 093960021b8b20b3c1963c9d1b1fc6809f60fd6b
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1507536
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1507536 - Set skipintoolbarset="true" on some titlebar items to avoid redundant context menu items. r=dao This adds a skipintoolbarset to the toolbar-menubar spacer and the titlebar-buttonbox-container hbox to avoid a case where an exception can be thrown from CustomizableUI.isWidgetRemovable, which expects all direct descendants of toolbars to either have an ID, be one of a special set of node types, or have skipintoolbarset="true" set on it. Differential Revision: https://phabricator.services.mozilla.com/D13147
browser/base/content/browser.xul
browser/base/content/titlebar-items.inc.xul
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -744,17 +744,17 @@ xmlns="http://www.w3.org/1999/xhtml"
                autohide="true"
 #endif
                context="toolbar-context-menu">
         <toolbaritem id="menubar-items" align="center">
 # The entire main menubar is placed into browser-menubar.inc, so that it can be
 # shared with other top level windows in macWindow.inc.xul.
 #include browser-menubar.inc
         </toolbaritem>
-        <spacer flex="1" />
+        <spacer flex="1" skipintoolbarset="true"/>
 #include titlebar-items.inc.xul
       </toolbar>
 
       <toolbar id="TabsToolbar"
                class="browser-toolbar titlebar-color"
                fullscreentoolbar="true"
                customizable="true"
                customizationtarget="TabsToolbar-customization-target"
--- a/browser/base/content/titlebar-items.inc.xul
+++ b/browser/base/content/titlebar-items.inc.xul
@@ -1,11 +1,11 @@
 # 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/.
 
-<hbox class="titlebar-buttonbox-container">
+<hbox class="titlebar-buttonbox-container" skipintoolbarset="true">
   <hbox class="titlebar-buttonbox titlebar-color">
     <toolbarbutton class="titlebar-button titlebar-min" oncommand="window.minimize();"/>
     <toolbarbutton class="titlebar-button titlebar-max" oncommand="onTitlebarMaxClick();"/>
     <toolbarbutton class="titlebar-button titlebar-close" command="cmd_closeWindow"/>
   </hbox>
 </hbox>