mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
LibWeb: Set animation update flag from Animation::invalidate_effect()
Fixes regressed animation tests.
This commit is contained in:
parent
aad110ec7e
commit
42d5883d57
Notes:
sideshowbarker
2024-07-17 02:21:14 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/42d5883d57 Pull-request: https://github.com/SerenityOS/serenity/pull/23665 Reviewed-by: https://github.com/trflynn89 ✅
3 changed files with 4 additions and 3 deletions
|
@ -1316,8 +1316,10 @@ JS::NonnullGCPtr<WebIDL::Promise> Animation::current_finished_promise() const
|
||||||
void Animation::invalidate_effect()
|
void Animation::invalidate_effect()
|
||||||
{
|
{
|
||||||
if (m_effect) {
|
if (m_effect) {
|
||||||
if (auto target = m_effect->target(); target && target->paintable())
|
if (auto target = m_effect->target(); target && target->paintable()) {
|
||||||
|
target->document().set_needs_animated_style_update();
|
||||||
target->paintable()->set_needs_display();
|
target->paintable()->set_needs_display();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4064,8 +4064,6 @@ void Document::ensure_animation_timer()
|
||||||
for (auto& animation : timeline->associated_animations())
|
for (auto& animation : timeline->associated_animations())
|
||||||
dispatch_events_for_animation_if_necessary(animation);
|
dispatch_events_for_animation_if_necessary(animation);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_needs_animated_style_update = true;
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -597,6 +597,7 @@ public:
|
||||||
JS::GCPtr<Element const> scrolling_element() const;
|
JS::GCPtr<Element const> scrolling_element() const;
|
||||||
|
|
||||||
void set_needs_to_resolve_paint_only_properties() { m_needs_to_resolve_paint_only_properties = true; }
|
void set_needs_to_resolve_paint_only_properties() { m_needs_to_resolve_paint_only_properties = true; }
|
||||||
|
void set_needs_animated_style_update() { m_needs_animated_style_update = true; }
|
||||||
|
|
||||||
virtual WebIDL::ExceptionOr<JS::Value> named_item_value(FlyString const& name) const override;
|
virtual WebIDL::ExceptionOr<JS::Value> named_item_value(FlyString const& name) const override;
|
||||||
virtual Vector<FlyString> supported_property_names() const override;
|
virtual Vector<FlyString> supported_property_names() const override;
|
||||||
|
|
Loading…
Reference in a new issue