mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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>
This commit is contained in:
parent
cc585b74d3
commit
2b67392fd5
129 changed files with 636 additions and 504 deletions
|
@ -150,6 +150,7 @@ where
|
|||
base_fragment_info: (&run.info).into(),
|
||||
text: run.text.into(),
|
||||
parent_style: run.info.style,
|
||||
has_uncollapsible_content: false,
|
||||
}),
|
||||
self.text_decoration_line,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue