Closed Bug 1753995 Opened 2 years ago Closed 2 years ago

Clean up some code around window.devicePixelRatio.

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(3 files)

No description provided.

It only pokes at the document's pres context, there's no need to
roundtrip through the outer window. No behavior change.

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

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

Attachment #9262664 - Attachment description: Bug 1753995 - Remove non-test usage of WindowUtils.screenPixelsByCssPixels. r=Gijs,mconley → Bug 1753995 - Remove non-test usage of WindowUtils.screenPixelsPerCSSPixel. r=Gijs,mconley
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/83e9c53f8644
Move devicePixelRatio getter from outer to inner window. r=smaug
https://hg.mozilla.org/integration/autoland/rev/bcf3efefe2be
Remove non-test usage of WindowUtils.screenPixelsPerCSSPixel. r=mconley
https://hg.mozilla.org/integration/autoland/rev/51ec329ff10c
Remove nsDOMWindowUtils.screenPixelsPerCSSPixel. r=smaug,dholbert
Regressions: 1779001
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: