Bug 1727371 - Use the right color scheme for default background/color lookup on chrome docs. r=mstange
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 01 Sep 2021 16:52:53 +0000
changeset 590487 bb30adfdd26d132b37383357b45b4a5353072fbd
parent 590486 223b49b427f51563481745bf3ddcfb3d6d049925
child 590488 cff287485a8b062d4f3a62fb95b76fcbde12d01c
push id148990
push userealvarez@mozilla.com
push dateWed, 01 Sep 2021 16:56:03 +0000
treeherderautoland@bb30adfdd26d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1727371
milestone93.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1727371 - Use the right color scheme for default background/color lookup on chrome docs. r=mstange Differential Revision: https://phabricator.services.mozilla.com/D124059
layout/style/PreferenceSheet.cpp
--- a/layout/style/PreferenceSheet.cpp
+++ b/layout/style/PreferenceSheet.cpp
@@ -105,17 +105,18 @@ void PreferenceSheet::Prefs::Load(bool a
   } else {
     using ColorID = LookAndFeel::ColorID;
     const auto standins = LookAndFeel::UseStandins(useStandins);
     // TODO(emilio): In the future we probably want to keep both sets of colors
     // around or something.
     //
     // FIXME(emilio): Why do we look at a different set of colors when using
     // standins vs. not?
-    const auto scheme = LookAndFeel::ColorScheme::Light;
+    const auto scheme = aIsChrome ? LookAndFeel::ColorSchemeForChrome()
+                                  : LookAndFeel::ColorScheme::Light;
     mColors.mDefault = LookAndFeel::Color(
         useStandins ? ColorID::Windowtext : ColorID::WindowForeground, scheme,
         standins, mColors.mDefault);
     mColors.mDefaultBackground = LookAndFeel::Color(
         useStandins ? ColorID::Window : ColorID::WindowBackground, scheme,
         standins, mColors.mDefaultBackground);
     mColors.mLink = LookAndFeel::Color(ColorID::MozNativehyperlinktext, scheme,
                                        standins, mColors.mLink);