mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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.
This commit is contained in:
parent
55f908653f
commit
1f23ec2b27
7 changed files with 73 additions and 38 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue