mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1733413 - Force light color-scheme for non-native-theme docs for now. r=mstange
In the future we need to remove this patch, implement dark form controls, and probably make those tests pass some other way (like forcing the chrome color-scheme to match content for those tests or something). Otherwise they are really expected to fail on a Firefox dark theme. But this is a somewhat-easy fix for now. Differential Revision: https://phabricator.services.mozilla.com/D127473
This commit is contained in:
parent
80c02069eb
commit
046514dd62
@ -1072,6 +1072,12 @@ LookAndFeel::ColorScheme LookAndFeel::ColorSchemeForChrome() {
|
||||
|
||||
static LookAndFeel::ColorScheme ColorSchemeForDocument(
|
||||
const dom::Document& aDoc, bool aContentSupportsDark) {
|
||||
if (aDoc.ShouldAvoidNativeTheme()) {
|
||||
// The non-native theme doesn't know how to draw dark form controls yet, so
|
||||
// let's force light colors for now.
|
||||
return LookAndFeel::ColorScheme::Light;
|
||||
}
|
||||
|
||||
if (nsContentUtils::IsChromeDoc(&aDoc)) {
|
||||
return LookAndFeel::ColorSchemeForChrome();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user