<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>219005</bug_id>
          
          <creation_ts>2020-11-16 14:39:26 -0800</creation_ts>
          <short_desc>Implement ResizeObserver&apos;s devicePixelContentBox</short_desc>
          <delta_ts>2026-03-12 21:11:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=230242</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=291310</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>157743</dependson>
          <blocked>244141</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kenneth Russell">kbr</reporter>
          <assigned_to name="Ahmad Saleem">ahmad.saleem792</assigned_to>
          <cc>apolostudioapps</cc>
    
    <cc>cathiechen</cc>
    
    <cc>cdumez</cc>
    
    <cc>daxpedda</cc>
    
    <cc>dino</cc>
    
    <cc>fred.wang</cc>
    
    <cc>gman</cc>
    
    <cc>jdarpinian</cc>
    
    <cc>jujjyl</cc>
    
    <cc>karl+webkit</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>koivisto</cc>
    
    <cc>luiscastro193</cc>
    
    <cc>ricardovalero95</cc>
    
    <cc>rik</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>smoley</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1708001</commentid>
    <comment_count>0</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2020-11-16 14:39:26 -0800</bug_when>
    <thetext>ResizeObserver has gained the ability to observe the number of device pixels that a given element covers in the &quot;device-pixel-content-box&quot; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1708083</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-11-16 18:54:03 -0800</bug_when>
    <thetext>&lt;rdar://problem/71469186&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1793394</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2021-09-14 12:58:15 -0700</bug_when>
    <thetext>Some discussion that might result in spec changes here: https://github.com/w3c/csswg-drafts/issues/6608</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1993886</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-11-20 06:08:59 -0800</bug_when>
    <thetext>*** Bug 264158 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2117586</commentid>
    <comment_count>4</comment_count>
    <who name="Apolo">apolostudioapps</who>
    <bug_when>2025-05-16 05:08:30 -0700</bug_when>
    <thetext>any news on this??</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2168376</commentid>
    <comment_count>5</comment_count>
    <who name="">jujjyl</who>
    <bug_when>2025-12-27 16:41:53 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2189870</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-03-12 21:11:50 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/60534</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>