浏览代码

LibWeb: Reschedule HTML event loop processing if navigable needs repaint

This is an attempt to fix the hanging CI on macOS caused by some
screenshot requests being stuck unprocessed. With this change, we at
least make sure that the HTML event loop processing, which triggers
repainting, will happen as long as there are navigables that need to be
repainted.
Aliaksandr Kalenik 1 年之前
父节点
当前提交
72b4d44d07
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp

+ 2 - 0
Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp

@@ -207,6 +207,8 @@ void EventLoop::process()
     //         loop processing.
     for_each_fully_active_document_in_docs([&](DOM::Document& document) {
         auto navigable = document.navigable();
+        if (navigable && !navigable->has_a_rendering_opportunity() && navigable->needs_repaint())
+            schedule();
         if (navigable && navigable->has_a_rendering_opportunity())
             return;
         auto* browsing_context = document.browsing_context();