WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
219005
Implement ResizeObserver's devicePixelContentBox
https://bugs.webkit.org/show_bug.cgi?id=219005
Summary
Implement ResizeObserver's devicePixelContentBox
Kenneth Russell
Reported
2020-11-16 14:39:26 PST
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-11-16 18:54:03 PST
<
rdar://problem/71469186
>
Simon Fraser (smfr)
Comment 2
2021-09-14 12:58:15 PDT
Some discussion that might result in spec changes here:
https://github.com/w3c/csswg-drafts/issues/6608
Karl Dubost
Comment 3
2023-11-20 06:08:59 PST
***
Bug 264158
has been marked as a duplicate of this bug. ***
Apolo
Comment 4
2025-05-16 05:08:30 PDT
any news on this??
jujjyl
Comment 5
2025-12-27 16:41:53 PST
A common problem with Unity3D rendered content on Safari is that the render target does not match the browser 100%, since Safari does not implement ResizeObserver with devicePixelContentBox. Any thoughts on Safari to implement this feature? The code pattern that Unity3D utilizes is practically demonstrated at
https://webgpu.github.io/webgpu-samples/?sample=resizeObserverHDDPI
- which moires on Safari due to lack of web page content being unable to guarantee that canvas contents get 1:1 displayed on screen.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug