Open Bug 1739194 Opened 3 years ago Updated 5 months ago

RFP breaks Color Scheme Simulation via DevTools

Categories

(DevTools :: Inspector, defect, P3)

Firefox 96
defect

Tracking

(Not tracked)

People

(Reporter: mozilla-bugzilla, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

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

Steps to reproduce:

  1. Enable privacy.resistFingerprinting via about:config
  2. Visit any website that supports the preferred-color-scheme media query (example: https://bugzilla.mozilla.org/)
  3. Verify the website appears with light styling
  4. Open devtools, attempt to simulate dark color scheme (click the moon icon in the inspector tab)

Actual results:

Page does not switch to dark color scheme

Expected results:

Page switches to dark color scheme (i.e. RFP should not interfere with DevTools testing tools)

The Bugbug bot thinks this bug should belong to the 'DevTools::Inspector' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Inspector
Product: Firefox → DevTools

Check what is expected for color scheme media queries when resistFingerprinting is enabled.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jdescottes)

It is probably an issue for many things other than color scheme.
We do change the behavior of many web APIs when resist finger printing is enabled:
https://searchfox.org/mozilla-central/search?q=ShouldResistFingerprinting&path=&case=false&regexp=false

Regarding color scheme, it probably relates to this one check:
https://searchfox.org/mozilla-central/rev/88cd13997fb0747cdcd78638fc762ff2d75e1fc5/dom/base/Document.cpp#17628-17631

I can confirm moving this check before the RFP check fixes this issue and allows the devtools to override RFP. I believe this will also allow extensions to override the RFP setting (from the API in bug 1733461), but that behavior may be desirable anyways?

Related: https://bugzilla.mozilla.org/show_bug.cgi?id=1732114 and https://bugzilla.mozilla.org/show_bug.cgi?id=1745453.

And yes, I would like that to work more generally than just with devtools.

If any decision comes up for Bug 1732114 we can reconsider, for now there's no clear action.

Severity: -- → S3
Depends on: 1732114
Flags: needinfo?(jdescottes)
Priority: -- → P3

Like Bug 1826998 - the behavior of RFP as it interacts with Devtools is a very undefined, grey area. Some of that grey will need to be addressed since FPP is a supported feature, but for now we haven't overlapped any FPP things with Devtool breakage.

See Also: → 1826998
Depends on: 1900845
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: