[Webkit-unassigned] [Bug 236232] New: devicePixelRatio and screen coordinates behave oddly with zoom.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 7 06:29:39 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=236232

            Bug ID: 236232
           Summary: devicePixelRatio and screen coordinates behave oddly
                    with zoom.
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: emilio at crisal.io

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).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220207/c47883e5/attachment.htm>


More information about the webkit-unassigned mailing list