Bug 1736163 - layout.css.prefers-color-scheme.content-override should trigger a look and feel update.
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sun, 17 Oct 2021 15:32:02 +0200
changeset 596116 5e4047061e46c5cb86d1ef694bc206fc8f4e7d20
parent 596115 bd61327fb2153e33e11408392ec037b70d369105
child 596117 81ca2d28c253bacdae4eabbce536a156a325ced8
push id38887
push usermalexandru@mozilla.com
push dateSun, 17 Oct 2021 21:37:54 +0000
treeherdermozilla-central@5e4047061e46 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1736163
milestone95.0a1
first release with
nightly linux32
5e4047061e46 / 95.0a1 / 20211017213754 / files
nightly linux64
5e4047061e46 / 95.0a1 / 20211017213754 / files
nightly mac
5e4047061e46 / 95.0a1 / 20211017213754 / files
nightly win32
5e4047061e46 / 95.0a1 / 20211017213754 / files
nightly win64
5e4047061e46 / 95.0a1 / 20211017213754 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1736163 - layout.css.prefers-color-scheme.content-override should trigger a look and feel update. MANUAL PUSH: Trivial orange fix CLOSED TREE
testing/specialpowers/content/SpecialPowersParent.jsm
widget/nsXPLookAndFeel.cpp
--- a/testing/specialpowers/content/SpecialPowersParent.jsm
+++ b/testing/specialpowers/content/SpecialPowersParent.jsm
@@ -407,16 +407,17 @@ class SpecialPowersParent extends JSWind
     have effect. This is only needed for ui. and font. prefs, which affect the
     look and feel code and have some change-coalescing going on.
   */
   _applyPrefs(actions) {
     let requiresRefresh = false;
     for (let pref of actions) {
       requiresRefresh =
         requiresRefresh ||
+        pref.name == "layout.css.prefers-color-scheme.content-override" ||
         pref.name.startsWith("ui.") ||
         pref.name.startsWith("browser.display.") ||
         pref.name.startsWith("font.");
       if (pref.action == "set") {
         this._setPref(pref.name, pref.type, pref.value, pref.iid);
       } else if (pref.action == "clear") {
         Services.prefs.clearUserPref(pref.name);
       }
--- a/widget/nsXPLookAndFeel.cpp
+++ b/widget/nsXPLookAndFeel.cpp
@@ -425,16 +425,17 @@ void nsXPLookAndFeel::OnPrefChanged(cons
 static constexpr struct {
   nsLiteralCString mName;
   widget::ThemeChangeKind mChangeKind =
       widget::ThemeChangeKind::MediaQueriesOnly;
 } kMediaQueryPrefs[] = {
     {"browser.display.windows.native_menus"_ns},
     {"browser.proton.enabled"_ns},
     {"browser.proton.places-tooltip.enabled"_ns},
+    {"layout.css.prefers-color-scheme.content-override"_ns},
     // This affects not only the media query, but also the native theme, so we
     // need to re-layout.
     {"browser.theme.toolbar-theme"_ns, widget::ThemeChangeKind::AllBits},
 };
 
 // Read values from the user's preferences.
 // This is done once at startup, but since the user's preferences
 // haven't actually been read yet at that time, we also have to