Bug 1720534 - Clean up styles in Bookmarks Menu Button menupopups on Windows 7 and 10. r=desktop-theme-reviewers,dao
authorMike Conley <mconley@mozilla.com>
Sun, 18 Jul 2021 00:06:41 +0000
changeset 585890 cc4e5ea0c9863a8c4f65a49cd51852f7f38dd2fe
parent 585889 dec0a179f851fb8aedf80a1ad47ba6b3d58d3e2a
child 585891 03883718a7d7b03f7d7d94d5fe30a183521f2715
push id38620
push usercsabou@mozilla.com
push dateSun, 18 Jul 2021 09:08:29 +0000
treeherdermozilla-central@cc4e5ea0c986 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdesktop-theme-reviewers, dao
bugs1720534
milestone92.0a1
first release with
nightly linux32
cc4e5ea0c986 / 92.0a1 / 20210718090829 / files
nightly linux64
cc4e5ea0c986 / 92.0a1 / 20210718090829 / files
nightly mac
cc4e5ea0c986 / 92.0a1 / 20210718090829 / files
nightly win32
cc4e5ea0c986 / 92.0a1 / 20210718090829 / files
nightly win64
cc4e5ea0c986 / 92.0a1 / 20210718090829 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1720534 - Clean up styles in Bookmarks Menu Button menupopups on Windows 7 and 10. r=desktop-theme-reviewers,dao This also gets rid of a dead CSS class (panel-subview-footer). Differential Revision: https://phabricator.services.mozilla.com/D119906
browser/base/content/navigator-toolbox.inc.xhtml
browser/components/customizableui/content/panelUI.js
browser/themes/shared/customizableui/panelUI.inc.css
--- a/browser/base/content/navigator-toolbox.inc.xhtml
+++ b/browser/base/content/navigator-toolbox.inc.xhtml
@@ -584,62 +584,62 @@
                    ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
                    ondragover="PlacesMenuDNDHandler.onDragOver(event);"
                    ondragleave="PlacesMenuDNDHandler.onDragLeave(event);"
                    ondrop="PlacesMenuDNDHandler.onDrop(event);"
                    oncommand="BookmarkingUI.onCommand(event);">
       <menupopup id="BMB_bookmarksPopup"
                  type="arrow"
                  is="places-popup-arrow"
-                 class="cui-widget-panel cui-widget-panelview cui-widget-panelWithFooter PanelUI-subView"
+                 class="cui-widget-panel cui-widget-panelview PanelUI-subView"
                  placespopup="true"
                  context="placesContext"
                  openInTabs="children"
                  side="top"
                  onmouseup="BookmarksEventHandler.onMouseUp(event);"
                  oncommand="BookmarksEventHandler.onCommand(event);"
                  onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
                  onpopupshowing="BookmarkingUI.onPopupShowing(event);
                                  BookmarkingUI.attachPlacesView(event, this);"
                  tooltip="bhTooltip" popupsinherittooltip="true">
         <menuitem id="BMB_viewBookmarksSidebar"
-                  class="menuitem-iconic subviewbutton"
+                  class="subviewbutton"
                   data-l10n-id="bookmarks-tools-sidebar-visibility"
                   data-l10n-args='{ "isVisible": false }'
                   oncommand="SidebarUI.toggle('viewBookmarksSidebar');"/>
         <!-- NB: temporary solution for bug 985024, this should go away soon. -->
         <menuitem id="BMB_bookmarksShowAllTop"
-                  class="menuitem-iconic subviewbutton"
+                  class="subviewbutton"
                   data-l10n-id="bookmarks-manage-bookmarks"
                   command="Browser:ShowAllBookmarks"
                   key="manBookmarkKb"/>
         <menuseparator/>
         <menu id="BMB_bookmarksToolbar"
-              class="menu-iconic bookmark-item subviewbutton"
+              class="bookmark-item subviewbutton"
               data-l10n-id="bookmarks-toolbar-menu"
               container="true">
           <menupopup id="BMB_bookmarksToolbarPopup"
                      is="places-popup"
                      placespopup="true"
                      nofooterpopup="true"
                      context="placesContext"
                      onpopupshowing="if (!this.parentNode._placesView)
                                        new PlacesMenu(event, `place:parent=${PlacesUtils.bookmarks.toolbarGuid}`,
                                                       PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);">
             <menuitem id="BMB_viewBookmarksToolbar"
-                      class="menuitem-iconic subviewbutton"
+                      class="subviewbutton"
                       data-l10n-id="bookmarks-tools-toolbar-visibility-menuitem"
                       data-l10n-args='{ "isVisible": false }'
                       oncommand="BookmarkingUI.toggleBookmarksToolbar('bookmarks-widget');"/>
             <menuseparator/>
             <!-- Bookmarks toolbar items -->
           </menupopup>
         </menu>
         <menu id="BMB_unsortedBookmarks"
-              class="menu-iconic bookmark-item subviewbutton"
+              class="bookmark-item subviewbutton"
               data-l10n-id="bookmarks-other-bookmarks-menu"
               container="true">
           <menupopup id="BMB_unsortedBookmarksPopup"
                      is="places-popup"
                      placespopup="true"
                      nofooterpopup="true"
                      context="placesContext"
                      onpopupshowing="if (!this.parentNode._placesView)
@@ -659,17 +659,17 @@
                      onpopupshowing="if (!this.parentNode._placesView)
                                        new PlacesMenu(event, `place:parent=${PlacesUtils.bookmarks.mobileGuid}`,
                                                       PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);"/>
         </menu>
 
         <menuseparator/>
         <!-- Bookmarks menu items will go here -->
         <menuitem id="BMB_bookmarksShowAll"
-                  class="subviewbutton panel-subview-footer-button"
+                  class="subviewbutton"
                   data-l10n-id="bookmarks-manage-bookmarks"
                   command="Browser:ShowAllBookmarks"
                   key="manBookmarkKb"/>
       </menupopup>
     </toolbarbutton>
 
     <toolbaritem id="search-container"
                  class="chromeclass-toolbar-additional"
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -470,21 +470,16 @@ const PanelUI = {
       }
       if (this._disableAnimations) {
         tempPanel.setAttribute("animate", "false");
       }
       tempPanel.setAttribute("context", "");
       document
         .getElementById(CustomizableUI.AREA_NAVBAR)
         .appendChild(tempPanel);
-      // If the view has a footer, set a convenience class on the panel.
-      tempPanel.classList.toggle(
-        "cui-widget-panelWithFooter",
-        viewNode.querySelector(".panel-subview-footer")
-      );
 
       let multiView = document.createXULElement("panelmultiview");
       multiView.setAttribute("id", "customizationui-widget-multiview");
       multiView.setAttribute("viewCacheId", "appMenu-viewCache");
       multiView.setAttribute("mainViewId", viewNode.id);
       multiView.appendChild(viewNode);
       tempPanel.appendChild(multiView);
       viewNode.classList.add("cui-widget-panelview", "PanelUI-subView");
--- a/browser/themes/shared/customizableui/panelUI.inc.css
+++ b/browser/themes/shared/customizableui/panelUI.inc.css
@@ -184,29 +184,16 @@ toolbarseparator + .panel-subview-body,
   min-height: 0;
 }
 
 .panel-view-body-unscrollable {
   overflow: hidden;
   -moz-box-flex: 1;
 }
 
-.subviewbutton.panel-subview-footer {
-  box-sizing: border-box;
-  min-height: 41px;
-}
-
-.cui-widget-panelview menuitem.subviewbutton.panel-subview-footer {
-  margin: 4px 0 0;
-}
-
-.cui-widget-panelview .subviewbutton.panel-subview-footer > .menu-text {
-  -moz-box-flex: 1;
-}
-
 .panel-info-button {
   appearance: none;
   padding: 0;
   margin-inline-end: 4px;
   border-radius: var(--toolbarbutton-border-radius);
 }
 
 .panel-info-button[disabled=true] {
@@ -378,17 +365,17 @@ panelview .toolbaritem-combined-buttons,
 }
 
 panelview[id^=PanelUI-webext-] {
   overflow: hidden;
 }
 
 .cui-widget-panel,
 .cui-widget-panel::part(arrowcontent) {
-  --arrowpanel-padding: 4px 0;
+  --arrowpanel-padding: var(--panel-subview-body-padding);
 }
 
 #appMenu-popup panelview,
 #PanelUI-fxa {
   width: 22.5em;
 }
 
 #customizationui-widget-multiview panelview:not([extension]) {
@@ -403,20 +390,16 @@ panelview[id^=PanelUI-webext-] {
   max-width: @wideMenuPanelWidth@;
 }
 
 /* Add 2 * 16px extra width for touch mode button padding. */
 #appMenu-popup[touchmode] panelview {
   min-width: calc(@menuPanelWidth@ + 32px);
 }
 
-.cui-widget-panel.cui-widget-panelWithFooter::part(content) {
-  padding-bottom: 0;
-}
-
 .toolbaritem-combined-buttons@inAnyPanel@ > toolbarbutton > .toolbarbutton-icon {
   min-width: 0;
   min-height: 0;
   margin: 0;
 }
 
 .animate-out {
   animation-name: widget-animate-out;
@@ -1197,34 +1180,25 @@ panelview .toolbarbutton-1,
   text-align: start;
   display: -moz-box;
 }
 
 .panel-subview-footer-button {
   margin-bottom: 6px;
 }
 
-.subviewbutton.panel-subview-footer > .menu-text {
+.subviewbutton > .menu-text {
   appearance: none;
   padding-inline-start: 0 !important; /* to override menu.css on Windows */
-  padding-inline-end: 6px;
-  -moz-box-flex: 0;
-}
-
-.subviewbutton.panel-subview-footer > .toolbarbutton-text {
-  padding-inline-start: 0;
-}
-
-.subviewbutton.panel-subview-footer > .menu-accel-container {
-  padding-inline-start: 6px;
 }
 
 .subviewbutton > .menu-accel-container > .menu-iconic-accel,
 .subviewbutton > .menu-accel-container > .menu-accel {
   margin-inline-end: 0 !important; /* to override menu.css on Windows */
+  color: var(--panel-shortcut-color);
 }
 
 .subviewbutton[shortcut]::after {
   content: attr(shortcut);
   display: -moz-box;
   color: var(--panel-shortcut-color);
 }
 
@@ -1429,34 +1403,16 @@ menuitem.subviewbutton@menuStateActive@,
   box-shadow: 0 1px 0 hsla(210,4%,10%,.03) inset;
 }
 
 #PlacesToolbar menuitem,
 #PlacesToolbar menu {
   color: var(--arrowpanel-color);
 }
 
-.subviewbutton.panel-subview-footer {
-  margin: 0;
-  background-color: var(--arrowpanel-dimmed);
-  border-top: 1px solid var(--panel-separator-color);
-  border-radius: 0;
-}
-
-menuitem.panel-subview-footer@menuStateHover@,
-.subviewbutton.panel-subview-footer@buttonStateHoverOrFocus@ {
-  background-color: var(--arrowpanel-dimmed-further);
-}
-
-menuitem.panel-subview-footer@menuStateActive@,
-.subviewbutton.panel-subview-footer@buttonStateActive@ {
-  background-color: var(--arrowpanel-dimmed-even-further);
-  box-shadow: 0 1px 0 hsla(210,4%,10%,.05) inset;
-}
-
 #BMB_bookmarksPopup .subviewbutton:not([disabled="true"]) {
   color: inherit;
 }
 
 #BMB_bookmarksPopup .subviewbutton > .menu-iconic-left {
   margin-inline-end: 3px;
 }