Bug 1699250 - Use proton dark theme in-content r=jaws

This also fixes up various about pages.

Differential Revision: https://phabricator.services.mozilla.com/D108800
This commit is contained in:
Mark Striemer
2021-03-28 18:33:05 +00:00
parent 918c913984
commit bca6e66b9e
17 changed files with 112 additions and 56 deletions

View File

@@ -33,6 +33,7 @@
#include "mozilla/Sprintf.h"
#include "mozilla/StaticAnalysisFunctions.h"
#include "mozilla/StaticPrefs_apz.h"
#include "mozilla/StaticPrefs_browser.h"
#include "mozilla/StaticPrefs_dom.h"
#include "mozilla/StaticPrefs_font.h"
#include "mozilla/StaticPrefs_layout.h"
@@ -5317,7 +5318,8 @@ nscolor PresShell::GetDefaultBackgroundColorToDraw() {
doc->PrefersColorScheme(Document::IgnoreRFP::Yes) ==
StylePrefersColorScheme::Dark) {
// Use --in-content-page-background for prefers-color-scheme: dark.
return NS_RGB(0x2A, 0x2A, 0x2E);
return StaticPrefs::browser_proton_enabled() ? NS_RGB(0x1C, 0x1B, 0x22)
: NS_RGB(0x2A, 0x2A, 0x2E);
}
return backgroundColor;