[csswg-drafts] [resize-observer] devicePixelContentBoxSize is always present in ResizeObserverEntry whether or not it's being observed (#6608)

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

== [resize-observer] devicePixelContentBoxSize is always present in ResizeObserverEntry whether or not it's being observed ==
https://drafts.csswg.org/resize-observer/#resize-observer-entry-interface shows that devicePixelContentBoxSize is always present in the entry.

The spec notes that *observing* `device-pixel-content-box`  can be expensive because the UA has to compute it every time, but because devicePixelContentBoxSize is always present in ResizeObserverEntry, whether or not it's being observed, then the UA has to compute it on every callback anyway.

It would be better if the spec allowed devicePixelContentBoxSize to be optional, and only present when being observed.

cc @atotic 

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


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

Received on Monday, 13 September 2021 20:34:31 UTC