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
|
@ -198,7 +198,7 @@ impl TableSlotCell {
|
|||
|
||||
/// Get the node id of this cell's [`BaseFragmentInfo`]. This is used for unit tests.
|
||||
pub fn node_id(&self) -> usize {
|
||||
self.base_fragment_info.tag.node.0
|
||||
self.base_fragment_info.tag.map_or(0, |tag| tag.node.0)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue