servo/tests/wpt/meta/css/css-text/white-space
leo030303 93e5b672a7
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>
2025-07-13 13:34:51 +00:00
..
break-spaces-006.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-008.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-009.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-before-first-char-002.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-before-first-char-003.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-before-first-char-004.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-before-first-char-005.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-before-first-char-006.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-before-first-char-007.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-before-first-char-014.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-before-first-char-015.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-before-first-ideographic-char-004.html.ini
break-spaces-before-first-ideographic-char-005.html.ini
break-spaces-before-first-ideographic-char-006.html.ini
break-spaces-before-first-ideographic-char-007.html.ini
break-spaces-before-first-ideographic-char-008.html.ini
break-spaces-before-first-ideographic-char-009.html.ini
break-spaces-before-first-ideographic-char-010.html.ini
break-spaces-before-first-ideographic-char-011.html.ini
break-spaces-before-first-ideographic-char-012.html.ini
break-spaces-before-first-ideographic-char-013.html.ini
break-spaces-before-first-ideographic-char-015.html.ini
break-spaces-before-first-ideographic-char-016.html.ini
break-spaces-before-first-ideographic-char-017.html.ini
break-spaces-before-first-ideographic-char-018.html.ini
break-spaces-tab-001.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-tab-002.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-tab-005.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-tab-006.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-with-ideographic-space-001.html.ini
break-spaces-with-ideographic-space-005.html.ini
break-spaces-with-ideographic-space-006.html.ini
break-spaces-with-ideographic-space-008.html.ini
break-spaces-with-ideographic-space-009.html.ini
break-spaces-with-ideographic-space-010.html.ini
break-spaces-with-overflow-wrap-001.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
break-spaces-with-overflow-wrap-002.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
control-chars-00C.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
eol-spaces-bidi-002.html.ini layout: Add initial support for bidirectional text (BiDi) (#33148) 2024-08-21 14:28:54 +00:00
eol-spaces-bidi-003.html.ini
eol-spaces-bidi-004.html.ini Sync WPT with upstream (11-02-2024) (#31309) 2024-02-11 08:01:56 +00:00
full-width-leading-spaces-004.html.ini
hanging-whitespace-002.tentative.html.ini Update web-platform-tests to revision b'16f18d8135a80e89f2e910ca7548999fa2f7937e' (#31951) 2024-03-31 05:15:08 +00:00
hanging-whitespace-003.tentative.html.ini Update web-platform-tests to revision b'16f18d8135a80e89f2e910ca7548999fa2f7937e' (#31951) 2024-03-31 05:15:08 +00:00
object-replacement-1.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
object-replacement-2.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
pre-float-001.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
pre-wrap-012.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
pre-wrap-013.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
pre-wrap-014.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
pre-wrap-019.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
pre-wrap-align-center-001.html.ini
pre-wrap-align-center-002.html.ini
pre-wrap-align-center-003.html.ini
pre-wrap-align-end-001.html.ini
pre-wrap-align-end-002.html.ini
pre-wrap-align-end-003.html.ini
pre-wrap-align-left-002.html.ini
pre-wrap-align-left-003.html.ini
pre-wrap-align-right-001.html.ini
pre-wrap-align-right-002.html.ini
pre-wrap-align-right-003.html.ini
pre-wrap-align-start-002.html.ini
pre-wrap-align-start-003.html.ini
pre-wrap-tab-004.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
pre-wrap-tab-006.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
seg-break-transformation-001.tentative.html.ini
seg-break-transformation-002.tentative.html.ini
seg-break-transformation-003.tentative.html.ini
seg-break-transformation-004.tentative.html.ini Update web-platform-tests to revision b'f630424a79c1ae17deaaf27a21efdbca1378af0e' (#35258) 2025-02-02 01:40:50 +00:00
seg-break-transformation-008.tentative.html.ini
seg-break-transformation-009.tentative.html.ini
seg-break-transformation-016.tentative.html.ini
seg-break-transformation-017.tentative.html.ini
seg-break-transformation-018.tentative.html.ini
seg-break-transformation-019.tentative.html.ini
tab-bidi-001.html.ini layout: Add initial support for bidirectional text (BiDi) (#33148) 2024-08-21 14:28:54 +00:00
tab-stop-threshold-001.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
tab-stop-threshold-002.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
tab-stop-threshold-003.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
tab-stop-threshold-004.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
tab-stop-threshold-005.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
tab-stop-threshold-006.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
text-wrap-balance-002.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
text-wrap-balance-003.html.ini Update web-platform-tests to revision b'd9a5cc25fc5f520bde022cee67e9e6a6f0b588f9' (#31599) 2024-03-10 05:11:24 +00:00
text-wrap-balance-004.html.ini Update web-platform-tests to revision b'16f18d8135a80e89f2e910ca7548999fa2f7937e' (#31951) 2024-03-31 05:15:08 +00:00
text-wrap-balance-005.html.ini Update web-platform-tests to revision b'17375f41ccf41e081764d2786ec535dede108c47' (#32426) 2024-06-02 03:56:27 +00:00
text-wrap-balance-float-001.html.ini Sync WPT with upstream (04-10-2023) (#30493) 2023-10-06 00:51:48 +00:00
text-wrap-balance-float-002.html.ini Sync WPT with upstream (04-10-2023) (#30493) 2023-10-06 00:51:48 +00:00
text-wrap-balance-float-003.html.ini Sync WPT with upstream (04-10-2023) (#30493) 2023-10-06 00:51:48 +00:00
text-wrap-balance-float-004.html.ini Sync WPT with upstream (04-10-2023) (#30493) 2023-10-06 00:51:48 +00:00
text-wrap-balance-float-005.html.ini Sync WPT with upstream (04-10-2023) (#30493) 2023-10-06 00:51:48 +00:00
text-wrap-balance-line-clamp-002.html.ini Sync WPT with upstream (29-06-2025) (#37774) 2025-06-29 01:47:33 +00:00
text-wrap-balance-line-clamp-003.html.ini Sync WPT with upstream (29-06-2025) (#37774) 2025-06-29 01:47:33 +00:00
text-wrap-balance-line-clamp-004.html.ini Sync WPT with upstream (29-06-2025) (#37774) 2025-06-29 01:47:33 +00:00
text-wrap-balance-line-clamp-005.html.ini Sync WPT with upstream (13-07-2025) (#38026) 2025-07-13 02:09:35 +00:00
text-wrap-balance-overflow-002.html.ini feat: Support font-relative ch and ic units (#32171) 2024-05-02 07:17:32 +00:00
text-wrap-balance-text-indent-001.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
text-wrap-balance-word-spacing-001.html.ini Forward manager_number to NullBrowser constructor (#37125) 2025-05-25 15:12:55 +00:00
text-wrap-nowrap-001.html.ini Update web-platform-tests to revision b'8f48f40aab7f7f8a8118dc1a46972d070622be52' (#32271) 2024-05-12 04:42:20 +00:00
textarea-always-preserves-spaces-001.tentative.html.ini Update web-platform-tests to revision b'8686b7a6d288d3b2c22b5ddb5a21773619b22b85' (#34202) 2024-11-10 01:42:44 +00:00
textarea-pre-wrap-012.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
textarea-pre-wrap-013.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
textarea-pre-wrap-014.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
trailing-ideographic-space-001.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
trailing-ideographic-space-002.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
trailing-ideographic-space-003.html.ini Rebase and squash (#35567) 2025-02-21 11:54:25 +00:00
trailing-ideographic-space-004.html.ini
trailing-ideographic-space-005.html.ini
trailing-ideographic-space-006.html.ini Rebase and squash (#35567) 2025-02-21 11:54:25 +00:00
trailing-ideographic-space-008.html.ini Rebase and squash (#35567) 2025-02-21 11:54:25 +00:00
trailing-ideographic-space-010.html.ini
trailing-ideographic-space-011.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
trailing-ideographic-space-015.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
trailing-ideographic-space-016.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
trailing-ideographic-space-break-spaces-001.html.ini
trailing-ideographic-space-break-spaces-002.html.ini
trailing-ideographic-space-break-spaces-003.html.ini
trailing-ideographic-space-break-spaces-004.html.ini
trailing-ideographic-space-break-spaces-005.html.ini
trailing-ideographic-space-break-spaces-006.html.ini
trailing-ideographic-space-break-spaces-007.html.ini
trailing-ogham-001.html.ini
trailing-ogham-002.html.ini
trailing-ogham-003.html.ini
trailing-other-space-separators-001.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
trailing-other-space-separators-002.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
trailing-other-space-separators-003.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
trailing-other-space-separators-004.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
trailing-space-and-text-alignment-rtl-003.html.ini layout: Right-to-left support for other layout modes (#33375) 2024-09-11 13:40:11 +00:00
trailing-space-and-text-alignment-rtl-004.html.ini
trailing-space-in-inline-box.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
trailing-space-position-001.html.ini feat: Support font-relative ch and ic units (#32171) 2024-05-02 07:17:32 +00:00
white-space-applies-to-text-001.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
white-space-collapse-002.html.ini
white-space-collapse-discard-001.xht.ini Sync WPT with upstream (04-10-2023) (#30493) 2023-10-06 00:51:48 +00:00
white-space-collapse-preserve-breaks-001.xht.ini Sync WPT with upstream (04-10-2023) (#30493) 2023-10-06 00:51:48 +00:00
white-space-intrinsic-size-001.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
white-space-pre-011.html.ini
white-space-pre-031.html.ini
white-space-pre-032.html.ini
white-space-pre-034.html.ini
white-space-pre-035.html.ini
white-space-pre-wrap-justify-001.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
white-space-pre-wrap-justify-002.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
white-space-pre-wrap-justify-003.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
white-space-pre-wrap-justify-004.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
white-space-pre-wrap-trailing-spaces-023.html.ini layout: Right-to-left support for other layout modes (#33375) 2024-09-11 13:40:11 +00:00
white-space-trim-discard-inner-001.xht.ini Sync WPT with upstream (04-10-2023) (#30493) 2023-10-06 00:51:48 +00:00
white-space-vs-joiners-001.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
white-space-wrap-after-nowrap-001.html.ini Fix handling of white-space property for wrapping (#30259) 2023-09-04 09:38:40 +00:00
white-space-zero-fontsize-002.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00