From 21a9757b82eb986ce80f929d0417816ce49a5c30 Mon Sep 17 00:00:00 2001 From: Andreea Pavel Date: Thu, 7 Dec 2017 14:57:07 +0200 Subject: [PATCH] Backed out 1 changesets (bug 1423626) for failing browser chrome toolkit/components/extensions/test/browser/browser_ext_themes_chromeparity.js r=backout on a CLOSED TREE Backed out changeset 92f0f022897e (bug 1423626) --- .../extensions/test/browser/browser.ini | 1 - .../browser_ext_themes_alpha_accentcolor.js | 30 ------------------- toolkit/modules/LightweightThemeConsumer.jsm | 7 ++--- 3 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 toolkit/components/extensions/test/browser/browser_ext_themes_alpha_accentcolor.js diff --git a/toolkit/components/extensions/test/browser/browser.ini b/toolkit/components/extensions/test/browser/browser.ini index d41405905289..d7a520bb0bc6 100644 --- a/toolkit/components/extensions/test/browser/browser.ini +++ b/toolkit/components/extensions/test/browser/browser.ini @@ -3,7 +3,6 @@ support-files = head.js [browser_ext_management_themes.js] -[browser_ext_themes_alpha_accentcolor.js] [browser_ext_themes_chromeparity.js] [browser_ext_themes_dynamic_getCurrent.js] [browser_ext_themes_dynamic_onUpdated.js] diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_alpha_accentcolor.js b/toolkit/components/extensions/test/browser/browser_ext_themes_alpha_accentcolor.js deleted file mode 100644 index 9be2288b6cc7..000000000000 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_alpha_accentcolor.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -add_task(async function test_alpha_accentcolor() { - let extension = ExtensionTestUtils.loadExtension({ - manifest: { - "theme": { - "images": { - "headerURL": "image1.png", - }, - "colors": { - "accentcolor": "rgba(230, 128, 0, 0.1)", - "textcolor": TEXT_COLOR, - }, - }, - }, - files: { - "image1.png": BACKGROUND, - }, - }); - - await extension.startup(); - - let docEl = window.document.documentElement; - let style = window.getComputedStyle(docEl); - - Assert.equal(style.backgroundColor, "rgb(230, 128, 0)", - "Window background color should be opaque"); - - await extension.unload(); -}); diff --git a/toolkit/modules/LightweightThemeConsumer.jsm b/toolkit/modules/LightweightThemeConsumer.jsm index eedbdaee5b8c..0f238a01aadc 100644 --- a/toolkit/modules/LightweightThemeConsumer.jsm +++ b/toolkit/modules/LightweightThemeConsumer.jsm @@ -130,7 +130,6 @@ LightweightThemeConsumer.prototype = { let textcolor = this._sanitizeCSSColor(aData.textcolor) || "black"; _setProperty(root, active, "--lwt-text-color", textcolor); _setProperty(root, active, "--lwt-accent-color", this._sanitizeCSSColor(aData.accentcolor) || "white"); - if (active) { let dummy = this._doc.createElement("dummy"); dummy.style.color = textcolor; @@ -176,12 +175,10 @@ LightweightThemeConsumer.prototype = { span.style.color = cssColor; cssColor = span.style.color; if (cssColor == "transparent" || - cssColor == "rgba(0, 0, 0, 0)" || - !cssColor) { + cssColor == "rgba(0, 0, 0, 0)") { return ""; } - // Remove alpha channel from color - return `rgb(${_parseRGB(cssColor).join(", ")})`; + return cssColor; } };