mirror of
https://github.com/servo/servo.git
synced 2025-06-20 23:28:59 +01:00
Make Document::root private, in preparation for removing it as part of making Document a Node.
This commit is contained in:
parent
fc9fdf30a6
commit
b6b2606c96
4 changed files with 17 additions and 22 deletions
|
@ -217,7 +217,9 @@ impl<'self> Iterator<@mut Page> for PageTreeIterator<'self> {
|
|||
impl Page {
|
||||
/// Adds the given damage.
|
||||
fn damage(&mut self, level: DocumentDamageLevel) {
|
||||
let root = do self.frame.get_ref().document.with_base |doc| { doc.root };
|
||||
let root = do self.frame.get_ref().document.with_base |doc| {
|
||||
doc.GetDocumentElement()
|
||||
};
|
||||
match root {
|
||||
None => {},
|
||||
Some(root) => {
|
||||
|
@ -279,7 +281,7 @@ impl Page {
|
|||
None => fail!(~"Tried to relayout with no root frame!"),
|
||||
Some(ref frame) => {
|
||||
do frame.document.with_base |doc| {
|
||||
doc.root
|
||||
doc.GetDocumentElement()
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -829,7 +831,7 @@ impl ScriptTask {
|
|||
debug!("ClickEvent: clicked at %?", point);
|
||||
|
||||
let root = do page.frame.expect("root frame is None").document.with_base |doc| {
|
||||
doc.root
|
||||
doc.GetDocumentElement()
|
||||
};
|
||||
if root.is_none() {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue