Allow windows to share browsing contexts.

This commit is contained in:
Alan Jeffrey 2017-01-13 18:17:01 -06:00
parent fc67878edf
commit 403499a9d5
11 changed files with 168 additions and 108 deletions

View file

@ -10,8 +10,7 @@ use dom::bindings::inheritance::Castable;
use dom::bindings::js::Root;
use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::str::DOMString;
use dom::browsingcontext::BrowsingContext;
use dom::document::{Document, DocumentSource, IsHTMLDocument};
use dom::document::{Document, DocumentSource, HasBrowsingContext, IsHTMLDocument};
use dom::location::Location;
use dom::node::Node;
use dom::window::Window;
@ -28,7 +27,7 @@ pub struct XMLDocument {
impl XMLDocument {
fn new_inherited(window: &Window,
browsing_context: Option<&BrowsingContext>,
has_browsing_context: HasBrowsingContext,
url: Option<ServoUrl>,
origin: Origin,
is_html_document: IsHTMLDocument,
@ -39,7 +38,7 @@ impl XMLDocument {
doc_loader: DocumentLoader) -> XMLDocument {
XMLDocument {
document: Document::new_inherited(window,
browsing_context,
has_browsing_context,
url,
origin,
is_html_document,
@ -54,7 +53,7 @@ impl XMLDocument {
}
pub fn new(window: &Window,
browsing_context: Option<&BrowsingContext>,
has_browsing_context: HasBrowsingContext,
url: Option<ServoUrl>,
origin: Origin,
doctype: IsHTMLDocument,
@ -66,7 +65,7 @@ impl XMLDocument {
-> Root<XMLDocument> {
let doc = reflect_dom_object(
box XMLDocument::new_inherited(window,
browsing_context,
has_browsing_context,
url,
origin,
doctype,