diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-09-27 13:49:09 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-09-27 13:56:33 +0200 |
commit | a12f2b9f06183d0f2a0b7e32fa38eda4984707fa (patch) | |
tree | d55a49d3a6a1156e67ca97035cad207c5931398a /components/script/script_task.rs | |
parent | a2220f1ea41a909c3e048f97e24eec08b66eb608 (diff) | |
download | servo-a12f2b9f06183d0f2a0b7e32fa38eda4984707fa.tar.gz servo-a12f2b9f06183d0f2a0b7e32fa38eda4984707fa.zip |
Simplify the Page URL handling in handle_resize_inactive_msg.
This also makes it more obvious what's actually happening.
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r-- | components/script/script_task.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 33f7c8eb793..b0c40c6ee39 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -651,10 +651,9 @@ impl ScriptTask { let page = page.find(id).expect("Received resize message for PipelineId not associated with a page in the page tree. This is a bug."); page.window_size.deref().set(new_size); - let mut page_url = page.mut_url(); - let last_loaded_url = replace(&mut *page_url, None); - for url in last_loaded_url.iter() { - *page_url = Some((url.ref0().clone(), true)); + match &mut *page.mut_url() { + &Some((_, ref mut needs_reflow)) => *needs_reflow = true, + &None => (), } } |