mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Merge pull request #3503 from Ms2ger/page-url
Simplify the Page URL handling in handle_resize_inactive_msg. Reviewed-by: jdm
This commit is contained in:
commit
1b5fac5bde
1 changed files with 3 additions and 4 deletions
|
@ -651,10 +651,9 @@ impl ScriptTask {
|
||||||
let page = page.find(id).expect("Received resize message for PipelineId not associated
|
let page = page.find(id).expect("Received resize message for PipelineId not associated
|
||||||
with a page in the page tree. This is a bug.");
|
with a page in the page tree. This is a bug.");
|
||||||
page.window_size.deref().set(new_size);
|
page.window_size.deref().set(new_size);
|
||||||
let mut page_url = page.mut_url();
|
match &mut *page.mut_url() {
|
||||||
let last_loaded_url = replace(&mut *page_url, None);
|
&Some((_, ref mut needs_reflow)) => *needs_reflow = true,
|
||||||
for url in last_loaded_url.iter() {
|
&None => (),
|
||||||
*page_url = Some((url.ref0().clone(), true));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue