From 8ebdd6d41e927143a5cd177df67784626fde2af6 Mon Sep 17 00:00:00 2001 From: Callum Law Date: Thu, 18 Jun 2026 20:54:37 +1200 Subject: [PATCH] LibWeb: Schedule rendering update on AVC only style change b583fd skipped display list invalidation for AVC only style changes which also meant that we no longer marked the navigable as needing a repaint or requested the next frame. This commit updates `set_needs_accumulated_visual_contexts_update` to do so. This makes the animation when hovering icons on https://chrede88.github.io/L1nkr paint intermediate frames not just the first and last. --- Libraries/LibWeb/DOM/Document.cpp | 7 +++++++ Libraries/LibWeb/DOM/Document.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp index 66edb4e983..a41a173e7d 100644 --- a/Libraries/LibWeb/DOM/Document.cpp +++ b/Libraries/LibWeb/DOM/Document.cpp @@ -8550,6 +8550,13 @@ void Document::set_needs_repaint(InvalidateDisplayList should_invalidate_display } } +void Document::set_needs_accumulated_visual_contexts_update(bool value) +{ + m_needs_accumulated_visual_contexts_update = value; + if (value) + set_needs_repaint(InvalidateDisplayList::No); +} + void Document::set_needs_to_record_display_list() { m_hit_test_display_list = nullptr; diff --git a/Libraries/LibWeb/DOM/Document.h b/Libraries/LibWeb/DOM/Document.h index 314fe1b639..9aabc4dec7 100644 --- a/Libraries/LibWeb/DOM/Document.h +++ b/Libraries/LibWeb/DOM/Document.h @@ -918,7 +918,7 @@ public: void record_full_style_invalidation() const; static void set_style_invalidation_counter_dump_interval(Optional); - void set_needs_accumulated_visual_contexts_update(bool value) { m_needs_accumulated_visual_contexts_update = value; } + void set_needs_accumulated_visual_contexts_update(bool); bool needs_accumulated_visual_contexts_update() const { return m_needs_accumulated_visual_contexts_update; } virtual JS::Value named_item_value(FlyString const& name) const override;