<?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>316680</bug_id>
          
          <creation_ts>2026-06-09 10:45:07 -0700</creation_ts>
          <short_desc>iframes don&apos;t respect the color-scheme CSS property of the parent document.</short_desc>
          <delta_ts>2026-09-16 09:38:54 -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>Layout and Rendering</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>visionOS 26</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=284973</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Oliver Williams">oliverwilliams345</reporter>
          <assigned_to name="Kiet Ho">kiet.ho</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>karlcow</cc>
    
    <cc>kiet.ho</cc>
    
    <cc>michael</cc>
    
    <cc>rik</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>woodlxf00</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2218993</commentid>
    <comment_count>0</comment_count>
    <who name="Oliver Williams">oliverwilliams345</who>
    <bug_when>2026-06-09 10:45:07 -0700</bug_when>
    <thetext>If test.html contains either &lt;meta name=&quot;color-scheme&quot; content=&quot;dark light&quot; /&gt; or the following CSS  :root { color-scheme: light dark; } then the following should render differently. 
&lt;iframe style=&quot;color-scheme: light;&quot; src=&quot;test.html&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;iframe style=&quot;color-scheme: dark;&quot; src=&quot;test.html&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

This already works properly in Firefox and Chrome/Edge. 

color-scheme should effect: 
- prefers-color-scheme media query (this works in Safari Technology Preview already! ✅)
- Canvas, CanvasText, and other system color keywords. ❌
- Any uses of the CSS light-dark() function. ❌
- scrollbars ❌</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2219006</commentid>
    <comment_count>1</comment_count>
      <attachid>480028</attachid>
    <who name="Oliver Williams">oliverwilliams345</who>
    <bug_when>2026-06-09 11:51:34 -0700</bug_when>
    <thetext>Created attachment 480028
Test code for the iframe</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2219192</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-06-09 18:21:11 -0700</bug_when>
    <thetext>&lt;rdar://problem/179176395&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2219200</commentid>
    <comment_count>3</comment_count>
    <who name="Kiet Ho">kiet.ho</who>
    <bug_when>2026-06-09 18:27:04 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/66834</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>480028</attachid>
            <date>2026-06-09 11:51:34 -0700</date>
            <delta_ts>2026-06-09 11:51:34 -0700</delta_ts>
            <desc>Test code for the iframe</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>701</size>
            <attacher name="Oliver Williams">oliverwilliams345</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CiAgICA8bWV0YSBjaGFyc2V0
PSJVVEYtOCI+CiAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNl
LXdpZHRoLCBpbml0aWFsLXNjYWxlPTEuMCI+CiAgICA8bWV0YSBuYW1lPSJjb2xvci1zY2hlbWUi
IGNvbnRlbnQ9ImRhcmsgbGlnaHQiIC8+CiAgICA8dGl0bGU+RG9jdW1lbnQ8L3RpdGxlPgogICAg
PHN0eWxlPgogICAgICAgIDpyb290IHsKICAgICAgICAgICAgY29sb3Itc2NoZW1lOiBsaWdodCBk
YXJrOwogICAgICAgIH0KCiAgICAgICAgYm9keSB7CiAgICAgICAgICAgIGJhY2tncm91bmQtY29s
b3I6IENhbnZhczsKICAgICAgICAgICAgIGhlaWdodDogNTAwcHg7CiAgICAgICAgfQoKICAgICAg
ICBoMSB7CiAgICAgICAgICAgIGNvbG9yOiBsaWdodC1kYXJrKGJsdWUsIHllbGxvdyk7CiAgICAg
ICAgfQoKICAgICAgICAuY2FudmFzVGV4dCB7CiAgICAgICAgICAgIGhlaWdodDogMjBweDsgd2lk
dGg6IDIwcHg7IGJhY2tncm91bmQtY29sb3I6IENhbnZhc1RleHQ7CiAgICAgICAgfQoKICAgICAg
IAogICAgPC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4KICAgIDxkaXY+CiAgICAgICAgPGgxPlRlc3Rp
bmchPC9oMT4KICAgICAgICA8ZGl2IGNsYXNzPSJjYW52YXNUZXh0Ij48L2Rpdj4KICAgIDwvZGl2
Pgo8L2JvZHk+CjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>