<?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>301263</bug_id>
          
          <creation_ts>2025-10-22 02:07:57 -0700</creation_ts>
          <short_desc>text-box-trim + underline (a, u, ins, abbr) spacing issue.</short_desc>
          <delta_ts>2025-10-31 19:14:08 -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>Mac (Intel)</rep_platform>
          <op_sys>macOS 26</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>301672</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=301794</see_also>
          <bug_file_loc>https://codepen.io/nileshprajapati/pen/JoGNEgz</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="Nilesh Prajapati">nileshprajapati</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>fantasai.bugs</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>vitor.roriz</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2153292</commentid>
    <comment_count>0</comment_count>
    <who name="Nilesh Prajapati">nileshprajapati</who>
    <bug_when>2025-10-22 02:07:57 -0700</bug_when>
    <thetext>Hi Webkit,

I’ve come across an issue with inline elements (a, u, ins, and abbr) that contain an underline. When `text-box-trim` is applied, the spacing between the text and the underline has additional spacing.

I have included a Codepen demo of the issue, see below:

https://codepen.io/nileshprajapati/pen/JoGNEgz

In comparison, Chrome behaves as expected, but within Safari, this displays inconsistent additional spacing between the text and the text-decoration underline.

Note: I have tested both with and without text-underline-offset in the demo above.

Thanks,
Nilesh</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2154931</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-10-29 02:08:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/163629558&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2155304</commentid>
    <comment_count>2</comment_count>
      <attachid>477238</attachid>
    <who name="alan">zalan</who>
    <bug_when>2025-10-30 13:07:51 -0700</bug_when>
    <thetext>Created attachment 477238
Test reduction</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2155305</commentid>
    <comment_count>3</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2025-10-30 13:08:41 -0700</bug_when>
    <thetext>Nilesh, thank you for filing this bug report. I am able to reproduce this issue on trunk.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2155381</commentid>
    <comment_count>4</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2025-10-30 16:28:21 -0700</bug_when>
    <thetext>Apparently I &quot;accidentally&quot; fixed it today with 302345@main. It was supposed to be a cleanup type of change but now I have a test case. Thank you!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2155382</commentid>
    <comment_count>5</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2025-10-30 16:28:40 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 301672 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2155384</commentid>
    <comment_count>6</comment_count>
    <who name="Nilesh Prajapati">nileshprajapati</who>
    <bug_when>2025-10-30 16:35:28 -0700</bug_when>
    <thetext>👍🏾</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2155679</commentid>
    <comment_count>7</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2025-10-31 19:14:08 -0700</bug_when>
    <thetext>some more fixes in bug 301794.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>477238</attachid>
            <date>2025-10-30 13:07:51 -0700</date>
            <delta_ts>2025-10-30 13:07:51 -0700</delta_ts>
            <desc>Test reduction</desc>
            <filename>301263.html</filename>
            <type>text/html</type>
            <size>165</size>
            <attacher name="alan">zalan</attacher>
            
              <data encoding="base64">PHN0eWxlPgpzcGFuIHsKICAgIHRleHQtZGVjb3JhdGlvbjogdW5kZXJsaW5lOwp9Cjwvc3R5bGU+
CjxzcGFuPlBhc3MgaWYgdW5kZXJsaW5lIDwvc3Bhbj48c3BhbiBzdHlsZT0idGV4dC1ib3g6IHRy
aW0tYm90aCBjYXAgYWxwaGFiZXRpYzsiPmZvcm1zIGEgc2luZ2xlIGxpbmUuPHNwYW4+
</data>

          </attachment>
      

    </bug>

</bugzilla>