From 3edd22143d7ed96ca979604828ec9059d8700fc4 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Sun, 18 Aug 2024 21:59:08 +0200 Subject: [PATCH] LibWeb: Remove set_needs_display() from PageClient::ready_to_paint() There is no need to force repaint when client is ready for the next frame. We simply need to make sure HTML event loop processing is scheduled. --- Userland/Services/WebContent/PageClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Services/WebContent/PageClient.cpp b/Userland/Services/WebContent/PageClient.cpp index b9a52432d64..1ed46b7f3c6 100644 --- a/Userland/Services/WebContent/PageClient.cpp +++ b/Userland/Services/WebContent/PageClient.cpp @@ -72,7 +72,7 @@ void PageClient::ready_to_paint() if (old_paint_state == PaintState::PaintWhenReady) { // NOTE: Repainting always has to be scheduled from HTML event loop processing steps // to make sure style and layout are up-to-date. - page().top_level_traversable()->set_needs_display(); + Web::HTML::main_thread_event_loop().schedule(); } }