mirror of
https://github.com/servo/servo.git
synced 2025-08-28 08:38:20 +01:00
layout: Fix bug where whitespace didn't have line decorations (#38007)
This PR fixes the issue where underlines weren't appearing on whitespaces. This was due to whitespace being ignored in the `glyphs` function of `components/layout/display_list/mod.rs` when the fragment didn't have a selection. I added in a check to include the whitespace if there's a selection or if there are any line decorations. I also renamed the field from `ignore_whitespace` to `include_whitespace` to make it a bit clearer since it was being reversed everywhere it was used anyway. **Before:** <img width="1235" height="169" alt="image" src="https://github.com/user-attachments/assets/51d47781-355f-4915-8100-f3a7db81027f" /> **After:** <img width="1235" height="169" alt="image" src="https://github.com/user-attachments/assets/9b44fe77-d600-4080-9f3a-2c9b33924f51" /> Testing: `/css/css-text/white-space/pre-wrap-018.html` is now passing. Also verified manually by running `data:text/html;base64,PGRpdiBzdHlsZT0idGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmU7Ij5IZWxsbyBXb3JsZCE8L2Rpdj4= ` Fixes: https://github.com/servo/servo/issues/33463 --------- Signed-off-by: Leo Ring <leoring03@gmail.com> Signed-off-by: leo030303 <59373587+leo030303@users.noreply.github.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
35a145613e
commit
93e5b672a7
3 changed files with 7 additions and 5 deletions
2
tests/wpt/meta/css/css-text-decor/text-decoration-skip-spaces-003.html.ini
vendored
Normal file
2
tests/wpt/meta/css/css-text-decor/text-decoration-skip-spaces-003.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[text-decoration-skip-spaces-003.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[pre-wrap-018.html]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue