LibWeb: Invalidate the display list when calling set_needs_display()

Calls to `Document::set_needs_display()` and
`Paintable::set_needs_display()` now invalidate the display list by
default. This behavior can be changed by passing
`InvalidateDisplayList::No` to the function where invalidating the
display list is not necessary.
This commit is contained in:
Tim Ledbetter 2024-09-02 16:47:32 +01:00 committed by Alexander Kalenik
commit 5800b7e884
Notes: github-actions[bot] 2024-09-02 18:13:03 +00:00
12 changed files with 53 additions and 28 deletions

View file

@ -35,6 +35,7 @@
#include <LibWeb/HTML/SandboxingFlagSet.h>
#include <LibWeb/HTML/Scripting/Environments.h>
#include <LibWeb/HTML/VisibilityState.h>
#include <LibWeb/InvalidateDisplayList.h>
#include <LibWeb/WebIDL/ExceptionOr.h>
#include <LibWeb/WebIDL/ObservableArray.h>
@ -700,8 +701,8 @@ public:
void set_cached_navigable(JS::GCPtr<HTML::Navigable>);
[[nodiscard]] bool needs_repaint() const { return m_needs_repaint; }
void set_needs_display();
void set_needs_display(CSSPixelRect const&);
void set_needs_display(InvalidateDisplayList = InvalidateDisplayList::Yes);
void set_needs_display(CSSPixelRect const&, InvalidateDisplayList = InvalidateDisplayList::Yes);
struct PaintConfig {
bool paint_overlay { false };