Closed Bug 1739566 Opened 4 years ago Closed 4 years ago

prefers-color-scheme not working some contents.

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 96
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: alstjr7375, Unassigned)

Details

(Keywords: regression, regressionwindow-wanted)

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

Load plain text.
https://raw.githubusercontent.com/mozilla/gecko-dev/master/LICENSE

Environment

  • Manjro(KDE)
  • Error Version: 96.0a1(Nightly)
  • Works Version: 94.0(Released Firefox)

Actual results:

A white background appears.

Expected results:

A dark theme should appear.

https://github.com/mozilla/gecko-dev/blob/d2f8488b6a704443a5c5bfc6d2878171b5f0d393/layout/style/res/plaintext.css#L21-L31
(The behavior of unobservable-document() has no problem.)

Can you share your about:support information here? (Attach a new file)

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
Attached file ff94.txt

Of course

firefox94 Info

Attached file ff96.txt

Firefox 96 info.

The strange thing is that it works well in some pages, such as about:support or setting.

Can you run pip install --user mozregression and then mozregression --good 94 -a https://raw.githubusercontent.com/mozilla/gecko-dev/master/LICENSE? That should show what broke it on your setup.

Also, does opening the devtools on https://raw.githubusercontent.com/mozilla/gecko-dev/master/LICENSE and calling matchMedia("(prefers-color-scheme: dark)").matches say true?

Thanks so much.

Flags: needinfo?(alstjr7375)

It looks good in mozregression.


FF94

  • Github contents matchMedia("(prefers-color-scheme: dark)").matches: true

FF96 (Nightly)

  • matchMedia("(prefers-color-scheme: dark)").matches: false

It works for internal addresses(about:*, chrome://*) in Firefox, but not external addresses(google.com, addons.mozilla.org).


I investigated a little more to find out the situation.
When I create a new profile, it seems to work normally.
There seems to be something conflicting with the profile.

Flags: needinfo?(alstjr7375)

Thanks for your kind response!!

Would you like profile information?
If you need, I will attach it.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID

Yeah would be interesting to know if you have any ui.* pref customized, or layout.css.prefers-color-scheme.content-override

Thanks. That is because of privacy.resistFingerprinting=true, which you had set.

Thank you very much! 👍👍
I never thought it was about privacy setting.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: