mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Privatize Document
This commit is contained in:
parent
d0addd36bb
commit
8825296869
8 changed files with 38 additions and 22 deletions
|
@ -39,7 +39,7 @@ impl DOMImplementation {
|
|||
}
|
||||
|
||||
pub fn new(document: JSRef<Document>) -> Temporary<DOMImplementation> {
|
||||
let window = document.window.root();
|
||||
let window = document.window().root();
|
||||
reflect_dom_object(box DOMImplementation::new_inherited(document),
|
||||
&Window(*window),
|
||||
DOMImplementationBinding::Wrap)
|
||||
|
@ -73,7 +73,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
|
|||
fn CreateDocument(self, namespace: Option<DOMString>, qname: DOMString,
|
||||
maybe_doctype: Option<JSRef<DocumentType>>) -> Fallible<Temporary<Document>> {
|
||||
let doc = self.document.root();
|
||||
let win = doc.window.root();
|
||||
let win = doc.window().root();
|
||||
|
||||
// Step 1.
|
||||
let doc = Document::new(*win, None, NonHTMLDocument, None).root();
|
||||
|
@ -118,7 +118,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
|
|||
// http://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument
|
||||
fn CreateHTMLDocument(self, title: Option<DOMString>) -> Temporary<Document> {
|
||||
let document = self.document.root();
|
||||
let win = document.window.root();
|
||||
let win = document.window().root();
|
||||
|
||||
// Step 1-2.
|
||||
let doc = Document::new(*win, None, HTMLDocument, None).root();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue