<?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>247742</bug_id>
          
          <creation_ts>2022-11-10 09:42:40 -0800</creation_ts>
          <short_desc>Fix broken preferred widths optimization involving subtree layout roots</short_desc>
          <delta_ts>2022-11-13 16:59:18 -0800</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 Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Ahmad Saleem">ahmad.saleem792</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>bfulgham</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>1911565</commentid>
    <comment_count>0</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-11-10 09:42:40 -0800</bug_when>
    <thetext>Hi Team,

While going through Blink commits, I came across following commit:

Link - https://chromium.googlesource.com/chromium/blink/+/ed902d339fbff3a62e2f6124d8d40bbad45e97c0

Which removed a hacky optimization added in 2006.

We still have this optimization here:

https://github.com/WebKit/WebKit/blob/fa2a14f12031baf24d5bc6d6727c3e25c5052589/Source/WebCore/rendering/RenderBox.cpp#LL2610

The testcase attached render same as Chrome Canary 109 as in Safari Technology Preview 157 and Safari 16.1:

Test Case - https://jsfiddle.net/m4hja1pv/show

But I think it would be better tested in EWS. I will tag @Alexey (ap), who landed this in 2006. Just to get his input.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1912134</commentid>
    <comment_count>1</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-11-13 16:58:00 -0800</bug_when>
    <thetext>Committed 256623@main (06fa3e82eb2e): &lt;https://commits.webkit.org/256623@main&gt;

Reviewed commits have been landed. Closing PR #6433 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1912135</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-11-13 16:59:18 -0800</bug_when>
    <thetext>&lt;rdar://problem/102298308&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>