Bug 1607669 - Remove unused code and CSS from AppMenu. r=darktrojan DONTBUILD
authorRichard Marti <richard.marti@gmail.com>
Wed, 01 Apr 2020 13:52:58 +0300
changeset 38657 90f959e0dbd9105cfe5b3af045360981ce3231bb
parent 38656 77796c5f7c3b4c2728da86ad78148b0ec5fc92c4
child 38658 30bd179df0f58563d7e648e056141fb4ef2c0786
push id400
push userclokep@gmail.com
push dateMon, 04 May 2020 18:56:09 +0000
reviewersdarktrojan
bugs1607669
Bug 1607669 - Remove unused code and CSS from AppMenu. r=darktrojan DONTBUILD
mail/test/static/browser_parsable_css.js
mail/themes/shared/customizableui/panelUI.css
--- a/mail/test/static/browser_parsable_css.js
+++ b/mail/test/static/browser_parsable_css.js
@@ -141,20 +141,16 @@ let propNameWhitelist = [
   { propName: "--bezier-grid-color", isFromDevTools: true },
 ];
 
 let thunderbirdWhitelist = [
   {
     sourceName: /^chrome:\/\/calendar\/skin\/shared\/suite/,
     isFromDevTools: false,
   },
-  {
-    sourceName: /^chrome:\/\/messenger\/skin\/shared\/customizableui\/panelUI.css/,
-    isFromDevTools: false,
-  },
 ];
 
 // Add suffix to stylesheets' URI so that we always load them here and
 // have them parsed. Add a random number so that even if we run this
 // test multiple times, it would be unlikely to affect each other.
 const kPathSuffix = "?always-parse-css-" + Math.random();
 
 function dumpWhitelistItem(item) {
--- a/mail/themes/shared/customizableui/panelUI.css
+++ b/mail/themes/shared/customizableui/panelUI.css
@@ -209,39 +209,16 @@ toolbarbutton[constrain-size="true"][cui
 }
 
 #zoom-in-button > .toolbarbutton-text,
 #zoom-out-button > .toolbarbutton-text,
 #zoom-reset-button > .toolbarbutton-icon {
   display: none;
 }
 
-/* Tracking Protection Button & Toggle */
-
-#appMenu-tp-label {
-  -moz-context-properties: fill;
-  fill: currentColor;
-  -moz-box-flex: 1;
-  padding: 0;
-  padding-inline-start: 8px;
-  margin: 0;
-}
-
-#appMenu-tp-icon {
-  list-style-image: url(chrome://browser/skin/tracking-protection.svg);
-}
-
-#appMenu-tp-button {
-  -moz-box-flex: 1;
-}
-
-#appMenu-tp-category {
-  margin-inline-end: 0;
-}
-
 .panel-banner-item {
   color: black !important /* !important overrides the toolbarbutton:hover default style on Linux */;
   background-color: hsla(96,65%,75%,.5);
 }
 
 .panel-banner-item:not([disabled]):focus,
 .panel-banner-item:not([disabled]):hover {
   background-color: hsla(96,65%,75%,.8);
@@ -315,41 +292,16 @@ panelview .toolbarbutton-1,
   color: var(--panel-disabled-color);
 }
 
 .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;
-}
-
 .subviewbutton-iconic > .toolbarbutton-text,
 .subviewbutton[image] > .toolbarbutton-text,
 .subviewbutton[targetURI] > .toolbarbutton-text,
 .subviewbutton.restoreallitem > .toolbarbutton-text,
 .subviewbutton.bookmark-item > .toolbarbutton-text,
 .subviewbutton[checked="true"] > .toolbarbutton-text {
   padding-inline-start: 8px; /* See '.subviewbutton-iconic > .toolbarbutton-text' rule above. */
 }
@@ -380,25 +332,16 @@ panelview .toolbarbutton-1,
   padding-inline-start: 0 !important; /* to override menu.css on Windows */
   -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 */
-}
-
 .subviewbutton[shortcut]::after {
   content: attr(shortcut);
   float: inline-end;
 }
 
 .PanelUI-subView .subviewbutton-nav::after {
   -moz-context-properties: fill, fill-opacity;
   content: url("chrome://messenger/skin/icons/back-12.svg");
@@ -413,34 +356,16 @@ panelview .toolbarbutton-1,
 }
 
 .subviewbutton[shortcut]::after,
 .subviewbutton[shortcut]::after,
 .PanelUI-subView .subviewbutton-nav::after {
   margin-inline-start: 10px;
 }
 
-.subviewbutton[type="highlight-bookmark"]::after {
-  content: url("chrome://browser/skin/bookmark-hollow.svg");
-}
-
-.subviewbutton[type="highlight-history"]::after {
-  content: url("chrome://browser/skin/history.svg");
-}
-
-.subviewbutton[type="highlight-bookmark"]::after,
-.subviewbutton[type="highlight-history"]::after {
-  -moz-context-properties: fill, fill-opacity;
-  fill: currentColor;
-  fill-opacity: 0.4;
-  float: inline-end;
-  /* Centers the icon and resizes it to 12px square. */
-  transform: translateY(2px) scaleX(.75);
-}
-
 .subviewbutton[checked="true"] {
   list-style-image: url(chrome://global/skin/icons/check.svg);
   -moz-context-properties: fill;
   fill: currentColor;
   color: inherit;
 }
 
 #appMenu-popup .toolbaritem-combined-buttons {
@@ -570,22 +495,16 @@ menuitem.panel-subview-footer:not([disab
   height: 24px;
   border-inline-start: 1px solid var(--panel-separator-color);
   border-top: none;
   margin: 0;
   margin-inline-start: 6px;
   margin-inline-end: 7px;
 }
 
-.subviewbutton > .menu-accel-container {
-  -moz-box-pack: end;
-  margin-inline-start: 10px;
-  margin-inline-end: auto;
-}
-
 toolbarpaletteitem[place="palette"] > .toolbarbutton-1 > .toolbarbutton-menu-dropmarker {
   display: none;
 }
 
 #search-container[cui-areatype="menu-panel"] {
   padding-top: 6px;
   padding-bottom: 6px;
 }
@@ -665,36 +584,31 @@ toolbaritem[overflowedItem=true],
 
 .widget-overflow-list .subviewbutton-nav:-moz-locale-dir(ltr)::after {
   transform: scaleX(-1);
 }
 
 .widget-overflow-list .subviewbutton-nav::after {
   margin-inline-start: 10px;
   -moz-context-properties: fill, fill-opacity;
-  content: url(chrome://browser/skin/back-12.svg);
+  content: url(chrome://messenger/skin/icons/back-12.svg);
   fill: currentColor;
   fill-opacity: 0.6;
   float: inline-end;
 }
 
 toolbarpaletteitem[place="menu-panel"] > .subviewbutton-nav::after {
   opacity: 0.5;
 }
 
 .widget-overflow-list .toolbarbutton-1:not(.toolbarbutton-combined) > .toolbarbutton-text {
   text-align: start;
   padding-inline-start: .5em;
 }
 
-.subviewbutton > .menu-iconic-left {
-  -moz-appearance: none;
-  margin-inline-end: 0;
-}
-
 .subviewradio {
   -moz-appearance: none;
   -moz-box-align: center;
   padding: 1px;
   margin: 0 0 2px;
   background-color: transparent;
   border-radius: 2px;
   border: 1px solid transparent;
@@ -788,50 +702,16 @@ toolbarpaletteitem[place="menu-panel"] >
   height: 32px;
 }
 
 .subviewbutton.download > .toolbarbutton-text > .status-text {
   color: var(--panel-disabled-color);
   font-size: .9em;
 }
 
-.subviewbutton.download > .action-button {
-  -moz-appearance: none; /* To avoid native Windows hover styling */
-  -moz-context-properties: fill, fill-opacity;
-  fill: currentColor;
-  fill-opacity: 1;
-
-%ifdef XP_MACOSX
-  list-style-image: url("chrome://browser/skin/search-glass.svg");
-%else
-  list-style-image: url("chrome://browser/skin/folder.svg");
-%endif
-
-/* Measurement to vertically center this button: 1 line of text minus half of 4px top margin. */
-  margin: calc(1em - 2px) 0 0;
-  padding: 4px;
-}
-
-.subviewbutton.download[canRetry] > .action-button {
-  list-style-image: url("chrome://browser/skin/reload.svg");
-}
-
-.subviewbutton.download:not([canShow]):not([canRetry]) > .action-button {
-  fill: currentColor;
-  fill-opacity: 0.4;
-}
-
-.subviewbutton.download:-moz-any([canShow],[canRetry]) > .action-button:not(:-moz-any([disabled],[open],:active)):-moz-any(:hover,:focus) {
-  background-color: var(--arrowpanel-dimmed-further);
-}
-
-.subviewbutton.download:-moz-any([canShow],[canRetry]) > .action-button:not([disabled]):-moz-any([open],:hover:active) {
-  background-color: var(--arrowpanel-dimmed-even-further);
-}
-
 %define menuPanelWidth 22.35em
 %define appmenuWarningBackgroundColor #FFEFBF
 %define appmenuWarningBackgroundColorHover #FFE8A2
 %define appmenuWarningBackgroundColorActive #FFE38F
 %define appmenuWarningColor black
 %define appmenuWarningBorderColor hsl(45,100%,77%)
 
 %define appmenuWarningBackgroundColorBrightText hsla(55,100%,50%,.1)
@@ -844,17 +724,17 @@ toolbarpaletteitem[place="menu-panel"] >
   height: 10px;
   width: 10px;
   background-size: contain;
   border: none;
 }
 
 .button-appmenu[badge-status="addon-alert"] > .toolbarbutton-badge-stack > .toolbarbutton-badge {
   height: 13px;
-  background: url(chrome://browser/skin/warning.svg) center / contain no-repeat transparent;
+  background: url(chrome://global/skin/icons/warning.svg) center / contain no-repeat transparent;
   box-shadow: none;
   border-radius: 0;
   /* Use the included fallbacks defined in the SVG file instead of inheriting from .toolbarbutton-1. */
   -moz-context-properties: none;
 }
 
 .button-appmenu[badge-status] > .toolbarbutton-badge-stack > .toolbarbutton-badge:-moz-window-inactive {
   filter: grayscale(100%);
@@ -903,17 +783,17 @@ toolbarpaletteitem[place="menu-panel"] >
 }
 
 .addon-banner-item > .toolbarbutton-icon {
   width: 16px;
   height: 16px;
 }
 
 .addon-banner-item::after {
-  background: url(chrome://browser/skin/warning.svg) no-repeat center;
+  background: url(chrome://global/skin/icons/warning.svg) no-repeat center;
 }
 
 :root[lwt-popup-brighttext] .addon-banner-item::after {
   -moz-context-properties: fill, stroke;
   fill: #FFE900;
   stroke: transparent;
 }