Browse Source

LibWeb: Don't call flush() when no surface is passed in execute_impl()

`DisplayListPlayer::execute_impl()` can receive null surface if it was
invoked to rasterize nested display lists (we use them for iframes). In
this case we should not call `flush()` by the end of execution and wait
until outer display list execution will do that.
Aliaksandr Kalenik 1 week ago
parent
commit
cf143cf118
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Libraries/LibWeb/Painting/DisplayList.cpp

+ 2 - 1
Libraries/LibWeb/Painting/DisplayList.cpp

@@ -150,7 +150,8 @@ void DisplayListPlayer::execute_impl(DisplayList& display_list, RefPtr<Gfx::Pain
         // clang-format on
     }
 
-    flush();
+    if (surface)
+        flush();
 }
 
 }