[csswg-drafts] [ResizeObserver] with device pixel content box does not take into account visualViewport.scale (#11412)

greggman has just created a new issue for https://github.com/w3c/csswg-drafts:

== [ResizeObserver] with device pixel content box does not take into account visualViewport.scale ==
* https://drafts.csswg.org/resize-observer/#dom-resizeobserver-observe
* https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport/scale

`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?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11412 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 24 December 2024 05:11:15 UTC