Bug 1436749 - Backout support for button_background since it was not supposed to be supported. r=dao
authorJared Wein <jwein@mozilla.com>
Fri, 09 Feb 2018 15:28:19 -0500
changeset 458284 fa386052255aaafab09ca505be09b1211fbf9732
parent 458283 5212d4f7b2b9ed82767ac29c984cb16b90e4e6ac
child 458285 d6e7f810f7d301cb928b6ed16837a3b4f660a069
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1436749
milestone60.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 1436749 - Backout support for button_background since it was not supposed to be supported. r=dao MozReview-Commit-ID: CVZqDOvU04V
browser/themes/shared/toolbarbuttons.inc.css
toolkit/components/extensions/ext-theme.js
toolkit/components/extensions/schemas/theme.json
toolkit/components/extensions/test/browser/browser_ext_themes_toolbarbutton_colors.js
toolkit/modules/LightweightThemeConsumer.jsm
--- a/browser/themes/shared/toolbarbuttons.inc.css
+++ b/browser/themes/shared/toolbarbuttons.inc.css
@@ -164,28 +164,16 @@ toolbar .toolbaritem-combined-buttons:no
   background-size: 1px 16px;
   opacity: .2;
 }
 
 toolbar[brighttext] .toolbaritem-combined-buttons > separator {
   opacity: .3;
 }
 
-#PersonalToolbar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active),
-.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled=true]),
-.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled=true]),
-.findbar-button:not(:-moz-any([checked="true"],[disabled="true"])) > .toolbarbutton-text,
-toolbarbutton.bookmark-item:not(.subviewbutton):not([disabled="true"]):not([open]),
-toolbar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active) > .toolbarbutton-icon,
-toolbar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active) > .toolbarbutton-text,
-toolbar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active) > .toolbarbutton-badge-stack {
-  background-color: var(--lwt-toolbarbutton-background, transparent);
-  color: inherit;
-}
-
 #PersonalToolbar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active):hover,
 .tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled=true]):hover,
 .tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled=true]):hover,
 .findbar-button:not(:-moz-any([checked="true"],[disabled="true"])):hover > .toolbarbutton-text,
 toolbarbutton.bookmark-item:not(.subviewbutton):hover:not([disabled="true"]):not([open]),
 toolbar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-icon,
 toolbar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-text,
 toolbar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-badge-stack {
--- a/toolkit/components/extensions/ext-theme.js
+++ b/toolkit/components/extensions/ext-theme.js
@@ -153,17 +153,16 @@ class Theme {
         case "tab_text":
         case "toolbar_field":
         case "toolbar_field_text":
         case "toolbar_field_border":
         case "toolbar_field_separator":
         case "toolbar_top_separator":
         case "toolbar_bottom_separator":
         case "toolbar_vertical_separator":
-        case "button_background":
         case "button_background_hover":
         case "button_background_active":
           this.lwtStyles[color] = cssColor;
           break;
       }
     }
   }
 
--- a/toolkit/components/extensions/schemas/theme.json
+++ b/toolkit/components/extensions/schemas/theme.json
@@ -140,20 +140,16 @@
               "icons": {
                 "$ref": "ThemeColor",
                 "optional": true
               },
               "icons_attention": {
                 "$ref": "ThemeColor",
                 "optional": true
               },
-              "button_background": {
-                "$ref": "ThemeColor",
-                "optional": true
-              },
               "button_background_hover": {
                "$ref": "ThemeColor",
                "optional": true
               },
               "button_background_active": {
                 "$ref": "ThemeColor",
                 "optional": true
               }
--- a/toolkit/components/extensions/test/browser/browser_ext_themes_toolbarbutton_colors.js
+++ b/toolkit/components/extensions/test/browser/browser_ext_themes_toolbarbutton_colors.js
@@ -1,30 +1,28 @@
 "use strict";
 
 Cu.importGlobalProperties(["InspectorUtils"]);
 
 // This test checks whether applied WebExtension themes that attempt to change
 // the button background color properties are applied correctly.
 
 add_task(async function test_button_background_properties() {
-  const BUTTON_BACKGROUND = "#DEDEDE";
   const BUTTON_BACKGROUND_ACTIVE = "#FFFFFF";
   const BUTTON_BACKGROUND_HOVER = "#59CBE8";
 
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "theme": {
         "images": {
           "headerURL": "image1.png",
         },
         "colors": {
           "accentcolor": ACCENT_COLOR,
           "textcolor": TEXT_COLOR,
-          "button_background": BUTTON_BACKGROUND,
           "button_background_active": BUTTON_BACKGROUND_ACTIVE,
           "button_background_hover": BUTTON_BACKGROUND_HOVER,
         },
       },
     },
     files: {
       "image1.png": BACKGROUND,
     },
@@ -32,22 +30,16 @@ add_task(async function test_button_back
   });
 
   await extension.startup();
 
   let toolbarButton = document.querySelector("#home-button");
   let toolbarButtonIcon = document.getAnonymousElementByAttribute(toolbarButton, "class", "toolbarbutton-icon");
   let toolbarButtonIconCS = window.getComputedStyle(toolbarButtonIcon);
 
-  Assert.equal(
-    toolbarButtonIconCS.getPropertyValue("background-color"),
-    `rgb(${hexToRGB(BUTTON_BACKGROUND).join(", ")})`,
-    "Toolbar button background is set."
-  );
-
   InspectorUtils.addPseudoClassLock(toolbarButton, ":hover");
 
   Assert.equal(
     toolbarButtonIconCS.getPropertyValue("background-color"),
     `rgb(${hexToRGB(BUTTON_BACKGROUND_HOVER).join(", ")})`,
     "Toolbar button hover background is set."
   );
 
--- a/toolkit/modules/LightweightThemeConsumer.jsm
+++ b/toolkit/modules/LightweightThemeConsumer.jsm
@@ -23,17 +23,16 @@ const kCSSVarsMap = [
   ["--url-and-searchbar-color", "toolbar_field_text"],
   ["--lwt-toolbar-field-border-color", "toolbar_field_border"],
   ["--urlbar-separator-color", "toolbar_field_separator"],
   ["--tabs-border-color", "toolbar_top_separator", "navigator-toolbox"],
   ["--lwt-toolbar-vertical-separator", "toolbar_vertical_separator"],
   ["--toolbox-border-bottom-color", "toolbar_bottom_separator"],
   ["--lwt-toolbarbutton-icon-fill", "icon_color"],
   ["--lwt-toolbarbutton-icon-fill-attention", "icon_attention_color"],
-  ["--lwt-toolbarbutton-background", "button_background"],
   ["--lwt-toolbarbutton-hover-background", "button_background_hover"],
   ["--lwt-toolbarbutton-active-background", "button_background_active"],
 ];
 
 this.LightweightThemeConsumer =
  function LightweightThemeConsumer(aDocument) {
   this._doc = aDocument;
   this._win = aDocument.defaultView;