prefers-color-scheme should not default to dark for Elemental Balanced
Categories
(Firefox :: Theme, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox-esr91 | --- | unaffected |
firefox93 | --- | unaffected |
firefox94 | --- | unaffected |
firefox95 | --- | fixed |
People
(Reporter: birtles, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
I'm using the Elemental Balanced theme which has a light new tab page but mostly dark chrome.
Bug 1529323 causes prefers-color-scheme to default to dark which is surprising to me as I would expect it to follow what the new tab page does.
Reporter | ||
Comment 1•3 years ago
|
||
Hi Emilio, needinfo'ing you as requested in bug 1529323 comment 55. Thanks!
Assignee | ||
Comment 2•3 years ago
|
||
Yeah, so I'd argue this is a bug (or inconsistency) in the theme code. We derive the preferred color scheme from the toolbar background color (which in this theme is dark).
This inconsistency was already present before my patch. The newtab page is light-ish, but all the other bits of the browser chrome like about:addons
, about:preferences
, etc were dark.
We could split the preference for content in two using the newtab page colors I guess, let me check how hard would it be.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
Document::GetBrowsingContext uses a WeakPtr<nsIDocShell> so we can't do
that. But we have all the other media emulation data and so on in the
pres context which we can access off the main thread for style, so move the
override code there.
Assignee | ||
Comment 4•3 years ago
|
||
We use "is-in-chrome-docshell" rather than "is a chrome doc" so that about:
pages that are loaded in the content area (like about:addons etc) follow the
general content theme as well.
Cache the relevant color schemes since having that many branches on the default
system theme made me a bit uncomfortable, and this code can be called quite a
lot... Though it probably isn't such a huge deal.
Depends on D128673
Assignee | ||
Comment 5•3 years ago
|
||
The toolbar pref change triggers eventually a look-and-feel-changed
notification, so no need to observe that directly.
Depends on D128674
Reporter | ||
Comment 6•3 years ago
|
||
Thanks! Distinguishing between dark mode for chrome vs content makes a lot more sense to me.
Updated•3 years ago
|
Comment 7•3 years ago
|
||
Set release status flags based on info from the regressing bug 1529323
Assignee | ||
Updated•3 years ago
|
Comment 10•3 years ago
|
||
bugherder |
Comment 11•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Comment 12•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Updated•3 years ago
|
Description
•