WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
236232
devicePixelRatio and screen coordinates behave oddly with zoom.
https://bugs.webkit.org/show_bug.cgi?id=236232
Summary
devicePixelRatio and screen coordinates behave oddly with zoom.
Emilio Cobos Álvarez (:emilio)
Reported
2022-02-07 06:29:39 PST
See also
https://bugs.chromium.org/p/chromium/issues/detail?id=1294796
and
https://bugzilla.mozilla.org/show_bug.cgi?id=1753836
which is why I'm looking into this. Test-case is
https://bug1753836.bmoattachments.org/attachment.cgi?id=9262644
. WebKit behaves oddly in different ways. devicePixelRatio doesn't change when zoomed, but window dimensions and so on do, but Screen coordinates don't. Given all browsers agree on Window dimensions and the meaning of a CSS pixel changing on full-page zoom, it seems to me the most logical behavior would be that everything reacts to zoom, including Screen coordinates and devicePixelRatio. Otherwise you get into rather odd situations like innerWidth being greater than screen.width. Firefox is the closest to this behavior (though we remove the zoom factor on event coordinates, which is what I'm going to fix next).
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-02-14 06:30:16 PST
<
rdar://problem/88901282
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug