mirror of
https://github.com/servo/servo.git
synced 2025-10-01 00:59:15 +01:00
Allow breaking line after space with white-space: break-spaces
(#33376)
`white-space: break-spaces` should allow a soft wrap opportunity *after* every preserved white space. Then, to avoid breaking before the first white space, `TextRunSegment::shape_text()` has some logic to separate it from the following spaces and put it with the preceding text instead. The problem was that, when combined with `word-break: keep-all`, we were then only checking whether there were more white spaces afterwards, ignoring the soft wrap opportunity after the first one. Also removing a duplicated `can_break_anywhere` variable. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
6d6cd0f2dc
commit
9d3d009895
3 changed files with 40 additions and 4 deletions
13
tests/wpt/meta/MANIFEST.json
vendored
13
tests/wpt/meta/MANIFEST.json
vendored
|
@ -254546,6 +254546,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"break-spaces-with-word-break-001.html": [
|
||||
"ee31fd627130eeb40fd22d0b9bc4fa6e9eb3aca7",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square.xht",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"control-chars-000.html": [
|
||||
"b038fe9a90d3b8b9cb3bde7fd46396c7121688c9",
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue