mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #17709 - paulrouget:new_pipeline_before_add_pending_changes, r=cbrewster
always call new_pipeline() before add_pending_changes() There are some changes we want to make in `add_pending_changes` which require pipelines to be registered in self.pipelines. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17709) <!-- Reviewable:end -->
This commit is contained in:
commit
a287271486
1 changed files with 16 additions and 17 deletions
|
@ -1572,22 +1572,21 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
};
|
||||
|
||||
// Create the new pipeline, attached to the parent and push to pending changes
|
||||
self.add_pending_change(SessionHistoryChange {
|
||||
top_level_browsing_context_id: load_info.info.top_level_browsing_context_id,
|
||||
browsing_context_id: load_info.info.browsing_context_id,
|
||||
new_pipeline_id: load_info.info.new_pipeline_id,
|
||||
load_data: load_data.clone(),
|
||||
replace_instant: replace_instant,
|
||||
});
|
||||
|
||||
self.new_pipeline(load_info.info.new_pipeline_id,
|
||||
load_info.info.browsing_context_id,
|
||||
load_info.info.top_level_browsing_context_id,
|
||||
Some((load_info.info.parent_pipeline_id, load_info.info.frame_type)),
|
||||
window_size,
|
||||
load_data,
|
||||
load_data.clone(),
|
||||
load_info.sandbox,
|
||||
is_private);
|
||||
self.add_pending_change(SessionHistoryChange {
|
||||
top_level_browsing_context_id: load_info.info.top_level_browsing_context_id,
|
||||
browsing_context_id: load_info.info.browsing_context_id,
|
||||
new_pipeline_id: load_info.info.new_pipeline_id,
|
||||
load_data: load_data,
|
||||
replace_instant: replace_instant,
|
||||
});
|
||||
}
|
||||
|
||||
fn handle_script_new_iframe(&mut self,
|
||||
|
@ -1788,21 +1787,21 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
let new_pipeline_id = PipelineId::new();
|
||||
let sandbox = IFrameSandboxState::IFrameUnsandboxed;
|
||||
let replace_instant = if replace { Some(timestamp) } else { None };
|
||||
self.add_pending_change(SessionHistoryChange {
|
||||
top_level_browsing_context_id: top_level_id,
|
||||
browsing_context_id: browsing_context_id,
|
||||
new_pipeline_id: new_pipeline_id,
|
||||
load_data: load_data.clone(),
|
||||
replace_instant: replace_instant,
|
||||
});
|
||||
self.new_pipeline(new_pipeline_id,
|
||||
browsing_context_id,
|
||||
top_level_id,
|
||||
None,
|
||||
window_size,
|
||||
load_data,
|
||||
load_data.clone(),
|
||||
sandbox,
|
||||
false);
|
||||
self.add_pending_change(SessionHistoryChange {
|
||||
top_level_browsing_context_id: top_level_id,
|
||||
browsing_context_id: browsing_context_id,
|
||||
new_pipeline_id: new_pipeline_id,
|
||||
load_data: load_data,
|
||||
replace_instant: replace_instant,
|
||||
});
|
||||
Some(new_pipeline_id)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue