mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
layout: Implement empty-cells
per CSS 2.1 § 17.6.1.1.
This commit is contained in:
parent
592c93e0c2
commit
5675274c44
8 changed files with 98 additions and 13 deletions
|
@ -1000,6 +1000,15 @@ impl<'ln> ThreadSafeLayoutNode<'ln> {
|
|||
_ => panic!("no layout data for this node"),
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns true if this node contributes content. This is used in the implementation of
|
||||
/// `empty_cells` per CSS 2.1 § 17.6.1.1.
|
||||
pub fn is_content(&self) -> bool {
|
||||
match self.type_id() {
|
||||
Some(NodeTypeId::Element(..)) | Some(NodeTypeId::Text(..)) => true,
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ThreadSafeLayoutNodeChildrenIterator<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue