Return a reference in Document::window()

This commit is contained in:
Anthony Ramine 2015-10-17 02:23:25 +02:00
parent e889b0914b
commit 409b5e3695
12 changed files with 31 additions and 39 deletions

View file

@ -42,7 +42,7 @@ impl DOMImplementation {
pub fn new(document: &Document) -> Root<DOMImplementation> {
let window = document.window();
reflect_dom_object(box DOMImplementation::new_inherited(document),
GlobalRef::Window(window.r()),
GlobalRef::Window(window),
DOMImplementationBinding::Wrap)
}
}
@ -66,7 +66,7 @@ impl DOMImplementationMethods for DOMImplementation {
let loader = DocumentLoader::new(&*doc.loader());
// Step 1.
let doc = Document::new(win.r(), None, IsHTMLDocument::NonHTMLDocument,
let doc = Document::new(win, None, IsHTMLDocument::NonHTMLDocument,
None, None, DocumentSource::NotFromParser, loader);
// Step 2-3.
let maybe_elem = if qname.is_empty() {
@ -114,7 +114,7 @@ impl DOMImplementationMethods for DOMImplementation {
let loader = DocumentLoader::new(&*document.loader());
// Step 1-2.
let doc = Document::new(win.r(), None, IsHTMLDocument::HTMLDocument, None, None,
let doc = Document::new(win, None, IsHTMLDocument::HTMLDocument, None, None,
DocumentSource::NotFromParser, loader);
{