servo/components/layout_2020
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
..
display_list Use explicit WebRender hit test items in legacy layout (#29981) 2023-07-17 09:11:09 +00:00
flexbox Add initial support for css-text-3 whitespace handling (#29828) 2023-07-20 18:34:31 +00:00
flow Add initial support for css-text-3 whitespace handling (#29828) 2023-07-20 18:34:31 +00:00
fragment_tree Try to use WebRender types more 2023-07-10 17:35:50 +02:00
tests Correct rendering of floated root 2023-06-20 17:46:45 +02:00
Cargo.toml Add initial support for css-text-3 whitespace handling (#29828) 2023-07-20 18:34:31 +00:00
cell.rs Implement Default for ArcRefCell 2020-03-17 11:15:17 -07:00
context.rs Combine DOM-related concepts in Layout 2020 into dom.rs 2023-05-13 11:52:59 +02:00
dom.rs Combine DOM-related concepts in Layout 2020 into dom.rs 2023-05-13 11:52:59 +02:00
dom_traversal.rs Make the choice of layout runtime setting 2023-07-06 14:49:24 +02:00
formatting_contexts.rs Simplify layout of absolutes with static insets 2023-06-20 11:44:25 +02:00
geom.rs Place floats in layout 2020, but don't flow text around the floats yet. 2023-06-03 06:09:21 +02:00
layout_debug.rs Layout 2020: Move all Fragment code to the fragment_tree directory 2023-06-04 18:12:11 +02:00
lib.rs Layout 2020: Move all Fragment code to the fragment_tree directory 2023-06-04 18:12:11 +02:00
lists.rs Make the choice of layout runtime setting 2023-07-06 14:49:24 +02:00
positioned.rs Remove rayon_croissant and clean up contains_floats (#29960) 2023-07-19 07:01:55 +00:00
query.rs Try to use WebRender types more 2023-07-10 17:35:50 +02:00
replaced.rs Layout 2020: Move all Fragment code to the fragment_tree directory 2023-06-04 18:12:11 +02:00
sizing.rs Handle floats in BlockContainer::inline_content_sizes 2023-06-19 16:02:35 +02:00
style_ext.rs Make the choice of layout runtime setting 2023-07-06 14:49:24 +02:00
traversal.rs Combine DOM-related concepts in Layout 2020 into dom.rs 2023-05-13 11:52:59 +02:00