mirror of
https://github.com/servo/servo.git
synced 2025-07-19 13:23:46 +01:00
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> |
||
---|---|---|
.. | ||
display_list | ||
flexbox | ||
flow | ||
fragment_tree | ||
stylesheets | ||
table | ||
taffy | ||
tests | ||
Cargo.toml | ||
cell.rs | ||
construct_modern.rs | ||
context.rs | ||
dom.rs | ||
dom_traversal.rs | ||
formatting_contexts.rs | ||
geom.rs | ||
layout_box_base.rs | ||
layout_impl.rs | ||
lib.rs | ||
lists.rs | ||
positioned.rs | ||
query.rs | ||
quotes.rs | ||
replaced.rs | ||
sizing.rs | ||
style_ext.rs | ||
traversal.rs |