mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01: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
|
@ -184,8 +184,6 @@ impl<'a> Serializable for &'a Node {
|
|||
traversal_scope: TraversalScope) -> io::Result<()> {
|
||||
let node = *self;
|
||||
match (traversal_scope, node.type_id()) {
|
||||
(_, NodeTypeId::Node) => unreachable!(),
|
||||
(_, NodeTypeId::CharacterData(CharacterDataTypeId::CharacterData)) => unreachable!(),
|
||||
(_, NodeTypeId::Element(..)) => {
|
||||
let elem = ElementCast::to_ref(node).unwrap();
|
||||
let name = QualName::new(elem.namespace().clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue