<?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>228228</bug_id>
          
          <creation_ts>2021-07-23 02:55:14 -0700</creation_ts>
          <short_desc>Inline element can trigger incorrect line break with word-break: break-all and white-space: pre-wrap</short_desc>
          <delta_ts>2025-08-28 03:29:05 -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 14</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 11</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian Henderson">ian</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>fantasai.bugs</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>1779020</commentid>
    <comment_count>0</comment_count>
      <attachid>434077</attachid>
    <who name="Ian Henderson">ian</who>
    <bug_when>2021-07-23 02:55:14 -0700</bug_when>
    <thetext>Created attachment 434077
test case

See attached test case.  In Blink and Gecko, all three white-space settings produce the same result.  In WebKit, the first setting (white-space: pre-wrap) produces a different layout when an inline element is added.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1779032</commentid>
    <comment_count>1</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2021-07-23 04:38:26 -0700</bug_when>
    <thetext>This only affects legacy layout; LFC works correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1779048</commentid>
    <comment_count>2</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2021-07-23 06:42:10 -0700</bug_when>
    <thetext>It looks like we drop the word-break property for the rest of the content when we see an inline box (unless it is explicitly set on the content again e.g. &lt;div style=&apos;white-space: pre-wrap&apos;&gt;&lt;b&gt;asdf&lt;/b&gt; &lt;span style=&quot;word-break: break-all&quot;&gt;alsdjfalk&lt;/span&gt;&lt;/div&gt;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1780729</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-07-30 02:56:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/81317182&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2139303</commentid>
    <comment_count>4</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-08-28 03:29:05 -0700</bug_when>
    <thetext>We&apos;re now using LFC for almost all text content, so it seems this issue is fixed? Please verify or reopen as necessary. :)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>434077</attachid>
            <date>2021-07-23 02:55:14 -0700</date>
            <delta_ts>2021-07-23 02:55:14 -0700</delta_ts>
            <desc>test case</desc>
            <filename>break-all.html</filename>
            <type>text/html</type>
            <size>571</size>
            <attacher name="Ian Henderson">ian</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+CjxtZXRhIGNoYXJzZXQ9J3V0Zi04Jz4KPHN0eWxlPgpkaXYgewogICAg
d2lkdGg6IDYwcHg7CiAgICB3b3JkLWJyZWFrOiBicmVhay1hbGw7CiAgICBmb250LWZhbWlseTog
bW9ub3NwYWNlOwogICAgbWFyZ2luOiAxMHB4Owp9Cjwvc3R5bGU+CndoaXRlLXNwYWNlOiBwcmUt
d3JhcAo8ZGl2IHN0eWxlPSd3aGl0ZS1zcGFjZTogcHJlLXdyYXAnPjxiPmFzZGY8L2I+IGFsc2Rq
ZmFsazwvZGl2Pgo8ZGl2IHN0eWxlPSd3aGl0ZS1zcGFjZTogcHJlLXdyYXAnPmFzZGYgYWxzZGpm
YWxrPC9kaXY+CndoaXRlLXNwYWNlOiBub3JtYWwKPGRpdiBzdHlsZT0nd2hpdGUtc3BhY2U6IG5v
cm1hbCc+PGI+YXNkZjwvYj4gYWxzZGpmYWxrPC9kaXY+CjxkaXYgc3R5bGU9J3doaXRlLXNwYWNl
OiBub3JtYWwnPmFzZGYgYWxzZGpmYWxrPC9kaXY+CndoaXRlLXNwYWNlOiBwcmUtbGluZQo8ZGl2
IHN0eWxlPSd3aGl0ZS1zcGFjZTogcHJlLWxpbmUnPjxiPmFzZGY8L2I+IGFsc2RqZmFsazwvZGl2
Pgo8ZGl2IHN0eWxlPSd3aGl0ZS1zcGFjZTogcHJlLWxpbmUnPmFzZGYgYWxzZGpmYWxrPC9kaXY+
Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>