ResizeObserver has gained the ability to observe the number of device pixels that a given element covers in the "device-pixel-content-box" observation: https://www.w3.org/TR/resize-observer/#dom-resizeobserverboxoptions-device-pixel-content-box This feature was discussed and specified in the CSS working group. Some concerns were raised by WebKit engineers at the time that WebKit can only provide an accurate answer for this observation after, and not before, the paint cycle runs. Even with this concern, this feature is important for web applications that expect to be able to do pixel-accurate rendering. Now that WebKit has ResizeObserver support (thanks to Igalia folks for implementing it!), would it be possible to do at least a first-cut implementation of this new observation? It should make the example in the article https://web.dev/device-pixel-content-box/ render more stably. Currently it shows bad moiré effects in Safari Technology Preview on Retina display MacBook Pros.
<rdar://problem/71469186>
Some discussion that might result in spec changes here: https://github.com/w3c/csswg-drafts/issues/6608
*** Bug 264158 has been marked as a duplicate of this bug. ***