mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Only handle most recent resize event in script thread (#33297)
This avoids having to do unnecessary layout work and prevents resize events from accumulating, which looks weird. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
fc5f8e9237
commit
961fcfc46d
2 changed files with 10 additions and 8 deletions
|
@ -1688,7 +1688,7 @@ impl ScriptThread {
|
|||
// TODO(#31665): Implement the "run the scroll steps" from
|
||||
// https://drafts.csswg.org/cssom-view/#document-run-the-scroll-steps.
|
||||
|
||||
for (size, size_type) in document.window().steal_resize_events().into_iter() {
|
||||
if let Some((size, size_type)) = document.window().take_unhandled_resize_event() {
|
||||
// Resize steps.
|
||||
self.run_the_resize_steps(pipeline_id, size, size_type);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue