mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Ensures that iframe navigation updates the parent iframe element subpage id.
This fixes the case of clicking a link in an iframe, going back, then clicking the link again.
This commit is contained in:
parent
5ce7d8accf
commit
06a79243a7
4 changed files with 40 additions and 0 deletions
|
@ -608,6 +608,16 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
|
|||
// Set paint permissions correctly for the compositor layers.
|
||||
self.revoke_paint_permission(prev_pipeline_id);
|
||||
self.send_frame_tree_and_grant_paint_permission();
|
||||
|
||||
// Update the owning iframe to point to the new subpage id.
|
||||
// This makes things like contentDocument work correctly.
|
||||
if let Some((parent_pipeline_id, subpage_id)) = pipeline_info {
|
||||
let ScriptControlChan(ref script_chan) = self.pipeline(parent_pipeline_id).script_chan;
|
||||
let (_, new_subpage_id) = self.pipeline(next_pipeline_id).parent_info.unwrap();
|
||||
script_chan.send(ConstellationControlMsg::UpdateSubpageId(parent_pipeline_id,
|
||||
subpage_id,
|
||||
new_subpage_id)).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_key_msg(&self, key: Key, state: KeyState, mods: KeyModifiers) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue