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

@ -15,7 +15,7 @@ use dom::bindings::error::Fallible;
use dom::bindings::js::{JS, Root};
use dom::bindings::reflector::{Reflector, reflect_dom_object};
use dom::bindings::str::DOMString;
use dom::document::{Document, IsHTMLDocument};
use dom::document::{Document, HasBrowsingContext, IsHTMLDocument};
use dom::document::DocumentSource;
use dom::servoparser::ServoParser;
use dom::window::Window;
@ -60,7 +60,7 @@ impl DOMParserMethods for DOMParser {
match ty {
Text_html => {
let document = Document::new(&self.window,
None,
HasBrowsingContext::No,
Some(url.clone()),
doc.origin().alias(),
IsHTMLDocument::HTMLDocument,
@ -78,7 +78,7 @@ impl DOMParserMethods for DOMParser {
Text_xml | Application_xml | Application_xhtml_xml => {
// FIXME: this should probably be FromParser when we actually parse the string (#3756).
let document = Document::new(&self.window,
None,
HasBrowsingContext::No,
Some(url.clone()),
doc.origin().alias(),
IsHTMLDocument::NonHTMLDocument,