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)
This commit is contained in:
Andreea Pavel 2017-12-07 14:57:07 +02:00
Родитель d5a942aaab
Коммит 21a9757b82
3 изменённых файлов: 2 добавлений и 36 удалений

Просмотреть файл

@ -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]

Просмотреть файл

@ -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();
});

Просмотреть файл

@ -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;
}
};