mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
update pipeline url after redirections
This commit is contained in:
parent
ea4206e362
commit
268e285439
7 changed files with 37 additions and 0 deletions
|
@ -622,6 +622,11 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
|
|||
debug!("constellation got activate document message");
|
||||
self.handle_activate_document_msg(pipeline_id);
|
||||
}
|
||||
// Update pipeline url after redirections
|
||||
Request::Script(FromScriptMsg::SetFinalUrl(pipeline_id, final_url)) => {
|
||||
debug!("constellation got set final url message");
|
||||
self.mut_pipeline(pipeline_id).url = final_url;
|
||||
}
|
||||
Request::Script(FromScriptMsg::MozBrowserEvent(pipeline_id,
|
||||
subpage_id,
|
||||
event)) => {
|
||||
|
|
|
@ -1648,6 +1648,10 @@ impl ScriptTask {
|
|||
// send the final url to the layout task.
|
||||
let LayoutChan(ref chan) = incomplete.layout_chan;
|
||||
chan.send(layout_interface::Msg::SetFinalUrl(final_url.clone())).unwrap();
|
||||
|
||||
// update the pipeline url
|
||||
let ConstellationChan(ref chan) = self.constellation_chan;
|
||||
chan.send(ConstellationMsg::SetFinalUrl(incomplete.pipeline_id, final_url.clone())).unwrap();
|
||||
}
|
||||
debug!("ScriptTask: loading {} on page {:?}", incomplete.url.serialize(), incomplete.pipeline_id);
|
||||
|
||||
|
|
|
@ -79,4 +79,6 @@ pub enum ScriptMsg {
|
|||
ActivateDocument(PipelineId),
|
||||
/// Set the document state for a pipeline (used by screenshot / reftests)
|
||||
SetDocumentState(PipelineId, DocumentState),
|
||||
/// Update the pipeline Url, which can change after redirections.
|
||||
SetFinalUrl(PipelineId, Url),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue