servo: Merge #3951 - Iframes (from mrobinson:iframes); r=jdm
This is the first step to allowing incremental iframe creation and destruction. This should eliminate task failures when an iframe is added to the frame tree lazily via script. Source-Repo: https://github.com/servo/servo Source-Revision: ccdd2910a2df9921b22c9db74f84559d78019199
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
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};
|
||||
@@ -16,14 +15,14 @@ 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, document_from_node};
|
||||
use dom::node::{Node, NodeHelpers, ElementNodeTypeId, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom::window::Window;
|
||||
use page::IterablePage;
|
||||
|
||||
use servo_msg::constellation_msg::{PipelineId, SubpageId};
|
||||
use servo_msg::constellation_msg::{IFrameSandboxed, IFrameUnsandboxed};
|
||||
use servo_msg::constellation_msg::{ConstellationChan, LoadIframeUrlMsg};
|
||||
use servo_msg::constellation_msg::{ConstellationChan, ScriptLoadedURLInIFrameMsg};
|
||||
use servo_util::str::DOMString;
|
||||
|
||||
use std::ascii::StrAsciiExt;
|
||||
@@ -120,13 +119,8 @@ impl<'a> HTMLIFrameElementHelpers for JSRef<'a, HTMLIFrameElement> {
|
||||
subpage_id: subpage_id,
|
||||
}));
|
||||
|
||||
let doc = document_from_node(self).root();
|
||||
if doc.ReadyState() == DocumentReadyStateValues::Loading {
|
||||
// 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));
|
||||
}
|
||||
let ConstellationChan(ref chan) = page.constellation_chan;
|
||||
chan.send(ScriptLoadedURLInIFrameMsg(url, page.id, subpage_id, sandboxed));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user