aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/flexbox/construct.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-03-09 10:13:19 +0100
committerGitHub <noreply@github.com>2024-03-09 09:13:19 +0000
commit1f23ec2b27789c356a6283d9005079b6e9b1e66b (patch)
treedf5256c59df043d12dd2630e2a3cf90e0a62672c /components/layout_2020/flexbox/construct.rs
parent55f908653f6fb02c344459319a7ca87487cfa4bf (diff)
downloadservo-1f23ec2b27789c356a6283d9005079b6e9b1e66b.tar.gz
servo-1f23ec2b27789c356a6283d9005079b6e9b1e66b.zip
layout: Do not inherit node and fragment flags in anonymous boxes (#31586)
This doesn't really have observable behavior right now, as much as I tried to trigger some kind of bug. On the other hand, it's just wrong and is very obvious when you dump the Fragment tree. If you create a `display: table-cell` that is a child of the `<body>` all parts of the anonymous table are flagged as if they are the `<body>` element.
Diffstat (limited to 'components/layout_2020/flexbox/construct.rs')
-rw-r--r--components/layout_2020/flexbox/construct.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/components/layout_2020/flexbox/construct.rs b/components/layout_2020/flexbox/construct.rs
index b5aa9b34c47..065e03989d3 100644
--- a/components/layout_2020/flexbox/construct.rs
+++ b/components/layout_2020/flexbox/construct.rs
@@ -160,9 +160,7 @@ where
self.context,
self.text_decoration_line,
);
- let info = &self
- .info
- .new_replacing_style(anonymous_style.clone().unwrap());
+ let info = &self.info.new_anonymous(anonymous_style.clone().unwrap());
IndependentFormattingContext::NonReplaced(NonReplacedFormattingContext {
base_fragment_info: info.into(),
style: info.style.clone(),