<?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>255736</bug_id>
          
          <creation_ts>2023-04-20 10:52:45 -0700</creation_ts>
          <short_desc>[margin-trim][block layout] self-collapsing children at block-end don&apos;t have nested content trimmed</short_desc>
          <delta_ts>2023-04-26 15:36:23 -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>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/39674</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>
          <dependson>253610</dependson>
          <blocked>253454</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Sammy Gill">sgill26</reporter>
          <assigned_to name="Sammy Gill">sgill26</assigned_to>
          <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>1950117</commentid>
    <comment_count>0</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2023-04-20 10:52:45 -0700</bug_when>
    <thetext>If you have a block structure that is something similar to the following:

&lt;container&gt;
    &lt;item style=&quot;margin-bottom: 10px&quot;&gt;&lt;/item&gt;
    &lt;item style=&quot;margin-bottom: 10px; height: 0px;&quot;&gt;
        &lt;item style=&quot;margin-bottom: 10px; height: 0px;&quot;&gt;
            &lt;item style=&quot;margin-bottom: 10px; height: 0px;&quot;&gt;
                &lt;item style=&quot;margin-bottom: 10px; height: 0px;&quot;&gt;&lt;/item&gt;
                &lt;item style=&quot;margin-bottom: 10px; height: 0px;&quot;&gt;&lt;/item&gt;
            &lt;/item&gt;
        &lt;/item&gt;
    &lt;/item&gt;
&lt;/container&gt;

We currently trim the last child, which is self collapsing, and its margins correctly, but none of the children nested within it are trimmed. Since these are at the block-end and we trim  the margins that are collapsed through for the container, none of the inner margins end up participating in margin collapsing with the container&apos;s margin and renderings look correct. However, with the tests added as a part of 253610 we can actually see that these margins are not trimmed by looking at the computed style values.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1950118</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-04-20 10:53:51 -0700</bug_when>
    <thetext>&lt;rdar://problem/108327029&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1950121</commentid>
    <comment_count>2</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2023-04-20 11:10:57 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/12982</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1950937</commentid>
    <comment_count>3</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2023-04-24 20:52:48 -0700</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/39674</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1951459</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-04-26 15:36:20 -0700</bug_when>
    <thetext>Committed 263439@main (809b95bb1a78): &lt;https://commits.webkit.org/263439@main&gt;

Reviewed commits have been landed. Closing PR #12982 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>