Create initial browser id for compositor on startup.

This commit is contained in:
Josh Matthews 2021-10-16 11:10:25 -04:00
parent 74f1eb199e
commit 6b50d7025c
7 changed files with 47 additions and 39 deletions

View file

@ -4983,7 +4983,7 @@ where
/// Called when the window is resized.
fn handle_window_size_msg(
&mut self,
top_level_browsing_context_id: Option<TopLevelBrowsingContextId>,
top_level_browsing_context_id: TopLevelBrowsingContextId,
new_size: WindowSizeData,
size_type: WindowSizeType,
) {
@ -4992,10 +4992,8 @@ where
new_size.initial_viewport.to_untyped()
);
if let Some(top_level_browsing_context_id) = top_level_browsing_context_id {
let browsing_context_id = BrowsingContextId::from(top_level_browsing_context_id);
self.resize_browsing_context(new_size, size_type, browsing_context_id);
}
let browsing_context_id = BrowsingContextId::from(top_level_browsing_context_id);
self.resize_browsing_context(new_size, size_type, browsing_context_id);
if let Some(resize_channel) = self.webdriver.resize_channel.take() {
let _ = resize_channel.send(new_size);