diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index e360d266851b..5edd24c81f98 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -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 { diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_additional_backgrounds_alignment.js b/toolkit/components/extensions/test/browser/browser_ext_themes_additional_backgrounds_alignment.js index 2db6cf84c14b..cc814b4ae80c 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_additional_backgrounds_alignment.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_additional_backgrounds_alignment.js @@ -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"), diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_multiple_backgrounds.js b/toolkit/components/extensions/test/browser/browser_ext_themes_multiple_backgrounds.js index 2b5558e8a229..7d837bfc0d4e 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_multiple_backgrounds.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_multiple_backgrounds.js @@ -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();