Backed out changeset 69c0d6c48015 (bug 1423626) on request for filled regressions on a CLOSED TREE

This commit is contained in:
Gurzau Raul 2017-12-09 05:35:52 +02:00
Родитель 1bdfa1c2a6
Коммит d0ef95540b
3 изменённых файлов: 3 добавлений и 37 удалений

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

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

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

@ -127,10 +127,9 @@ LightweightThemeConsumer.prototype = {
// so if we don't reset first, it'll keep the old value.
root.style.removeProperty("--lwt-text-color");
root.style.removeProperty("--lwt-accent-color");
let textcolor = aData.textcolor || "black";
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;
}
};