From 3536ba9a88892a27410b7a6fea393fdc60e9dd55 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 25 Oct 2024 09:58:45 +0200 Subject: [PATCH] LibWeb: Use Document::hidden() instead of comparing state to "hidden" Just noticed this unnecessary string comparison in the rendering task. --- Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp index d98e9795158..c6f0742264d 100644 --- a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp +++ b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp @@ -273,7 +273,7 @@ void EventLoop::update_the_rendering() // FIXME: doc is render-blocked; // doc's visibility state is "hidden"; - if (document->visibility_state() == "hidden"sv) + if (document->hidden()) return true; // FIXME: doc's rendering is suppressed for view transitions; or