From 3f85a27097549d15d52297d5e4e75fa9d52453c8 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Wed, 11 Dec 2024 13:58:37 +0100 Subject: script: Remove 'pending reflow' concept and some explicit reflows (#34558) The `pending reflow` concept isn't necessary now that *update the rendering* is taking care of triggering reflows at the correct time. `Window::reflow` already avoids reflows if the page is not dirty, so pending reflows is now just an extraneous check as long as *update the rendering* runs properly. This change also removes some explicit reflows, which now wait until the appropriate moment during *update the rendering*. This should remove some extra reflows that are not necessary. Servo needs some way to track that resizing the web view needs to re-layout due to the initial containing block changing. Move handling of `Document::needs_paint` to the script thread and use this, expanding the rustdoc to explain what it is for a bit more clearly. Signed-off-by: Martin Robinson --- components/script/dom/htmliframeelement.rs | 2 -- 1 file changed, 2 deletions(-) (limited to 'components/script/dom/htmliframeelement.rs') diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 904060df341..0e57e4ad26c 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -442,8 +442,6 @@ impl HTMLIFrameElement { } self.upcast::().dirty(NodeDamage::OtherNodeDamage); - let window = window_from_node(self); - window.add_pending_reflow(); } fn new_inherited( -- cgit v1.2.3