mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Synchronously update the pipeline of same-origin iframe elements as soon as the child document begins parsing.
This commit is contained in:
parent
45619db0ba
commit
51ab14086c
1 changed files with 15 additions and 0 deletions
|
@ -2851,6 +2851,21 @@ impl ScriptThread {
|
||||||
|
|
||||||
window.init_document(&document);
|
window.init_document(&document);
|
||||||
|
|
||||||
|
// For any similar-origin iframe, ensure that the contentWindow/contentDocument
|
||||||
|
// APIs resolve to the new window/document as soon as parsing starts.
|
||||||
|
if let Some(frame) = window_proxy
|
||||||
|
.frame_element()
|
||||||
|
.and_then(|e| e.downcast::<HTMLIFrameElement>())
|
||||||
|
{
|
||||||
|
let parent_pipeline = frame.global().pipeline_id();
|
||||||
|
self.handle_update_pipeline_id(
|
||||||
|
parent_pipeline,
|
||||||
|
window_proxy.browsing_context_id(),
|
||||||
|
incomplete.pipeline_id,
|
||||||
|
UpdatePipelineIdReason::Navigation,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
self.script_sender
|
self.script_sender
|
||||||
.send((incomplete.pipeline_id, ScriptMsg::ActivateDocument))
|
.send((incomplete.pipeline_id, ScriptMsg::ActivateDocument))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue