<?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>253610</bug_id>
          
          <creation_ts>2023-03-08 15:11:16 -0800</creation_ts>
          <short_desc>[margin-trim] Trimmed block-end margins for block-level boxes in a block container should be reflected in computed style</short_desc>
          <delta_ts>2023-04-25 20:08:32 -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>CSS</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/39673</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>
          
          <blocked>253454</blocked>
    
    <blocked>255736</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Sammy Gill">sgill26</reporter>
          <assigned_to name="Sammy Gill">sgill26</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1939872</commentid>
    <comment_count>0</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2023-03-08 15:11:16 -0800</bug_when>
    <thetext>The web inspector shows the untrimmed margins for a box even if has been trimmed by the containing block&apos;s margin-trim property.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1939873</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-03-08 15:11:43 -0800</bug_when>
    <thetext>&lt;rdar://problem/106454992&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1940227</commentid>
    <comment_count>2</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2023-03-09 14:32:07 -0800</bug_when>
    <thetext>This scenario is actually slightly more tricky than the block-start one. 

By the time we get to the end of the block container, we have propagated some margin information from the top that will be used to determine the final margin of the block container. At this point we actually haven’t trimmed any of the block-end margins of the children (the m_marginBox in the renderer still contains the used value of the margin), but we only consider the propagated value to update/trim the block containers block-end margin.

I think in order for this to be correct, we need to walk back up the container&apos;s children and trim the block-end margins (and block-start if the child is self collapsing) until we get to a child that is not self collapsing.

I think this means that we also need to update the position for the self-collapsing children, which may be just below the first non self-collapsing child.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1950099</commentid>
    <comment_count>3</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2023-04-20 09:45:21 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/12977</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1950936</commentid>
    <comment_count>4</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2023-04-24 20:51:04 -0700</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/39673</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1951238</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-04-25 20:08:30 -0700</bug_when>
    <thetext>Committed 263398@main (e44bd7f346a1): &lt;https://commits.webkit.org/263398@main&gt;

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

    </bug>

</bugzilla>