<?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>306258</bug_id>
          
          <creation_ts>2026-01-26 02:44:48 -0800</creation_ts>
          <short_desc>`height: 100%` has wrong calculation for img as grid cell nested inside flexbox</short_desc>
          <delta_ts>2026-04-29 10:03:28 -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>Safari 26</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://github.com/web-platform-tests/wpt/pull/59550</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Oliver Joseph Ash">oliverjash</reporter>
          <assigned_to name="Sammy Gill">sgill26</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>karlcow</cc>
    
    <cc>sgill26</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2175069</commentid>
    <comment_count>0</comment_count>
    <who name="Oliver Joseph Ash">oliverjash</who>
    <bug_when>2026-01-26 02:44:48 -0800</bug_when>
    <thetext>https://codepen.io/OliverJAsh/pen/KwMvXKW

In Chrome and Firefox the `height: 100%` on `img` is computed as the height of the grid row. ✅

However, in Safari, the `height: 100%` on `img` is computed as the height of the container. ❌

Interestingly, if you remove the parent flexbox, the `height: 100%` is computed as the height of the row. ✅</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2175077</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-01-26 03:22:17 -0800</bug_when>
    <thetext>*** Chrome Canary 146.0.7651.1 (Official Build) canary-dcheck (arm64) ***

Image is not stretched in container.

*** Firefox Nightly 149 (20260124212758) ***

Image is not stretched in container.

*** WebKit ToT (306197@main) - Minibrowser ***

Image is *stretched* in container.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2177114</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-02-02 02:45:11 -0800</bug_when>
    <thetext>&lt;rdar://problem/169431440&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2204995</commentid>
    <comment_count>3</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2026-04-27 10:55:07 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/63559</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2205776</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-04-29 07:41:02 -0700</bug_when>
    <thetext>Committed 312281@main (bd1628731f5e): &lt;https://commits.webkit.org/312281@main&gt;

Reviewed commits have been landed. Closing PR #63559 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2205822</commentid>
    <comment_count>5</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2026-04-29 10:03:28 -0700</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/59550</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>