зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1707076 - Draw the webextension-theme additonal backgrounds on Windows 7 and Windows 8 even if the header image isn't specified. r=desktop-theme-reviewers,Itiel
Differential Revision: https://phabricator.services.mozilla.com/D113169
This commit is contained in:
Родитель
cfb3cfdc03
Коммит
7fdcbbbab4
|
@ -77,12 +77,15 @@ body {
|
|||
(-moz-os-version: windows-win8) {
|
||||
:root:-moz-lwtheme {
|
||||
background-color: var(--lwt-accent-color);
|
||||
background-image: var(--lwt-additional-images);
|
||||
background-repeat: var(--lwt-background-tiling);
|
||||
background-position: var(--lwt-background-alignment);
|
||||
}
|
||||
|
||||
:root[lwtheme-image] {
|
||||
background-image: var(--lwt-header-image) !important;
|
||||
background-repeat: no-repeat;
|
||||
background-position: right top !important;
|
||||
background-image: var(--lwt-header-image, linear-gradient(transparent, transparent)), var(--lwt-additional-images) !important;
|
||||
background-repeat: no-repeat, var(--lwt-background-tiling);
|
||||
background-position: right top, var(--lwt-background-alignment) !important;
|
||||
}
|
||||
|
||||
:root:-moz-lwtheme:-moz-window-inactive {
|
||||
|
|
|
@ -33,8 +33,8 @@ add_task(async function test_default_additional_backgrounds_alignment() {
|
|||
|
||||
Assert.equal(
|
||||
rootCS.getPropertyValue("background-position"),
|
||||
RIGHT_TOP,
|
||||
"root only contains theme_frame alignment property"
|
||||
`${RIGHT_TOP}, ${RIGHT_TOP}`,
|
||||
"root contains theme_frame and lwt-background-alignment properties"
|
||||
);
|
||||
Assert.equal(
|
||||
toolboxCS.getPropertyValue("background-position"),
|
||||
|
@ -98,8 +98,8 @@ add_task(async function test_additional_backgrounds_alignment() {
|
|||
let rootCS = window.getComputedStyle(docEl);
|
||||
Assert.equal(
|
||||
rootCS.getPropertyValue("background-position"),
|
||||
RIGHT_TOP,
|
||||
"root only contains theme_frame alignment property"
|
||||
`${RIGHT_TOP}, ${LEFT_BOTTOM}, ${CENTER_CENTER}, ${RIGHT_TOP}`,
|
||||
"root contains theme_frame and additional_backgrounds alignment properties"
|
||||
);
|
||||
Assert.equal(
|
||||
toolboxCS.getPropertyValue("background-position"),
|
||||
|
|
|
@ -156,7 +156,7 @@ add_task(async function test_support_backgrounds_repeat() {
|
|||
);
|
||||
Assert.equal(
|
||||
rootCS.backgroundPosition,
|
||||
"100% 0%",
|
||||
"100% 0%, 100% 0%",
|
||||
"The backgroundPosition should use the default value for root."
|
||||
);
|
||||
Assert.equal(
|
||||
|
@ -166,7 +166,7 @@ add_task(async function test_support_backgrounds_repeat() {
|
|||
);
|
||||
Assert.equal(
|
||||
rootCS.backgroundRepeat,
|
||||
"no-repeat",
|
||||
"no-repeat, repeat-x, repeat-y, repeat",
|
||||
"The backgroundRepeat should use the default values for root."
|
||||
);
|
||||
Assert.equal(
|
||||
|
@ -253,13 +253,13 @@ add_task(async function test_additional_images_check() {
|
|||
);
|
||||
Assert.equal(
|
||||
rootCS.backgroundPosition,
|
||||
"100% 0%",
|
||||
"100% 0%, 100% 0%",
|
||||
"The backgroundPosition should use the default value."
|
||||
);
|
||||
Assert.equal(
|
||||
rootCS.backgroundRepeat,
|
||||
"no-repeat",
|
||||
"The backgroundPosition should use only one (default) value."
|
||||
"no-repeat, no-repeat",
|
||||
"The backgroundPosition should use only one (default) value for the header and the default additional images."
|
||||
);
|
||||
} else {
|
||||
let bgImage = toolboxCS.backgroundImage.split(",")[0].trim();
|
||||
|
|
Загрузка…
Ссылка в новой задаче