<?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>276358</bug_id>
          
          <creation_ts>2024-07-09 00:07:14 -0700</creation_ts>
          <short_desc>margin and preferred width calculation for MathML elements</short_desc>
          <delta_ts>2024-07-10 01:41:16 -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>MathML</component>
          <version>WebKit Nightly Build</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>
          
          <blocked>276169</blocked>
    
    <blocked>276413</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Frédéric Wang Nélar">fred.wang</reporter>
          <assigned_to name="Frédéric Wang Nélar">fred.wang</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2045260</commentid>
    <comment_count>0</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2024-07-09 00:07:14 -0700</bug_when>
    <thetext>Many &quot;preferred width&quot; tests are failing for margin-002/margin-003 (from imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/), even if the block size, inline size and coordinates are correct. I guess the problem is that the margins are not set when computePreferredLogicalWidths() (for layoutBlock() this is done by recomputeLogicalWidth() IIUC). Need to debug a bit what&apos;s happening here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2045262</commentid>
    <comment_count>1</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2024-07-09 00:25:52 -0700</bug_when>
    <thetext>This is likely the reason why LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-001.html is failing too, the size and rendering of the `&lt;mrow&gt;` and `&lt;math&gt;` elements are correct and the block size of the `&lt;div&gt;` container is good. However, the inline margins don&apos;t seem to taken into account for the inline size of the `&lt;div&gt;`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2045302</commentid>
    <comment_count>2</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2024-07-09 07:28:07 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/30604</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2045486</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-07-10 01:20:52 -0700</bug_when>
    <thetext>@Alan - from Comment 1 - is it using IFC as well for MathML?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2045492</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-07-10 01:40:17 -0700</bug_when>
    <thetext>Committed 280810@main (9a8589b0774a): &lt;https://commits.webkit.org/280810@main&gt;

Reviewed commits have been landed. Closing PR #30604 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2045493</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-07-10 01:41:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/131447182&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>