Skip to content

[ResizeObserver] with device pixel content box does not take into account visualViewport.scale #11412

Open
@greggman

Description

@greggman

ResizeObserver is supposed to return devicePixelContentBox which is the number of device pixels of an observed element's content box. But, if you pinch to zoom (Chrome Mac, 2 finger or AFAIK any Android phone), the number of device pixels changes but ResizeObserver's event is not fired nor does the actual reported size of devicePixelContentBox change if you refresh a pinch to zoom page.

This means you can't actually get the correct device pixels. You can multiply by scale but you end up with the same problem devicePixelContentBox was designed to solve.

Can this be fixed?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions