<?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>332074</bug_id>
          
          <creation_ts>2026-11-17 19:52:34 -0800</creation_ts>
          <short_desc>text-wrap-style: pretty shortens every line of Japanese text and adds lines, even when auto already fills every line</short_desc>
          <delta_ts>2026-11-21 02:39:24 -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>Safari 27</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 27</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=288650</see_also>
          <bug_file_loc>https://tak-dcxi.github.io/css-browser-bugs/bugs/text-wrap-pretty-cjk-balances/repro.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>332332</dependson>
    
    <dependson>332333</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Takahiro Arai">tak.a.dcxi</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>yulun_wu</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2281746</commentid>
    <comment_count>0</comment_count>
    <who name="Takahiro Arai">tak.a.dcxi</who>
    <bug_when>2026-11-17 19:52:34 -0800</bug_when>
    <thetext>Steps to reproduce

1. Open the attached testcase (also available at https://tak-dcxi.github.io/css-browser-bugs/bugs/text-wrap-pretty-cjk-balances/repro.html).
2. Each case shows the same Japanese paragraph (lang=&quot;ja&quot;) three times: text-wrap-style: pretty, auto, and balance. The box has a dashed outline. A script prints the number of characters on each line under each box.
3. Compare the &quot;Test (pretty)&quot; box with the &quot;Reference (auto)&quot; and &quot;balance&quot; boxes in each case.

Actual results

Case 1 (inline-size: 16em): with auto, every line is full, including the last one (8 lines of 17 characters). With pretty, every line is shorter and there is one more line (9 lines of 15 or 16 characters), leaving space at the end of every line.

Case 2 (inline-size: 28em): with auto, the lines are 30, 30, 30, 30 and 16 characters. With pretty, they are 27, 27, 27, 27 and 28 characters, exactly the same as balance.

The same happens without lang=&quot;ja&quot;. I also compared widths from 10em to 30em: pretty makes every line of the Japanese paragraph shorter than auto at every width. At 10em it turns 14 lines into 17 lines, more than balance (14 lines). English text shows the same tendency (at many widths pretty breaks exactly like balance, and at 10em 12 lines become 15), but it is much more visible in Japanese, where auto already fills every line to the end edge.

Expected results

The &quot;Test (pretty)&quot; box should look like the &quot;Reference (auto)&quot; box, apart from a few characters moved to the last line to avoid a short last line.

Japanese text can break between almost any two characters, so auto already gives lines of equal length. Japanese typography sets lines to the full line length (see Requirements for Japanese Text Layout, https://www.w3.org/TR/jlreq/). Shortening every line and adding lines makes the layout worse, not better.

Specification

CSS Text Module Level 4, 5.4 Selecting How to Wrap: the text-wrap-style property:
https://drafts.csswg.org/css-text-4/#text-wrap-style

pretty asks the UA to bias for better layout over speed. It may avoid short last lines and may improve the layout in other ways, such as reducing variation in line length. The details are up to the UA, so pretty breaking like balance is not forbidden by itself. In Japanese text, however, auto already has no variation in line length except on the last line, so making the lines shorter does not improve the layout.

This looks related to bug 288650 (&quot;[text-wrap-style:pretty] Bias ideal line width to be closer to max bounds&quot;), whose draft PR (https://github.com/WebKit/WebKit/pull/41458) moves the ideal line width of pretty closer to the available width. I am filing this separately because 288650 has no description and does not mention CJK text or the increase in the number of lines.

Environment

- Safari 27.2 (22625.2.8.11.9), macOS 27.2.1
- Safari Technology Preview 27.0 (22627.1.6.3), macOS 27.2.1

No settings changed.

Other browsers

- Chrome 157.0.8103.80 and Chrome Canary 160.0.8168.0: pretty breaks the same way as auto in both cases. (Glyphs are narrower in these browsers, so 16em fits 16 characters per line, not 17.)
- Firefox 160.0.1 and Firefox Nightly 162.0a1: text-wrap-style: pretty is not supported (https://bugzilla.mozilla.org/show_bug.cgi?id=1960910).

Web Platform Tests

There are no tests for where pretty breaks lines. The existing tests check only parsing and crashes:

- css/css-text/parsing/text-wrap-pretty.html (Chrome 14/14, Firefox 2/14, Safari Technology Preview 14/14)
- css/css-text/text-wrap-style/crashtests/text-wrap-style-pretty-block-in-inline-crash.html

Results from wpt.fyi on 2026-11-18 (master runs of 2026-11-16).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2281753</commentid>
    <comment_count>1</comment_count>
      <attachid>482413</attachid>
    <who name="Takahiro Arai">tak.a.dcxi</who>
    <bug_when>2026-11-17 20:16:58 -0800</bug_when>
    <thetext>Created attachment 482413
Testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2281755</commentid>
    <comment_count>2</comment_count>
    <who name="Takahiro Arai">tak.a.dcxi</who>
    <bug_when>2026-11-17 20:20:21 -0800</bug_when>
    <thetext>Two corrections to the description.

1. In &quot;Actual results&quot; I wrote that `pretty` makes every line of the Japanese paragraph shorter than `auto` at every width. That is not accurate for the last line. In case 2 of the testcase (inline-size: 28em), the last line gets longer: `auto` gives lines of 30, 30, 30, 30 and 16 characters, and `pretty` gives 27, 27, 27, 27 and 28. What `pretty` shortens is every line except the last one. Case 1 (16em) is different only because `auto` already fills the last line there, so the last line gets shorter too.

2. In &quot;Specification&quot; I paraphrased `pretty` as &quot;may improve the layout in other ways&quot;. The spec is stronger than that: besides possibly avoiding short last lines, the UA &quot;should also improve the layout in additional ways&quot;, and `pretty` is otherwise equivalent to `auto`. Shortening every full line of Japanese text and adding lines does not improve the layout in this sense.

https://drafts.csswg.org/css-text-4/#text-wrap-style</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2282312</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-11-18 13:04:34 -0800</bug_when>
    <thetext>&lt;rdar://problem/193148797&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2282726</commentid>
    <comment_count>4</comment_count>
    <who name="Yulun Wu">yulun_wu</who>
    <bug_when>2026-11-18 22:04:52 -0800</bug_when>
    <thetext>Takahiro, thank you for the detailed report and test cases!

The issues you are seeing can be traced to two separate problems with how pretty scores line breaks.

1. The current text-wrap-style: pretty uses the original Knuth-Plass heuristic that measures deviation from a target line length in the positive and negative direction. The current target is smaller than the available width and scoring penalizes deviation in either direction. The impact of this for CJK is especially noticeable as every line is able to reliably hit the smaller target width, shortening all the lines and adding new ones. We should instead target available width and only penalizing lines that fall short.

This is tracked in https://bugs.webkit.org/show_bug.cgi?id=332333

2. text-wrap-style: pretty scores the raggedness of the last line just like any other line, allowing it to take large amounts of content from multiple lines above it. This can cause pretty to decide on the same set of breaking points as balance. The simplest fix here would be to only penalize orphans and otherwise leave the last line un-scored.

This is tracked in https://bugs.webkit.org/show_bug.cgi?id=332332

I&apos;ll keep this bug open until both have landed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2284030</commentid>
    <comment_count>5</comment_count>
    <who name="Takahiro Arai">tak.a.dcxi</who>
    <bug_when>2026-11-21 02:39:24 -0800</bug_when>
    <thetext>Thank you for looking into this so quickly, and for the clear explanation of the two causes. Splitting them into bug 332333 (target width and penalizing only short lines) and bug 332332 (scoring the last line only when it is an orphan) makes sense to me, since they match the two cases in the test case.

I&apos;m happy to test the fixes against the test case once they land in Safari Technology Preview.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>482413</attachid>
            <date>2026-11-17 20:16:58 -0800</date>
            <delta_ts>2026-11-17 20:16:58 -0800</delta_ts>
            <desc>Testcase</desc>
            <filename>repro.html</filename>
            <type>text/html</type>
            <size>6485</size>
            <attacher name="Takahiro Arai">tak.a.dcxi</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CjxtZXRhIGNoYXJzZXQ9InV0
Zi04Ij4KPG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwg
aW5pdGlhbC1zY2FsZT0xIj4KPHRpdGxlPnRleHQtd3JhcC1zdHlsZTogcHJldHR5IG9uIEphcGFu
ZXNlIHRleHQ8L3RpdGxlPgo8IS0tCiAgVGVzdGNhc2UgZm9yIHRleHQtd3JhcC1wcmV0dHktY2pr
LWJhbGFuY2VzLiBSZWxlYXNlZCB1bmRlciBDQzAgMS4wLgogIFNlbGYtY29udGFpbmVkOiBubyBl
eHRlcm5hbCByZXNvdXJjZXMuCgogIEphcGFuZXNlIHRleHQgY2FuIGJyZWFrIGJldHdlZW4gYWxt
b3N0IGFueSB0d28gY2hhcmFjdGVycywgc28gd2l0aAogIHRleHQtd3JhcC1zdHlsZTogYXV0byBl
dmVyeSBsaW5lIGV4Y2VwdCB0aGUgbGFzdCBvbmUgZmlsbHMgdGhlIGJveC4KICBUaGUgYm94IGhh
cyBhIGRhc2hlZCBib3JkZXIgc28gdGhhdCB0aGUgc3BhY2UgbGVmdCBhdCB0aGUgZW5kIG9mIGVh
Y2gKICBsaW5lIGlzIHZpc2libGUuCgogIENhc2UgMTogd2l0aCBhdXRvLCB0aGUgbGFzdCBsaW5l
IGlzIGFsc28gZnVsbCwgc28gdGhlcmUgaXMgbm8gc2hvcnQKICBsYXN0IGxpbmUgdG8gYXZvaWQu
IHByZXR0eSBpcyBleHBlY3RlZCB0byBsb29rIGxpa2UgYXV0by4gVGhlIGJ1ZzogcHJldHR5CiAg
bGVhdmVzIHNwYWNlIGF0IHRoZSBlbmQgb2YgZXZ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IHooYzjga7ntYLjgo/jgorjgavmnaXj
govjgajmrKHjga7ooYzjgavpgIHjgonjgozjgb7jgZnjgILlkozmlofjga/jgbvjgajjgpPjganj
ga7mloflrZfjga7plpPjgafmlLnooYzjgafjgY3jgovjga7jgafjgIHooYzjga7mnKvlsL7jga/j
gbXjgaTjgYbnrrHjga7lj7Pnq6/jgavmj4PjgYTjgb7jgZnjgILlj6Xoqq3ngrnjgoTmi6zlvKfj
gavjga/ooYzpoK3jgoTooYzmnKvjgavnva7jgZHjgarjgYTmsbrjgb7jgorjgYzjgYLjgorjgIHj
g5bjg6njgqbjgrbjga/jgZ3jga7msbrjgb7jgorjgavlvpPjgaPjgabmlLnooYzjga7kvY3nva7j
gpLoqr/mlbTjgZfjgb7jgZnjgII8L3A+CiAgICA8L2Rpdj4KICAgIDxkaXY+CiAgICAgIDxwIGNs
YXNzPSJsYWJlbCI+UmVmZXJlbmNlIChhdXRvKTwvcD4KICAgICAgPHAgY2xhc3M9ImJveCBhdXRv
IiBsYW5nPSJqYSI+44Km44Kn44OW44Oa44O844K444Gu5pys5paH44Gn44Gv44CB5q616JC944Gu
5bmF44Gr5ZCI44KP44Gb44Gm5paH5a2X44GM5Lim44Gz44CB6KGM44Gu57WC44KP44KK44Gr5p2l
44KL44Go5qyh44Gu6KGM44Gr6YCB44KJ44KM44G+44GZ44CC5ZKM5paH44Gv44G744Go44KT44Gp
44Gu5paH5a2X44Gu6ZaT44Gn5pS56KGM44Gn44GN44KL44Gu44Gn44CB6KGM44Gu5pyr5bC+44Gv
44G144Gk44GG566x44Gu5Y+z56uv44Gr5o+D44GE44G+44GZ44CC5Y+l6Kqt54K544KE5ous5byn
44Gr44Gv6KGM6aCt44KE6KGM5pyr44Gr572u44GR44Gq44GE5rG644G+44KK44GM44GC44KK44CB
44OW44Op44Km44K244Gv44Gd44Gu5rG644G+44KK44Gr5b6T44Gj44Gm5pS56KGM44Gu5L2N572u
44KS6Kq/5pW044GX44G+44GZ44CCPC9wPgogICAgP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OAgeihjOOBrue1guOCj+OCiuOBq+adpeOCi+OBqOasoeOBruihjOOBq+mAgeOCieOC
jOOBvuOBmeOAguWSjOaWh+OBr+OBu+OBqOOCk+OBqeOBruaWh+Wtl+OBrumWk+OBp+aUueihjOOB
p+OBjeOCi+OBruOBp+OAgeihjOOBruacq+WwvuOBr+OBteOBpOOBhueuseOBruWPs+err+OBq+aP
g+OBhOOBvuOBmeOAguWPpeiqreeCueOChOaLrOW8p+OBq+OBr+ihjOmgreOChOihjOacq+OBq+e9
ruOBkeOBquOBhOaxuuOBvuOCiuOBjOOBguOCiuOAgeODluODqeOCpuOCtuOBr+OBneOBruaxuuOB
vuOCiuOBq+W+k+OBo+OBpuaUueihjOOBruS9jee9ruOCkuiqv+aVtOOBl+OBvuOBmeOAgjwvcD4K
ICAgIDwvZGl2PgogICAgPGRpdj4KICAgICAgPHAgY2xhc3M9ImxhYmVsIj5SZWZlcmVuY2UgKGF1
dG8pPC9wPgogICAgICA8cCBjbGFzcz0iYm94IGF1dG8iIGxhbmc9ImphIj7jgqbjgqfjg5bjg5rj
g7zjgrjjga7mnKzmlofjgafjga/jgIHmrrXokL3jga7luYXjgavlkIjjgo/jgZvjgabmloflrZfj
gYzkuKbjgbPjgIHooYzjga7ntYLjgo/jgorjgavmnaXjgovjgajmrKHjga7ooYzjgavpgIHjgonj
gozjgb7jgZnjgILlkozmlofjga/jgbvjgajjgpPjganjga7mloflrZfjga7plpPjgafmlLnooYzj
gafjgY3jgovjga7jgafjgIHooYzjga7mnKvlsL7jga/jgbXjgaTjgYbnrrHjga7lj7Pnq6/jgavm
j4PjgYTjgb7jgZnjgILlj6Xoqq3ngrnjgoTmi6zlvKfjgavjga/ooYzpoK3jgoTooYzmnKvjgavn
va7jgZHjgarjgYTmsbrjgb7jgorjgYzjgYLjgorjgIHjg5bjg6njgqbjgrbjga/jgZ3jga7msbrj
gb7jgorjgavlvpPjgaPjgabmlLnooYzjga7kvY3nva7jgpLoqr/mlbTjgZfjgb7jgZ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1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>