aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2019-11-06 16:13:08 -0500
committerJosh Matthews <josh@joshmatthews.net>2019-11-06 16:13:55 -0500
commit2aa5ddf9221b77a6144391eb37855737a9ede083 (patch)
tree2ac9c12ceb00b5558b01ceae9845e2d4858ef3f3 /components/script/script_thread.rs
parent7c365b0324b2723d5df2437e59555bfc1835a68f (diff)
downloadservo-2aa5ddf9221b77a6144391eb37855737a9ede083.tar.gz
servo-2aa5ddf9221b77a6144391eb37855737a9ede083.zip
script: Ignore redundant resize notifications.
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 6a7a69651e7..fec8c878012 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -3696,6 +3696,15 @@ impl ScriptThread {
};
let window = document.window();
+ if window.window_size() == new_size {
+ return;
+ }
+ debug!(
+ "resizing pipeline {:?} from {:?} to {:?}",
+ pipeline_id,
+ window.window_size(),
+ new_size
+ );
window.set_window_size(new_size);
window.force_reflow(ReflowGoal::Full, ReflowReason::WindowResize);