浏览代码

LibWeb: Use Document::hidden() instead of comparing state to "hidden"

Just noticed this unnecessary string comparison in the rendering task.
Andreas Kling 9 月之前
父节点
当前提交
3536ba9a88
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp

+ 1 - 1
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