aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/flow/construct.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-10-19 15:43:55 +0200
committerGitHub <noreply@github.com>2023-10-19 13:43:55 +0000
commitfd31da9102497cfaf5265bbab17df4424a8a1078 (patch)
tree1433f9c69456146ab4045fdd4a379f9b87185b6f /components/layout_2020/flow/construct.rs
parent634a5d9cf5cf45eaa284a8b4dfb0e1cdf75e08e6 (diff)
downloadservo-fd31da9102497cfaf5265bbab17df4424a8a1078.tar.gz
servo-fd31da9102497cfaf5265bbab17df4424a8a1078.zip
Anonymous boxes that wrap inlines should not inherit overflow (#30579)
In legacy layout, anonymous text wrappers were inheriting the `overflow` and `text-overflow` properties. This results in the creation of extra clipping for these anonymous wrappers which could clip away floats. We will likely implement `text-overflow` differently in non-legacy layout. This change marks all legacy layout pseudo elements as "legacy" and also adds a new pseudo element for non-legacy layout that does not inherit `overflow`. Fixes #30562. Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Diffstat (limited to 'components/layout_2020/flow/construct.rs')
-rw-r--r--components/layout_2020/flow/construct.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/layout_2020/flow/construct.rs b/components/layout_2020/flow/construct.rs
index dbdac0f5c8e..dec184b9529 100644
--- a/components/layout_2020/flow/construct.rs
+++ b/components/layout_2020/flow/construct.rs
@@ -448,7 +448,7 @@ where
.stylist
.style_for_anonymous::<Node::ConcreteElement>(
&self.context.shared_context().guards,
- &PseudoElement::ServoText, // FIMXE: use `PseudoElement::Marker` when we add it
+ &PseudoElement::ServoLegacyText, // FIMXE: use `PseudoElement::Marker` when we add it
&info.style,
);
self.handle_inline_level_element(
@@ -684,7 +684,7 @@ where
.stylist
.style_for_anonymous::<Node::ConcreteElement>(
&context.shared_context().guards,
- &PseudoElement::ServoText,
+ &PseudoElement::ServoAnonymousBox,
block_container_style,
)
});