From 672ff7e45e761734cdf6bb0414cb6913da4b3d24 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Tue, 6 Aug 2024 22:30:15 +0300 Subject: [PATCH] LibWeb: Define bounding rect for AddMask display list item This allows display list player to skip masks that would not be visible. --- Userland/Libraries/LibWeb/Painting/Command.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibWeb/Painting/Command.h b/Userland/Libraries/LibWeb/Painting/Command.h index be22bfc51e1..17660bba2b1 100644 --- a/Userland/Libraries/LibWeb/Painting/Command.h +++ b/Userland/Libraries/LibWeb/Painting/Command.h @@ -353,6 +353,8 @@ struct AddMask { RefPtr display_list; Gfx::IntRect rect; + [[nodiscard]] Gfx::IntRect bounding_rect() const { return rect; } + void translate_by(Gfx::IntPoint const& offset) { rect.translate_by(offset);