servo/components
Atbrakhi 2b67392fd5
Add initial support for css-text-3 whitespace handling (#29828)
* Add initial support for css-text-3 whitespace handling

This adds initial support for whitespace handling from the CSS
specification for Layout 2020. In general, the basics are covered. Since
test output is very sensitive to whitespace handling, this change
incorporates several fixes:

1. Whitespace is collapsed according to the Phase 1 rules of the
   specification, though language-specific unbreaking rules are not
   handled properly yet.
2. Whitespace is mostly trimmed and positioned according to the Phase 2
   rules, but full support for removing whitespace at the end of lines
   is pending on a temporary data structure to hold lines under
   construction.
3. Completely empty box fragments left over immediately after line
   breaks are now trimmed from the fragment tree.
4. This change tries to detect when an inline formatting context
   collapses through.

Fixes #29994.

Co-authored-by: Mukilan Thiyagarajan <me@mukilan.in>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

* Update test results

---------

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <me@mukilan.in>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-07-20 18:34:31 +00:00
..
allocator Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
atoms Further changes required by Servo 2023-06-09 10:22:21 +02:00
background_hang_monitor Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
bluetooth Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
bluetooth_traits Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
canvas Try to use WebRender types more 2023-07-10 17:35:50 +02:00
canvas_traits Try to use WebRender types more 2023-07-10 17:35:50 +02:00
compositing Stop using webrender_api::get_scroll_node_state (#30000) 2023-07-17 09:33:24 +00:00
config Minibrowser: Introduce minibrowser.enabled prefs (#29995) 2023-07-13 14:24:33 +00:00
config_plugins Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
constellation Try to use WebRender types more 2023-07-10 17:35:50 +02:00
deny_public_fields Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
derive_common Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
devtools Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
devtools_traits Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
dom_struct Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
domobject_derive Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
embedder_traits Vendor the current version of WebRender 2023-07-03 17:55:17 +02:00
geometry Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
gfx Try to use WebRender types more 2023-07-10 17:35:50 +02:00
gfx_traits Try to use WebRender types more 2023-07-10 17:35:50 +02:00
jstraceable_derive Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
layout Use explicit WebRender hit test items in legacy layout (#29981) 2023-07-17 09:11:09 +00:00
layout_2020 Add initial support for css-text-3 whitespace handling (#29828) 2023-07-20 18:34:31 +00:00
layout_thread Try to use WebRender types more 2023-07-10 17:35:50 +02:00
layout_thread_2020 Try to use WebRender types more 2023-07-10 17:35:50 +02:00
layout_traits Vendor the current version of WebRender 2023-07-03 17:55:17 +02:00
malloc_size_of Try to use WebRender types more 2023-07-10 17:35:50 +02:00
media Try to use WebRender types more 2023-07-10 17:35:50 +02:00
metrics Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
msg Try to use WebRender types more 2023-07-10 17:35:50 +02:00
net Try to use WebRender types more 2023-07-10 17:35:50 +02:00
net_traits Try to use WebRender types more 2023-07-10 17:35:50 +02:00
pixels Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
profile Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
profile_traits Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
rand Update uuid 2023-06-26 16:27:12 +02:00
range Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
remutex Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
script make the concept of has_listeners_for follow other implementations (#21044) 2023-07-19 15:27:32 +00:00
script_layout_interface Try to use WebRender types more 2023-07-10 17:35:50 +02:00
script_plugins Upgrade remaining components to edition 2018 2023-02-18 09:42:37 +01:00
script_traits Try to use WebRender types more 2023-07-10 17:35:50 +02:00
selectors style: Remove layout.css.is-and-where-better-error-recovery.enabled 2023-05-24 18:32:43 +02:00
servo Try to use WebRender types more 2023-07-10 17:35:50 +02:00
servo_arc style: Refactor the author sheet cache to keep alive the relevant StylesheetContents 2023-05-24 18:32:30 +02:00
size_of_test Upgrade remaining components to edition 2018 2023-02-18 09:42:37 +01:00
std_test_override Upgrade remaining components to edition 2018 2023-02-18 09:42:37 +01:00
style Auto merge of #29950 - mrobinson:unify-style-crate, r=mukilan 2023-07-06 17:12:47 +02:00
style_derive Upgrade darling to 0.13.1 2023-06-09 11:17:48 +02:00
style_traits Vendor the current version of WebRender 2023-07-03 17:55:17 +02:00
to_shmem style: Remove ThinBoxedSlice 2023-06-09 10:22:25 +02:00
to_shmem_derive Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
url Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
webdriver_server Fix compiler warning introduced in 4aa8a1c418 2023-05-20 02:03:58 +00:00
webgpu Try to use WebRender types more 2023-07-10 17:35:50 +02:00
webrender_surfman Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
webrender_traits Try to use WebRender types more 2023-07-10 17:35:50 +02:00