From 01058dac954c00bcecbcc91bdc005c0d1d0c913c Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Tue, 21 Nov 2023 15:18:56 +0100 Subject: [PATCH] LibWeb: Skip execution of painting commands with empty bounding rect --- Userland/Libraries/LibWeb/Painting/RecordingPainter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Painting/RecordingPainter.cpp b/Userland/Libraries/LibWeb/Painting/RecordingPainter.cpp index c1cb7370c6..1d4a0c1c8e 100644 --- a/Userland/Libraries/LibWeb/Painting/RecordingPainter.cpp +++ b/Userland/Libraries/LibWeb/Painting/RecordingPainter.cpp @@ -420,7 +420,7 @@ void RecordingPainter::execute(PaintingCommandExecutor& executor) while (next_command_index < m_painting_commands.size()) { auto& command = m_painting_commands[next_command_index++]; auto bounding_rect = command_bounding_rectangle(command); - if (bounding_rect.has_value() && executor.would_be_fully_clipped_by_painter(*bounding_rect)) { + if (bounding_rect.has_value() && (bounding_rect->is_empty() || executor.would_be_fully_clipped_by_painter(*bounding_rect))) { continue; }