mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
LibWeb/CSS: Don't assume that animations have an associated effect
... when computing properties.
This commit is contained in:
parent
c39ef2a738
commit
a2ab3769f4
Notes:
github-actions[bot]
2024-12-25 16:15:08 +00:00
Author: https://github.com/LucasChollet Commit: https://github.com/LadybirdBrowser/ladybird/commit/a2ab3769f47 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3024
1 changed files with 5 additions and 1 deletions
|
@ -1125,6 +1125,9 @@ void StyleComputer::collect_animation_into(DOM::Element& element, Optional<CSS::
|
|||
|
||||
static void apply_animation_properties(DOM::Document& document, CascadedProperties& cascaded_properties, Animations::Animation& animation)
|
||||
{
|
||||
if (!animation.effect())
|
||||
return;
|
||||
|
||||
auto& effect = verify_cast<Animations::KeyframeEffect>(*animation.effect());
|
||||
|
||||
Optional<CSS::Time> duration;
|
||||
|
@ -2410,7 +2413,8 @@ GC::Ref<ComputedProperties> StyleComputer::compute_properties(DOM::Element& elem
|
|||
animation->play().release_value_but_fixme_should_propagate_errors();
|
||||
} else {
|
||||
// The animation hasn't changed, but some properties of the animation may have
|
||||
apply_animation_properties(m_document, cascaded_properties, *element.cached_animation_name_animation(pseudo_element));
|
||||
if (auto animation = element.cached_animation_name_animation(pseudo_element); animation)
|
||||
apply_animation_properties(m_document, cascaded_properties, *animation);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue