mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Make it possible for XMLDocuments to have a browsing context.
This commit is contained in:
parent
875f1e92cc
commit
7045056173
2 changed files with 7 additions and 1 deletions
|
@ -71,6 +71,7 @@ impl DOMImplementationMethods for DOMImplementation {
|
|||
|
||||
// Step 1.
|
||||
let doc = XMLDocument::new(win,
|
||||
None,
|
||||
None,
|
||||
IsHTMLDocument::NonHTMLDocument,
|
||||
None,
|
||||
|
|
|
@ -11,6 +11,7 @@ use dom::bindings::global::GlobalRef;
|
|||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{Root, RootedReference};
|
||||
use dom::bindings::reflector::{Reflectable, reflect_dom_object};
|
||||
use dom::browsingcontext::BrowsingContext;
|
||||
use dom::document::{Document, DocumentSource, IsHTMLDocument};
|
||||
use dom::location::Location;
|
||||
use dom::node::Node;
|
||||
|
@ -27,6 +28,7 @@ pub struct XMLDocument {
|
|||
|
||||
impl XMLDocument {
|
||||
fn new_inherited(window: &Window,
|
||||
browsing_context: Option<&BrowsingContext>,
|
||||
url: Option<Url>,
|
||||
is_html_document: IsHTMLDocument,
|
||||
content_type: Option<DOMString>,
|
||||
|
@ -35,7 +37,7 @@ impl XMLDocument {
|
|||
doc_loader: DocumentLoader) -> XMLDocument {
|
||||
XMLDocument {
|
||||
document: Document::new_inherited(window,
|
||||
None,
|
||||
browsing_context,
|
||||
url,
|
||||
is_html_document,
|
||||
content_type,
|
||||
|
@ -46,6 +48,7 @@ impl XMLDocument {
|
|||
}
|
||||
|
||||
pub fn new(window: &Window,
|
||||
browsing_context: Option<&BrowsingContext>,
|
||||
url: Option<Url>,
|
||||
doctype: IsHTMLDocument,
|
||||
content_type: Option<DOMString>,
|
||||
|
@ -55,6 +58,7 @@ impl XMLDocument {
|
|||
-> Root<XMLDocument> {
|
||||
let doc = reflect_dom_object(
|
||||
box XMLDocument::new_inherited(window,
|
||||
browsing_context,
|
||||
url,
|
||||
doctype,
|
||||
content_type,
|
||||
|
@ -77,6 +81,7 @@ impl XMLDocument {
|
|||
let docloader = DocumentLoader::new(&*doc.loader());
|
||||
|
||||
Ok(XMLDocument::new(win,
|
||||
None,
|
||||
None,
|
||||
IsHTMLDocument::NonHTMLDocument,
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue