Bug 1452836 - Apply the arrowpanel variables to submenus of the bookmarks popup. r?ntim draft
authorJared Wein <jwein@mozilla.com>
Tue, 17 Apr 2018 10:09:22 -0400
changeset 784389 d758a661027c9e8a9e3cf8823c8953607240230c
parent 782003 6547c27303bc4d8961b11e656751e839807d65c7
push id106925
push userbmo:jaws@mozilla.com
push dateWed, 18 Apr 2018 14:59:01 +0000
reviewersntim
bugs1452836
milestone61.0a1
Bug 1452836 - Apply the arrowpanel variables to submenus of the bookmarks popup. r?ntim This is the same approach used in the Windows panelUI.css MozReview-Commit-ID: IiqbGK8zMdw
browser/themes/linux/customizableui/panelUI.css
browser/themes/linux/jar.mn
browser/themes/linux/places/bookmarks-menu-arrow.png
browser/themes/osx/customizableui/panelUI.css
browser/themes/shared/customizableui/menu-arrow.svg
browser/themes/shared/customizableui/panelUI.inc.css
browser/themes/shared/jar.inc.mn
browser/themes/windows/customizableui/menu-arrow.svg
browser/themes/windows/customizableui/panelUI.css
browser/themes/windows/jar.mn
--- a/browser/themes/linux/customizableui/panelUI.css
+++ b/browser/themes/linux/customizableui/panelUI.css
@@ -17,32 +17,16 @@
 #BMB_bookmarksPopup menupopup > hbox > .popup-internal-box > .arrowscrollbox-scrollbox > .scrollbox-innerbox  {
   padding-top: 4px;
 }
 
 menuitem.subviewbutton {
   -moz-appearance: none !important;
 }
 
