aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/flexbox/construct.rs
diff options
context:
space:
mode:
authorAtbrakhi <94557773+atbrakhi@users.noreply.github.com>2023-07-20 20:34:31 +0200
committerGitHub <noreply@github.com>2023-07-20 18:34:31 +0000
commit2b67392fd509393cc0c66ab4292e48b04926ab5e (patch)
tree1145361f0cea4d58678a556d335efe9eb21ae693 /components/layout_2020/flexbox/construct.rs
parentcc585b74d385145e4c3d1af6e92e6b146f354481 (diff)
downloadservo-2b67392fd509393cc0c66ab4292e48b04926ab5e.tar.gz
servo-2b67392fd509393cc0c66ab4292e48b04926ab5e.zip
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>
Diffstat (limited to 'components/layout_2020/flexbox/construct.rs')
-rw-r--r--components/layout_2020/flexbox/construct.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/components/layout_2020/flexbox/construct.rs b/components/layout_2020/flexbox/construct.rs
index cd21ca85db6..1653a4e8606 100644
--- a/components/layout_2020/flexbox/construct.rs
+++ b/components/layout_2020/flexbox/construct.rs
@@ -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,
),