Skip to content

Commit

Permalink
script: Ignore redundant resize notifications.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed Nov 6, 2019
1 parent 7c365b0 commit 2aa5ddf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions components/script/script_thread.rs
Expand Up @@ -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);

Expand Down

0 comments on commit 2aa5ddf

Please sign in to comment.