-menu.subviewbutton > .menu-right {
-  -moz-appearance: none;
-  list-style-image: url(chrome://browser/skin/places/bookmarks-menu-arrow.png);
-  -moz-image-region: rect(0, 16px, 16px, 0);
-  width: 16px;
-  height: 16px;
-}
-
-menu[disabled="true"].subviewbutton > .menu-right {
-  -moz-image-region: rect(0, 32px, 16px, 16px);
-}
-
-menu.subviewbutton > .menu-right:-moz-locale-dir(rtl) {
-  transform: scaleX(-1);
-}
-
 .subviewradio > .radio-label-box {
   -moz-appearance: none;
 }
 
 /*
  * #pageActionFeedbackAnimatableImage is wider than the panel, and due to a
  * bug in panels on Linux, a box-shadow appears where the image would be if
  * overflow:hidden wasn't applied. Disabling the box-shadow for this panel on
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -27,17 +27,16 @@ browser.jar:
   skin/classic/browser/feeds/feedIcon16.png           (feeds/feedIcon16.png)
   skin/classic/browser/feeds/subscribe.css            (feeds/subscribe.css)
   skin/classic/browser/notification-icons/geo-blocked.svg  (notification-icons/geo-blocked.svg)
   skin/classic/browser/notification-icons/geo-detailed.svg (notification-icons/geo-detailed.svg)
   skin/classic/browser/notification-icons/geo.svg          (notification-icons/geo.svg)
   skin/classic/browser/places/allBookmarks.png        (places/allBookmarks.png)
   skin/classic/browser/places/bookmarksMenu.png       (places/bookmarksMenu.png)
   skin/classic/browser/places/bookmarksToolbar.png    (places/bookmarksToolbar.png)
-  skin/classic/browser/places/bookmarks-menu-arrow.png           (places/bookmarks-menu-arrow.png)
 * skin/classic/browser/places/editBookmark.css (places/editBookmark.css)
   skin/classic/browser/places/livemark-item.png       (places/livemark-item.png)
 * skin/classic/browser/places/places.css              (places/places.css)
   skin/classic/browser/places/organizer.css           (places/organizer.css)
   skin/classic/browser/places/organizer.xml           (places/organizer.xml)
   skin/classic/browser/places/tag.png                 (places/tag.png)
   skin/classic/browser/places/toolbarDropMarker.png   (places/toolbarDropMarker.png)
   skin/classic/browser/places/unsortedBookmarks.png   (places/unsortedBookmarks.png)
deleted file mode 100644
index 9418d100e52342fb6792169e70a038ad6372b443..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/themes/osx/customizableui/panelUI.css
+++ b/browser/themes/osx/customizableui/panelUI.css
@@ -34,28 +34,35 @@ panelmultiview .toolbaritem-combined-but
 #appMenu-fxa-container[fxastatus="signedin"] > #appMenu-fxa-status > #appMenu-fxa-avatar {
   margin-inline-start: 18px;
 }
 
 .subviewbutton:not(:-moz-any([image],[targetURI],.cui-withicon, .bookmark-item)) > .menu-iconic-left {
   display: none;
 }
 
-/* Override OSX-specific toolkit styles for the bookmarks panel */
-menu.subviewbutton > .menu-right {
-  margin-inline-end: 0;
+#BMB_bookmarksPopup menupopup[placespopup=true]:-moz-lwtheme {
   -moz-appearance: none;
+  background: transparent;
 }
 
-menu.subviewbutton > .menu-right > image {
- /* We don't want the arrow to highlight when the .subviewbutton is hovered,
-  * so we set the -moz-appearance rule on the image
-  * (which doesn't inherit the _moz-menuactive attribute) instead.
-  */
-  -moz-appearance: menuarrow;
+#BMB_bookmarksPopup menupopup[placespopup=true] > hbox:-moz-lwtheme {
+  background: var(--arrowpanel-background);
+  border-radius: var(--arrowpanel-border-radius);
+  box-shadow: 0 0 0 1px var(--arrowpanel-border-color);
+  color: var(--arrowpanel-color);
+  border: none;
+  padding: var(-arrowpanel-padding);
+  margin: 1px;
+}
+
+/* Override OSX-specific toolkit styles for the bookmarks panel */
+menu.subviewbutton > .menu-right {
+  margin-inline-end: -4px;
+  -moz-appearance: none;
 }
 
 .PanelUI-subView menuseparator,
 .cui-widget-panelview menuseparator {
   padding: 0 !important;
 }
 
 #PanelUI-remotetabs-tabslist > label[itemtype="client"] {
rename from browser/themes/windows/customizableui/menu-arrow.svg
rename to browser/themes/shared/customizableui/menu-arrow.svg
--- a/browser/themes/shared/customizableui/panelUI.inc.css
+++ b/browser/themes/shared/customizableui/panelUI.inc.css
@@ -785,16 +785,33 @@ panelview .toolbarbutton-1,
   outline: 0;
 }
 
 .subviewbutton > .toolbarbutton-text {
   padding: 0;
   padding-inline-start: 24px; /* This is 16px for the icon + 8px for the padding as defined below. */
 }
 
+.subviewbutton > .menu-right {
+  -moz-appearance: none;
+  list-style-image: url(chrome://browser/skin/customizableui/menu-arrow.svg);
+  -moz-context-properties: fill, fill-opacity;
+  fill: currentColor;
+  /* Reset the rect we inherit from the button */
+  -moz-image-region: auto;
+}
+
+.subviewbutton[disabled="true"] > .menu-right {
+  fill-opacity: 0.6;
+}
+
+.subviewbutton > .menu-right:-moz-locale-dir(rtl) {
+  transform: scaleX(-1);
+}
+
 .subviewbutton > .menu-right,
 .subviewbutton > .menu-accel-container > .menu-iconic-accel,
 .subviewbutton > .menu-iconic-left,
 .subviewbutton > .menu-iconic-text {
   padding-bottom: 0;
   padding-top: 0;
 }
 
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -28,16 +28,17 @@
   skin/classic/browser/controlcenter/tracking-protection.svg   (../shared/controlcenter/tracking-protection.svg)
   skin/classic/browser/controlcenter/warning-gray.svg          (../shared/controlcenter/warning-gray.svg)
   skin/classic/browser/controlcenter/warning-yellow.svg        (../shared/controlcenter/warning-yellow.svg)
   skin/classic/browser/customizableui/empty-overflow-panel.png     (../shared/customizableui/empty-overflow-panel.png)
   skin/classic/browser/customizableui/empty-overflow-panel@2x.png  (../shared/customizableui/empty-overflow-panel@2x.png)
   skin/classic/browser/customizableui/density-compact.svg      (../shared/customizableui/density-compact.svg)
   skin/classic/browser/customizableui/density-normal.svg       (../shared/customizableui/density-normal.svg)
   skin/classic/browser/customizableui/density-touch.svg        (../shared/customizableui/density-touch.svg)
+  skin/classic/browser/customizableui/menu-arrow.svg           (../shared/customizableui/menu-arrow.svg)
   skin/classic/browser/customizableui/whimsy.png               (../shared/customizableui/whimsy.png)
   skin/classic/browser/downloads/contentAreaDownloadsView.css  (../shared/downloads/contentAreaDownloadsView.css)
   skin/classic/browser/downloads/download-blocked.svg          (../shared/downloads/download-blocked.svg)
   skin/classic/browser/downloads/download-summary.svg          (../shared/downloads/download-summary.svg)
   skin/classic/browser/downloads/download-icons.svg            (../shared/downloads/download-icons.svg)
   skin/classic/browser/downloads/notification-start-animation.svg  (../shared/downloads/notification-start-animation.svg)
   skin/classic/browser/drm-icon.svg                            (../shared/drm-icon.svg)
   skin/classic/browser/fullscreen/insecure.svg                 (../shared/fullscreen/insecure.svg)
--- a/browser/themes/windows/customizableui/panelUI.css
+++ b/browser/themes/windows/customizableui/panelUI.css
@@ -38,33 +38,16 @@
 
 /* Disabled empty item looks too small otherwise, because it has no icon. */
 menuitem.subviewbutton[disabled]:not(.menuitem-iconic) {
   /* This is 16px for an icon + 3px for its margins + 1px for its padding +
    * 2px for its border, see above */
   min-height: 22px;
 }
 
-menu.subviewbutton > .menu-right {
-  -moz-appearance: none;
-  list-style-image: url(chrome://browser/skin/customizableui/menu-arrow.svg);
-  -moz-context-properties: fill, fill-opacity;
-  fill: currentColor;
-  /* Reset the rect we inherit from the button: */
-  -moz-image-region: auto;
-}
-
-menu[disabled="true"].subviewbutton > .menu-right {
-  fill-opacity: 0.6;
-}
-
-menu.subviewbutton > .menu-right:-moz-locale-dir(rtl) {
-  transform: scaleX(-1);
-}
-
 /* Win8 and beyond. */
 @media not all and (-moz-os-version: windows-win7) {
   #BMB_bookmarksPopup menupopup[placespopup=true] > hbox,
   #edit-controls@inAnyPanel@,
   #zoom-controls@inAnyPanel@,
   #edit-controls@inAnyPanel@ > toolbarbutton,
   #zoom-controls@inAnyPanel@ > toolbarbutton {
     border-radius: 0;
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -13,17 +13,16 @@ browser.jar:
   skin/classic/browser/monitor_16-10.png
   skin/classic/browser/pageInfo.css
   skin/classic/browser/pageInfo.png
 * skin/classic/browser/searchbar.css
   skin/classic/browser/setDesktopBackground.css
   skin/classic/browser/slowStartup-16.png
   skin/classic/browser/webRTC-indicator.css  (../shared/webRTC-indicator.css)
 * skin/classic/browser/controlcenter/panel.css                 (controlcenter/panel.css)
-  skin/classic/browser/customizableui/menu-arrow.svg           (customizableui/menu-arrow.svg)
 * skin/classic/browser/customizableui/panelUI.css       (customizableui/panelUI.css)
 * skin/classic/browser/downloads/allDownloadsView.css   (downloads/allDownloadsView.css)
 * skin/classic/browser/downloads/downloads.css                 (downloads/downloads.css)
   skin/classic/browser/feeds/feedIcon.png                      (feeds/feedIcon.png)
   skin/classic/browser/feeds/feedIcon16.png                    (feeds/feedIcon16.png)
   skin/classic/browser/feeds/subscribe.css                     (feeds/subscribe.css)
   skin/classic/browser/notification-icons/geo-blocked.svg      (notification-icons/geo-blocked.svg)
   skin/classic/browser/notification-icons/geo-detailed.svg     (notification-icons/geo-detailed.svg)