mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add XMLDocument object
This commit is contained in:
parent
831979d6a7
commit
adf8b359bb
18 changed files with 169 additions and 73 deletions
|
@ -1439,7 +1439,7 @@ impl<'a> PostorderNodeMutTraversal for FlowConstructor<'a> {
|
|||
Some(NodeTypeId::CharacterData(CharacterDataTypeId::ProcessingInstruction)) |
|
||||
Some(NodeTypeId::DocumentType) |
|
||||
Some(NodeTypeId::DocumentFragment) |
|
||||
Some(NodeTypeId::Document) => {
|
||||
Some(NodeTypeId::Document(_)) => {
|
||||
(display::T::none, float::T::none, position::T::static_)
|
||||
}
|
||||
};
|
||||
|
@ -1587,7 +1587,7 @@ impl<'ln> NodeUtils for ServoThreadSafeLayoutNode<'ln> {
|
|||
Some(NodeTypeId::CharacterData(_)) |
|
||||
Some(NodeTypeId::DocumentType) |
|
||||
Some(NodeTypeId::DocumentFragment) |
|
||||
Some(NodeTypeId::Document) |
|
||||
Some(NodeTypeId::Document(_)) |
|
||||
Some(NodeTypeId::Element(ElementTypeId::HTMLElement(
|
||||
HTMLElementTypeId::HTMLImageElement))) |
|
||||
Some(NodeTypeId::Element(ElementTypeId::HTMLElement(
|
||||
|
|
|
@ -629,7 +629,12 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
|
|||
fn is_root(&self) -> bool {
|
||||
match self.as_node().parent_node() {
|
||||
None => false,
|
||||
Some(node) => node.type_id() == NodeTypeId::Document,
|
||||
Some(node) => {
|
||||
match node.type_id() {
|
||||
NodeTypeId::Document(_) => true,
|
||||
_ => false
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue