mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Send window size even when there is not top level browsing context yet
This commit is contained in:
parent
74249b6322
commit
88bf133d2a
3 changed files with 9 additions and 8 deletions
|
@ -646,10 +646,9 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
device_pixel_ratio: dppx,
|
||||
initial_viewport: initial_viewport,
|
||||
};
|
||||
let top_level_browsing_context_id = match self.root_pipeline {
|
||||
Some(ref pipeline) => pipeline.top_level_browsing_context_id,
|
||||
None => return warn!("Window resize without root pipeline."),
|
||||
};
|
||||
let top_level_browsing_context_id = self.root_pipeline.as_ref().map(|pipeline| {
|
||||
pipeline.top_level_browsing_context_id
|
||||
});
|
||||
let msg = ConstellationMsg::WindowSize(top_level_browsing_context_id, data, size_type);
|
||||
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue