Closed
Bug 1607027
Opened 6 years ago
Closed 3 years ago
css @media device-pixel-ratio and RFP
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
RESOLVED
INVALID
People
(Reporter: thorin, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
17.19 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
Note: For my test, my device/monitor has a device pixel ratio of 1. I am not sure what happens on HiDPI devices like a Mac with Retina.
control test
- disable RFP
- load test page: see [1]
devicePixelRatio=1+green RFPnotation[matchMedia -webkit- | -moz-] device-pixel-ratio=1 | 1+green RFP- zoom, e.g to 120%
devicePixelRatio=1.2+red RFP[matchMedia -webkit- | -moz-] device-pixel-ratio=1.2 | 1.2(rounded) +red RFP
the test
- enable RFP
- reload the test page at 100% zoom
devicePixelRatio=1+green RFP[matchMedia -webkit- | -moz-] device-pixel-ratio=1 | 1+green RFP- zoom, e.g to 120%
devicePixelRatio=1+green RFP= spoofed[matchMedia -webkit- | -moz-] device-pixel-ratio=1.2 | 1.2+red RFP= not spoofed
** the problem**
window.devicePixelRatiois protected, but-webkit-{min/max}-device-pixel-ratioand{min/max-}-moz-device-pixel-ratioare not
references
- [1] Test page: https://ghacksuserjs.github.io/TorZillaPrint/TorZillaPrint.html (at the end of the first section titled Screen)
- Bug 418986
- https://dxr.mozilla.org/mozilla-central/source/dom/base/test/chrome/bug418986-1.js
android
- this is the only device I have that has a dpr != 1
- The resize event on the test page (which auto recalculates the values) is only triggered on non-android devices
- I can pinch-to-zoom and use the three dot menu and refresh (or I can just hit the re-reun button) and all three values are always the same. With RFP on they are always
1. With RFP off they report the correct device pixel ratio (for me that's2.608695...) - I'm sure I'm misinterpreting how android + pinch-to-zoom + dpr work
| Reporter | ||
Comment 1•6 years ago
|
||
| Reporter | ||
Updated•6 years ago
|
Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
Updated•5 years ago
|
Blocks: uplift_tor_fingerprinting
Updated•4 years ago
|
Severity: normal → S3
| Reporter | ||
Updated•3 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
Comment 2•3 years ago
|
||
You reopened the other two, is this supposed to be reopened as well?
Flags: needinfo?(simon.mainey)
| Reporter | ||
Comment 3•3 years ago
|
||
no, this is invalid, we do protect the value - https://searchfox.org/mozilla-central/source/layout/style/nsMediaFeatures.cpp#197 (it still has issues, but not at 100% zoom which we set on new tabs/eTLDs) - I inadvertently closed the wrong one Bug 1672093 because the titles were similar
Flags: needinfo?(simon.mainey)
You need to log in
before you can comment on or make changes to this bug.
Description
•