<?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>198543</bug_id>
          
          <creation_ts>2019-06-04 14:16:01 -0700</creation_ts>
          <short_desc>[css-text] line-break: anywhere takes chars of zero-width related classes as forced breaks</short_desc>
          <delta_ts>2025-12-11 23:10:12 -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>Text</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=196169</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Javier Fernandez">jfernandez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>jfernandez</cc>
    
    <cc>karlcow</cc>
    
    <cc>mmaxfield</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1541732</commentid>
    <comment_count>0</comment_count>
      <attachid>371331</attachid>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2019-06-04 14:16:01 -0700</bug_when>
    <thetext>Created attachment 371331
Test case to reproduce the issue

What steps will reproduce the problem?
(1) Load the attached test case

What is the expected result?

No char is sick out from the green box; all the zero-width chars are ignored and should not affect the height of the line (expected.png)

What happens instead?

The 3 zero-width class chars are used as forced break points, affecting the height of the line, which sicks out below the green box (actual.png)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1541735</commentid>
    <comment_count>1</comment_count>
      <attachid>371333</attachid>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2019-06-04 14:23:48 -0700</bug_when>
    <thetext>Created attachment 371333
Actual result</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1541736</commentid>
    <comment_count>2</comment_count>
      <attachid>371334</attachid>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2019-06-04 14:24:07 -0700</bug_when>
    <thetext>Created attachment 371334
Expected result</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1541737</commentid>
    <comment_count>3</comment_count>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2019-06-04 14:24:56 -0700</bug_when>
    <thetext>This issue is only reproducible in Mac and iOs platforms, so that means that the bug is in the SimpleLineLayout codepath.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1542335</commentid>
    <comment_count>4</comment_count>
      <attachid>371482</attachid>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2019-06-06 02:43:42 -0700</bug_when>
    <thetext>Created attachment 371482
Test case to reproduce the issue</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1542336</commentid>
    <comment_count>5</comment_count>
      <attachid>371483</attachid>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2019-06-06 02:44:07 -0700</bug_when>
    <thetext>Created attachment 371483
Actual result</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1542354</commentid>
    <comment_count>6</comment_count>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2019-06-06 04:59:39 -0700</bug_when>
    <thetext>After debugging the test case, I&apos;ve got new information regarding this issue. 

First of all, this is not affecting the SimpleLineLayout codepath at all, which is not executed if the value of the line-break property is different than &apos;auto&apos;. Hence, the bug is affecting the BreakingContext path.

Additionally, since other ports also use the BreakingContext path, why this bug is not reproducible in WebKitGtk+ ? The reason seems to be that the root cause of this issue is the #196169 bug (maybe duplicated ?)

Debugging the attached test case, I&apos;ve got the following data:

* Mac platform
  - availableWidth (1ch) =  7.796875
  - charWidth = 7.80126953

* Gtk platform
  - availableWidth (1ch) =  8
  - charWidth = 8

The consequence of having a charWidth bigger than the availableWidth is that the line breaking logic may have to break just after the char, even that theoretically the single char should fit. 

Hence, the problem is not related to the line-break: anywhere feature, but more with how WebKit deals with the monospace font and the &apos;ch&apos; sizing unit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2165334</commentid>
    <comment_count>7</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2025-12-11 23:10:12 -0800</bug_when>
    <thetext>I am not able to reproduce this on Safari 26.1.

Marking this as `Configuration Changed`, please reopen if it is still reproducing. Thanks1</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>371331</attachid>
            <date>2019-06-04 14:16:01 -0700</date>
            <delta_ts>2019-06-06 02:43:42 -0700</delta_ts>
            <desc>Test case to reproduce the issue</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>372</size>
            <attacher name="Javier Fernandez">jfernandez</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ZW4+CjxtZXRhIGNoYXJzZXQ9InV0Zi04Ij4KPHN0
eWxlPgojZ3JlZW4gewogIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICBiYWNrZ3JvdW5kOiBncmVlbjsK
ICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIHdpZHRoOiAxY2g7CiAgaGVpZ2h0OiAxMGVtOwp9
CiN0ZXN0IHsKICBsaW5lLWhlaWdodDogMTsKICBjb2xvcjogcmVkOwogIGZvbnQtZmFtaWx5OiBt
b25vc3BhY2U7CiAgd2lkdGg6IDFjaDsKCiAgbGluZS1icmVhazogYW55d2hlcmU7Cn0KPC9zdHls
ZT4KPGRpdiBpZD1ncmVlbj48L2Rpdj4KPGRpdiBpZD10ZXN0PmEmbmJzcDthJiN4ZmVmZjthJiN4
MjA2MDthJiN4MjAwZDthOyYjMjAwYjs8L2Rpdj4K
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>371333</attachid>
            <date>2019-06-04 14:23:48 -0700</date>
            <delta_ts>2019-06-06 02:44:07 -0700</delta_ts>
            <desc>Actual result</desc>
            <filename>actual.png</filename>
            <type>image/png</type>
            <size>893</size>
            <attacher name="Javier Fernandez">jfernandez</attacher>
            
              <data encoding="base64">iVBORw0KGgoAAAANSUhEUgAAABgAAACiCAYAAABbJg3rAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
WXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH4wYEFRcdIE4orwAAABl0RVh0Q29tbWVudABDcmVhdGVk
IHdpdGggR0lNUFeBDhcAAALlSURBVGje7dtbiE1RHMfx79p7n7NHTAaNHMYtJNdcikQ8uCfURMiD
y4M8UF48KG+U4lHK7U0pUeJBiESYqCHM5DJmjENoZhzjMnNue6+/h1PzJDPM3iH/9bp2+9N//9f+
7fWwNjPnzJU4h0PM498HvO4u2HFuM+++vP3h3K4Fe5g/ZmHvgGct9TRnGn8415799B/0QAEFFFBA
AQUUUEABBRRQQAEFFFBAAQUUUEABBRRQQAEFFFBAAQUUUEABBRRQQAEFFFBAAQX+KEBPDnYH125L
bstuCZ++FJvLi1gb7cFuMzyFKS+nsGs/wdlLSDbX4wK6PbVs0++QzGfcdStw2jJIY5rw5n3c6RMx
QyojAGrrCI6cQjqzOGNGgLXIlVvIhlUkNlX3vsnO7GmYkcOgX1+8zWtwF83DVKWQ1o/RPCJn6GDM
8BQ8b8I2NCNNadzqpZiBFREv044stimNffEKZ8p4nBmToqmgayWNG0Vi5yZsQzO2tg78JN7yBRFU
UAzgWyeEIcZP4oyqwtY8wNa/iKaCwsFjBKcvIEFI5+RlpWr6+CT27ozuTdZfNH7+Jje+Jrh8C2n5
GBPQ8JrivsOED+vjAdxZUyGbh/avvwV0u0zNwAooSxLeqCE4fxXyebxVi0px0b88uiYHpy/ijK7C
mTCWwqHjFE+eQQrF6KLC27qW5IHdSEcW/CS2tg5531JK2l4BImAFsjmkNYMUCkhHFpNIgGMi+OA8
foa0ZQiv3aHo+4i12KcvSWxcjakc1HtAPrTiVS/DpCqR9y0QWhLb1uMunocp8yPMImvFBkFpV/EL
o8dNxhiM64Lr6tbxDwFSDJC2T8i3jngA+6CO/Pa9BCfOIPlCdGHXBTSlsU+eYwb0h84c+MloAW/J
fEyZjxk5DFNRHkMPbEh4vQZ7/zEShDH04N6j0vYl0w6OEwNw/S6mKoW3YSXGjQN49QZvzfJu8/+3
m1x2/mhXJsUC/OqNNez+HuA7/5dnUHePTQQAAAAASUVORK5CYII=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>371334</attachid>
            <date>2019-06-04 14:24:07 -0700</date>
            <delta_ts>2019-06-04 14:24:07 -0700</delta_ts>
            <desc>Expected result</desc>
            <filename>expected.png</filename>
            <type>image/png</type>
            <size>228</size>
            <attacher name="Javier Fernandez">jfernandez</attacher>
            
              <data encoding="base64">iVBORw0KGgoAAAANSUhEUgAAAA0AAACQCAYAAADTE+HhAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
WXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH4wYEFRUT9cBnKgAAABl0RVh0Q29tbWVudABDcmVhdGVk
IHdpdGggR0lNUFeBDhcAAABMSURBVFjD7dkhDsAwDAPAZuq/q77cQ6OVOrROZxTgI6GuJGmbudqL
/BH156hZy2JGfA+CIAiCIAiCIAiCIAiCIAiCIAj6Dio74RHoBr4tDBmRjYYPAAAAAElFTkSuQmCC
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>371482</attachid>
            <date>2019-06-06 02:43:42 -0700</date>
            <delta_ts>2019-06-06 02:43:42 -0700</delta_ts>
            <desc>Test case to reproduce the issue</desc>
            <filename>line-break-anywhere-issue.html</filename>
            <type>text/html</type>
            <size>371</size>
            <attacher name="Javier Fernandez">jfernandez</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ZW4+CjxtZXRhIGNoYXJzZXQ9InV0Zi04Ij4KPHN0
eWxlPgojZ3JlZW4gewogIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICBiYWNrZ3JvdW5kOiBncmVlbjsK
ICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIHdpZHRoOiAxY2g7CiAgaGVpZ2h0OiA4ZW07Cn0K
I3Rlc3QgewogIGxpbmUtaGVpZ2h0OiAxOwogIGNvbG9yOiByZWQ7CiAgZm9udC1mYW1pbHk6IG1v
bm9zcGFjZTsKICB3aWR0aDogMWNoOwoKICBsaW5lLWJyZWFrOiBhbnl3aGVyZTsKfQo8L3N0eWxl
Pgo8ZGl2IGlkPWdyZWVuPjwvZGl2Pgo8ZGl2IGlkPXRlc3Q+YSZuYnNwO2EmI3hmZWZmO2EmI3gy
MDYwO2EmI3gyMDBkO2EmI3gyMDBiOzwvZGl2Pgo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>371483</attachid>
            <date>2019-06-06 02:44:07 -0700</date>
            <delta_ts>2019-06-06 02:44:07 -0700</delta_ts>
            <desc>Actual result</desc>
            <filename>actual.png</filename>
            <type>image/png</type>
            <size>510</size>
            <attacher name="Javier Fernandez">jfernandez</attacher>
            
              <data encoding="base64">iVBORw0KGgoAAAANSUhEUgAAABcAAAB1CAYAAAClFnrxAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
WXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH4wYGCSsCYYDOOgAAABl0RVh0Q29tbWVudABDcmVhdGVk
IHdpdGggR0lNUFeBDhcAAAFmSURBVGje7dqxLwNhGAbw58612ok0FQmRCB3FwCQSKkjEYJOIqYvN
0MFiM/AHiD/BwGAQBolEUumEgYVYJIaSpuRa9NSdu3sNEpaLcr0OledNbnq/++XL891704fBoWGp
V6moYzUurlVbsLiTwv1zzrOXHl3GSO+4f/y6cIlb/cazV6oU/2nmxIkTJ06cOHHixIkTJ06cOHHi
xIkTJ06cOHHixIkTJ06cOHHinlX1rsVYYhKFcr9nr7Ol6+eXeTPHV+ZfJfL5AICqBrdzJ3OCSnIe
rz1JVKZSsA+OA4xFBNrsNJq319E00Ad7cxfyoAcQiyuQRx3u6QXsrT1I8QlqRzvkLg+lLVbbzqVs
wEqvQkl0I7yxAm1hDohGANf9PgPfuGVBibdC9BKc/SM4h1lILg/n/AryYtQWixqPIbS2BCd7BryZ
0GYmIGUDSjQCvNvBTKhrWuKa5p8m9NffuRIO8X9OvFHxD7uXbgGqtENyAAAAAElFTkSuQmCC
</data>

          </attachment>
      

    </bug>

</bugzilla>