aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/xmldocument.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2015-11-23 10:42:04 -0500
committerMs2ger <Ms2ger@gmail.com>2016-02-20 18:03:14 +0100
commit704505617399f040b0ca10eb1d06dde2811937c0 (patch)
tree7c679aebcfa6e7c0726f315cc50cdb19a91e05be /components/script/dom/xmldocument.rs
parent875f1e92ccafebc8ddebc722f430e5037007b9dc (diff)
downloadservo-704505617399f040b0ca10eb1d06dde2811937c0.tar.gz
servo-704505617399f040b0ca10eb1d06dde2811937c0.zip
Make it possible for XMLDocuments to have a browsing context.
Diffstat (limited to 'components/script/dom/xmldocument.rs')
-rw-r--r--components/script/dom/xmldocument.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/components/script/dom/xmldocument.rs b/components/script/dom/xmldocument.rs
index 200480d4fc0..fc04c418867 100644
--- a/components/script/dom/xmldocument.rs
+++ b/components/script/dom/xmldocument.rs
@@ -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,
@@ -78,6 +82,7 @@ impl XMLDocument {
Ok(XMLDocument::new(win,
None,
+ None,
IsHTMLDocument::NonHTMLDocument,
None,
None,