servo: Merge #3759 - Implement Document.readyState. Prevent iframes from notifying the compos (from jdm:readystate); r=Ms2ger

...itor after the initial parse. Fixes #1720. Fixes #3738.

r? @Ms2ger or @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 2df236376a443d8d031ee7a72379f336f2cd8cc4
This commit is contained in:
Josh Matthews
2014-10-23 09:18:37 -06:00
parent 19bfe8ebf2
commit fc0399b718
8 changed files with 111 additions and 28 deletions

View File

@@ -12,7 +12,7 @@ use dom::bindings::global::Window;
use dom::bindings::js::{JS, JSRef, Root, Temporary, OptionalRootable};
use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object};
use dom::bindings::utils::{QName, Name, InvalidXMLName, xml_name_type};
use dom::document::{Document, HTMLDocument, NonHTMLDocument};
use dom::document::{Document, HTMLDocument, NonHTMLDocument, NotFromParser};
use dom::documenttype::DocumentType;
use dom::htmlbodyelement::HTMLBodyElement;
use dom::htmlheadelement::HTMLHeadElement;
@@ -74,7 +74,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
let win = doc.window().root();
// Step 1.
let doc = Document::new(*win, None, NonHTMLDocument, None).root();
let doc = Document::new(*win, None, NonHTMLDocument, None, NotFromParser).root();
// Step 2-3.
let maybe_elem = if qname.is_empty() {
None
@@ -119,7 +119,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
let win = document.window().root();
// Step 1-2.
let doc = Document::new(*win, None, HTMLDocument, None).root();
let doc = Document::new(*win, None, HTMLDocument, None, NotFromParser).root();
let doc_node: JSRef<Node> = NodeCast::from_ref(*doc);
{