aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index 848f964d2c0..8b9800063e2 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -1006,6 +1006,9 @@ impl ScriptTask {
self.handle_tick_all_animations(pipeline_id),
ConstellationControlMsg::WebFontLoaded(pipeline_id) =>
self.handle_web_font_loaded(pipeline_id),
+ ConstellationControlMsg::DispatchFrameLoadEvent {
+ target: pipeline_id, parent: containing_id } =>
+ self.handle_frame_load_event(containing_id, pipeline_id),
ConstellationControlMsg::GetCurrentState(sender, pipeline_id) => {
let state = self.handle_get_current_state(pipeline_id);
sender.send(state).unwrap();
@@ -1535,6 +1538,15 @@ impl ScriptTask {
}
}
+ /// Notify the containing document of a child frame that has completed loading.
+ fn handle_frame_load_event(&self, containing_pipeline: PipelineId, id: PipelineId) {
+ let page = get_page(&self.root_page(), containing_pipeline);
+ let document = page.document();
+ if let Some(iframe) = document.find_iframe_by_pipeline(id) {
+ iframe.iframe_load_event_steps();
+ }
+ }
+
/// The entry point to document loading. Defines bindings, sets up the window and document
/// objects, parses HTML and CSS, and kicks off initial layout.
fn load(&self, metadata: Metadata, incomplete: InProgressLoad) -> Root<ServoHTMLParser> {