diff options
author | bors-servo <metajack+bors@gmail.com> | 2014-10-23 09:18:37 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2014-10-23 09:18:37 -0600 |
commit | 2df236376a443d8d031ee7a72379f336f2cd8cc4 (patch) | |
tree | 8f4278428198189993dd703945ada5189ddaf764 /components/script/dom/htmliframeelement.rs | |
parent | 470d27a6681b4647de64c085654403820d48f7af (diff) | |
parent | 539c21f38022b6d0be6ad01be94bc2e1217d5ccb (diff) | |
download | servo-2df236376a443d8d031ee7a72379f336f2cd8cc4.tar.gz servo-2df236376a443d8d031ee7a72379f336f2cd8cc4.zip |
auto merge of #3759 : jdm/servo/readystate, r=Ms2ger
...itor after the initial parse. Fixes #1720. Fixes #3738.
r? @Ms2ger or @Manishearth
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 05b5ccaf46c..52ee5c56c7b 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -4,6 +4,7 @@ use dom::attr::Attr; use dom::attr::AttrHelpers; +use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyStateValues}; use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding; use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementMethods; use dom::bindings::codegen::InheritTypes::{NodeCast, ElementCast}; @@ -15,7 +16,7 @@ use dom::element::{HTMLIFrameElementTypeId, Element}; use dom::element::AttributeHandlers; use dom::eventtarget::{EventTarget, NodeTargetTypeId}; use dom::htmlelement::HTMLElement; -use dom::node::{Node, NodeHelpers, ElementNodeTypeId, window_from_node}; +use dom::node::{Node, NodeHelpers, ElementNodeTypeId, window_from_node, document_from_node}; use dom::virtualmethods::VirtualMethods; use dom::window::Window; use page::IterablePage; @@ -119,8 +120,13 @@ impl<'a> HTMLIFrameElementHelpers for JSRef<'a, HTMLIFrameElement> { subpage_id: subpage_id, })); - let ConstellationChan(ref chan) = page.constellation_chan; - chan.send(LoadIframeUrlMsg(url, page.id, subpage_id, sandboxed)); + let doc = document_from_node(self).root(); + if doc.ReadyState() != DocumentReadyStateValues::Complete { + // https://github.com/servo/servo/issues/3738 + // We can't handle dynamic frame tree changes in the compositor right now. + let ConstellationChan(ref chan) = page.constellation_chan; + chan.send(LoadIframeUrlMsg(url, page.id, subpage_id, sandboxed)); + } } } |