mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Dispatch load events for cross origin iframes. Resolves #6672.
This commit is contained in:
parent
2a125b5613
commit
c23cbd4163
23 changed files with 470 additions and 66 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue