<?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>282444</bug_id>
          
          <creation_ts>2024-11-01 10:04:18 -0700</creation_ts>
          <short_desc>REGRESSION(272476@main): No ligatures across before/after and actual content</short_desc>
          <delta_ts>2024-11-07 09:35:45 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=6148</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="alan">zalan</reporter>
          <assigned_to name="alan">zalan</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>koivisto</cc>
    
    <cc>lea</cc>
    
    <cc>ntim</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>2072125</commentid>
    <comment_count>0</comment_count>
      <attachid>473106</attachid>
    <who name="alan">zalan</who>
    <bug_when>2024-11-01 10:04:18 -0700</bug_when>
    <thetext>Created attachment 473106
Test case

see attached test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072126</commentid>
    <comment_count>1</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2024-11-01 10:08:05 -0700</bug_when>
    <thetext>B---------- --      BODY RenderBody at (8,8) size 1384x791 renderer (0x113005cd0) layout box (0x113007a50) node (0x113006d40) layout id-&gt;[8]
            --        line at (0.00,0.00) size (1384.00x460.00) baseline (360.00) enclosing top (0.00) bottom (460.00)
            --          Root inline box at (0.00,0.00) size (811.13x460.00)
            --            Inline box at (0.00,0.00) size (244.34x460.00) renderer-&gt;(0x113007200)
            --            Inline box at (566.80,0.00) size (244.34x460.00) renderer-&gt;(0x1130076b0)
            --              Inline box at (700.00,0.00) size (111.13x460.00) renderer-&gt;(0x113007940)
            --          Run(s):
            --            Text at (0.00,0.00) size 133.20x460.00 run(0, 1) renderer-&gt;(0x113007310)
            --            Text at (133.20,0.00) size 111.13x460.00 run(0, 1) renderer-&gt;(0x113007400)
            --            Text at (244.34,0.00) size 322.46x460.00 run(0, 3) renderer-&gt;(0x1130075e0)
            --            Text at (566.80,0.00) size 133.20x460.00 run(0, 1) renderer-&gt;(0x1130077c0)
            --            Text at (700.00,0.00) size 111.13x460.00 run(0, 1) renderer-&gt;(0x1130074f0)

These text boxes need to be merged so that painting could apply ligatures -it&apos;s a pity though that such fragmented layout output affects painting in this way. painting should be a tiny bit smarter.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072128</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-11-01 10:19:37 -0700</bug_when>
    <thetext>&lt;rdar://problem/139079271&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072179</commentid>
    <comment_count>3</comment_count>
    <who name="Lea Verou">lea</who>
    <bug_when>2024-11-01 13:18:26 -0700</bug_when>
    <thetext>Please note that this is a regression. I&apos;ve tested using this codepen https://codepen.io/leaverou/pen/OJKZKyV and at least up to Safari 17.3 the issue is not present, whereas I can reproduce in Safari 17.5 and later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072181</commentid>
    <comment_count>4</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2024-11-01 13:21:50 -0700</bug_when>
    <thetext>(In reply to Lea Verou from comment #3)
&gt; Please note that this is a regression. I&apos;ve tested using this codepen
&gt; https://codepen.io/leaverou/pen/OJKZKyV and at least up to Safari 17.3 the
&gt; issue is not present, whereas I can reproduce in Safari 17.5 and later.
👍 thank you!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072433</commentid>
    <comment_count>5</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2024-11-03 19:58:36 -0800</bug_when>
    <thetext>I am somewhat surprised that the last one ever worked as I don&apos;t remember we ever merged content from individual renderers, while the middle &apos;fi&apos; seems to be a tree updater/builder regression as I am seeing 2 renderers constructed for &apos;content: &quot;f&quot; &quot;i&quot;&apos;.

I----G----- --            &lt;pseudo&gt; RenderInline (::before) renderer (0x13d027810) layout box (0x13d0251a0) node (0x13d027760) layout id-&gt;[3]
I---YG----- --              RenderText (::before) renderer (0x13d027920) layout box (0x13d025020) length-&gt;(1) &quot;f&quot; layout id-&gt;[n/a]
I---YG----- --              RenderText (::before) renderer (0x13d027a10) layout box (0x13d0250e0) length-&gt;(1) &quot;i&quot; layout id-&gt;[n/a]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072434</commentid>
    <comment_count>6</comment_count>
    <who name="Lea Verou">lea</who>
    <bug_when>2024-11-03 20:12:30 -0800</bug_when>
    <thetext>Apologies,I should have clarified. It was the first one that used to work (content: “f” “i”;) and now doesn’t!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072480</commentid>
    <comment_count>7</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2024-11-04 05:43:59 -0800</bug_when>
    <thetext>(In reply to Lea Verou from comment #6)
&gt; Apologies,I should have clarified. It was the first one that used to work
&gt; (content: “f” “i”;) and now doesn’t!
yeah, ok, makes sense. Thank you for the clarification!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072483</commentid>
    <comment_count>8</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2024-11-04 06:02:24 -0800</bug_when>
    <thetext>Looks like a regression from https://commits.webkit.org/272476@main</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072632</commentid>
    <comment_count>9</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2024-11-04 15:04:41 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/36151</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072633</commentid>
    <comment_count>10</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2024-11-04 15:11:46 -0800</bug_when>
    <thetext>(In reply to Antti Koivisto from comment #8)
&gt; Looks like a regression from https://commits.webkit.org/272476@main

My PR restores the old behavior regarding generating text runs without regressing serialization: https://github.com/WebKit/WebKit/pull/36151 , but I&apos;m not convinced we should land it given it doesn&apos;t fix the other cases Lea brought up, and just makes the code less readable.

Feel free to land if you feel strongly however.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072636</commentid>
    <comment_count>11</comment_count>
    <who name="Lea Verou">lea</who>
    <bug_when>2024-11-04 15:12:47 -0800</bug_when>
    <thetext>The other cases are not regressions though, so I&apos;d argue they are lower priority.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2073524</commentid>
    <comment_count>12</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2024-11-07 09:35:45 -0800</bug_when>
    <thetext>Sending to Alan since he has a better fix that would cover all the cases Lea reported.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>473106</attachid>
            <date>2024-11-01 10:04:18 -0700</date>
            <delta_ts>2024-11-01 10:04:18 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>ligatures.html</filename>
            <type>text/html</type>
            <size>212</size>
            <attacher name="alan">zalan</attacher>
            
              <data encoding="base64">PHN0eWxlPgpkaXYgewogIGZvbnQ6IDI1MDAlIHNlcmlmOwp9CgpzcGFuOjpiZWZvcmUgewogIGNv
bnRlbnQ6ICJmIiAiaSI7CiAgY29sb3I6IGRhcmtyZWQ7Cn0KCnNwYW46OmFmdGVyIHsKICBjb250
ZW50OiAiaSI7CiAgY29sb3I6IGRhcmtyZWQ7Cn0KPC9zdHlsZT4KUEFTUyBpZiBhbGwgcmVuZGVy
ZXMgdGhlIHNhbWUuCjxkaXY+ZmkgPHNwYW4+Zjwvc3Bhbj48L2Rpdj4=
</data>

          </attachment>
      

    </bug>

</bugzilla>