mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
auto merge of #1051 : Ms2ger/servo/private-root, r=jdm
In preparation for removing it as part of making Document a Node.
This commit is contained in:
commit
8d3c7a2ded
4 changed files with 17 additions and 22 deletions
|
@ -110,7 +110,7 @@ pub enum DocumentType {
|
|||
}
|
||||
|
||||
pub struct Document {
|
||||
root: Option<AbstractNode<ScriptView>>,
|
||||
priv root: Option<AbstractNode<ScriptView>>,
|
||||
reflector_: Reflector,
|
||||
window: Option<@mut Window>,
|
||||
doctype: DocumentType,
|
||||
|
@ -337,7 +337,7 @@ impl Document {
|
|||
fail!("no SVG document yet")
|
||||
},
|
||||
_ => {
|
||||
match self.root {
|
||||
match self.GetDocumentElement() {
|
||||
None => {},
|
||||
Some(root) => {
|
||||
for node in root.traverse_preorder() {
|
||||
|
@ -353,7 +353,7 @@ impl Document {
|
|||
}
|
||||
}
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ impl Document {
|
|||
},
|
||||
_ => {
|
||||
let (_scope, cx) = self.get_scope_and_cx();
|
||||
match self.root {
|
||||
match self.GetDocumentElement() {
|
||||
None => {},
|
||||
Some(root) => {
|
||||
for node in root.traverse_preorder() {
|
||||
|
@ -401,7 +401,7 @@ impl Document {
|
|||
node.add_child(new_title);
|
||||
}
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -499,7 +499,7 @@ impl Document {
|
|||
|
||||
pub fn createHTMLCollection(&self, callback: &fn(elem: &Element) -> bool) -> @mut HTMLCollection {
|
||||
let mut elements = ~[];
|
||||
match self.root {
|
||||
match self.GetDocumentElement() {
|
||||
None => {},
|
||||
Some(root) => {
|
||||
for child in root.traverse_preorder() {
|
||||
|
@ -510,7 +510,7 @@ impl Document {
|
|||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
let (scope, cx) = self.get_scope_and_cx();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue