diff --git a/Libraries/LibWeb/Animations/Animation.cpp b/Libraries/LibWeb/Animations/Animation.cpp index 53e126b731502..e85db81d071d0 100644 --- a/Libraries/LibWeb/Animations/Animation.cpp +++ b/Libraries/LibWeb/Animations/Animation.cpp @@ -1331,9 +1331,6 @@ void Animation::invalidate_effect() if (auto* target = m_effect->target(); target) { target->document().set_needs_animated_style_update(); - if (target->paintable()) { - target->paintable()->set_needs_display(); - } } } diff --git a/Libraries/LibWeb/Animations/KeyframeEffect.cpp b/Libraries/LibWeb/Animations/KeyframeEffect.cpp index f9c49e49c932c..d9d187bfc1d28 100644 --- a/Libraries/LibWeb/Animations/KeyframeEffect.cpp +++ b/Libraries/LibWeb/Animations/KeyframeEffect.cpp @@ -961,8 +961,10 @@ void KeyframeEffect::update_computed_properties() document.set_needs_layout(); if (invalidation.rebuild_layout_tree) document.invalidate_layout_tree(); - if (invalidation.repaint) + if (invalidation.repaint) { + document.set_needs_display(); document.set_needs_to_resolve_paint_only_properties(); + } if (invalidation.rebuild_stacking_context_tree) document.invalidate_stacking_context_tree(); } diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp index 68deb46991ca9..666021988fd4f 100644 --- a/Libraries/LibWeb/DOM/Document.cpp +++ b/Libraries/LibWeb/DOM/Document.cpp @@ -2646,9 +2646,6 @@ void Document::dispatch_events_for_animation_if_necessary(GC::Refpaintable()) - target->paintable()->set_needs_display(); - auto previous_phase = effect->previous_phase(); auto current_phase = effect->phase(); auto current_iteration = effect->current_iteration().value_or(0.0);