aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/flow/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/flow/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/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 1a512910374..cd2dfffc4d0 100644
--- a/components/layout_2020/flow/construct.rs
+++ b/components/layout_2020/flow/construct.rs
@@ -317,7 +317,7 @@ where
self.current_inline_level_boxes()
.push(ArcRefCell::new(InlineLevelBox::Atomic(ifc)));
} else {
- let anonymous_info = self.info.new_replacing_style(ifc.style().clone());
+ let anonymous_info = self.info.new_anonymous(ifc.style().clone());
let table_block = ArcRefCell::new(BlockLevelBox::Independent(ifc));
self.block_level_boxes.push(BlockLevelJob {
info: anonymous_info,
@@ -690,7 +690,7 @@ where
);
std::mem::swap(&mut self.ongoing_inline_formatting_context, &mut ifc);
- let info = self.info.new_replacing_style(anonymous_style.clone());
+ let info = self.info.new_anonymous(anonymous_style.clone());
self.block_level_boxes.push(BlockLevelJob {
info,
// FIXME(nox): We should be storing this somewhere.