diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 68d0b4a2f16..80df1a4d003 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -3670,9 +3670,6 @@ impl Document { if self.has_pending_input_events() { return true; } - if self.has_resize_observers() { - return true; - } if self.window().has_unhandled_resize_event() { return true; } diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index ce4c74d28ae..6c77be8c9ad 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1377,12 +1377,10 @@ impl ScriptThread { fn maybe_schedule_rendering_opportunity_after_rendering_update(&self, saw_any_reflows: bool) { // If there are any pending reflows and we are not having rendering opportunities // immediately after running "update the rendering," run it one more time. - if self - .documents - .borrow() - .iter() - .any(|(_, document)| document.needs_rendering_update()) - { + if self.documents.borrow().iter().any(|(_, document)| { + document.needs_rendering_update() || + (saw_any_reflows && document.has_resize_observers()) + }) { self.cancel_scheduled_update_the_rendering(); self.schedule_update_the_rendering_timer_if_necessary(Duration::ZERO); }