Clean up some code around window.devicePixelRatio.
Categories
(Core :: DOM: Core & HTML, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox99 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(3 files)
Assignee | ||
Comment 1•3 years ago
|
||
It only pokes at the document's pres context, there's no need to
roundtrip through the outer window. No behavior change.
Assignee | ||
Comment 2•3 years ago
|
||
It does the same as window.devicePixelRatio. However a bunch of this
code is copy-pasted code trying to scale a canvas, but not messing with
full zoom is the right thing to do.
The full zoom value in the top level browser.xhtml page is always 1
anyways, and WindowsPreviewPerTab looking at the current browser tab's
full zoom is just bizarre...
Depends on D138019
Assignee | ||
Comment 3•3 years ago
|
||
For all purposes, this is the same as devicePixelRatio. It was meant to
skip the resistFingerprinting check the devicePixelRatio getter does,
but we do that now using CallerType in WebIDL, so if we cared about that
for these tests (which we don't) we could just do
SpecialPowers.wrap(window).devicePixelRatio.
As a follow-up we could move the NoOverride to window for symmetry. But
it's only used by devtools touch simulation so not sure if worth it.
Depends on D138020
Updated•3 years ago
|
Comment 5•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/83e9c53f8644
https://hg.mozilla.org/mozilla-central/rev/bcf3efefe2be
https://hg.mozilla.org/mozilla-central/rev/51ec329ff10c
Description
•