mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
auto merge of #5113 : glennw/servo/fix-title, r=mbrubeck
Sometimes, the root pipeline title is sent before the compositor has created the root pipeline, so also request the main page title once the initial frame tree has been sent.
This commit is contained in:
commit
6927bf6ff0
1 changed files with 8 additions and 2 deletions
|
@ -288,6 +288,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
response_chan,
|
||||
new_constellation_chan);
|
||||
self.send_viewport_rects_for_all_layers();
|
||||
self.get_title_for_main_frame();
|
||||
}
|
||||
|
||||
(Msg::ChangeLayerPipelineAndRemoveChildren(old_pipeline, new_pipeline, response_channel),
|
||||
|
@ -431,8 +432,13 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
}
|
||||
}
|
||||
|
||||
fn change_page_title(&mut self, _: PipelineId, title: Option<String>) {
|
||||
self.window.set_page_title(title);
|
||||
fn change_page_title(&mut self, pipeline_id: PipelineId, title: Option<String>) {
|
||||
let set_title = self.root_pipeline.as_ref().map_or(false, |root_pipeline| {
|
||||
root_pipeline.id == pipeline_id
|
||||
});
|
||||
if set_title {
|
||||
self.window.set_page_title(title);
|
||||
}
|
||||
}
|
||||
|
||||
fn change_page_load_data(&mut self, _: FrameId, load_data: LoadData) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue