mirror of
https://github.com/servo/servo.git
synced 2025-06-08 00:23:30 +00:00
Introduce [Abstract] to mark non-leaf interfaces
Some interfaces like Node, CharacterData and HTMLTableCellElement are never instantiated directly, only their descendant interfaces are. Those are marked with [Abstract] to set their type_id to None instead of having dummy values in the TypeId enums.
This commit is contained in:
parent
941f7dc04b
commit
c25085f68a
21 changed files with 26 additions and 48 deletions
|
@ -1430,8 +1430,6 @@ impl<'a> PostorderNodeMutTraversal for FlowConstructor<'a> {
|
|||
Some(NodeTypeId::Document) => {
|
||||
(display::T::none, float::T::none, position::T::static_)
|
||||
}
|
||||
Some(NodeTypeId::Node) => unreachable!(),
|
||||
Some(NodeTypeId::CharacterData(CharacterDataTypeId::CharacterData)) => unreachable!(),
|
||||
};
|
||||
|
||||
debug!("building flow for node: {:?} {:?} {:?} {:?}", display, float, positioning, node.type_id());
|
||||
|
@ -1587,7 +1585,6 @@ impl<'ln> NodeUtils for ThreadSafeLayoutNode<'ln> {
|
|||
Some(NodeTypeId::Element(ElementTypeId::HTMLElement(
|
||||
HTMLElementTypeId::HTMLObjectElement))) => self.has_object_data(),
|
||||
Some(NodeTypeId::Element(_)) => false,
|
||||
Some(NodeTypeId::Node) => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue