mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
script: Use more idiomatic code for resize handling.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
b319dedda9
commit
755697d6bb
1 changed files with 2 additions and 4 deletions
|
@ -725,10 +725,8 @@ impl ScriptThread {
|
||||||
|
|
||||||
for (id, document) in self.documents.borrow().iter() {
|
for (id, document) in self.documents.borrow().iter() {
|
||||||
// Only process a resize if layout is idle.
|
// Only process a resize if layout is idle.
|
||||||
let resize_event = document.window().steal_resize_event();
|
if let Some((size, size_type)) = document.window().steal_resize_event() {
|
||||||
match resize_event {
|
resizes.push((id, size, size_type));
|
||||||
Some((size, size_type)) => resizes.push((id, size, size_type)),
|
|
||||||
None => ()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue