mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Reset animated CSS properties for pseudo elements
Previously we were resetting animated properties if animation effect's target is not a pseudo element.
This commit is contained in:
parent
c5071c9025
commit
6a029fb6d9
Notes:
github-actions[bot]
2025-05-28 16:37:19 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 6a029fb6d9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4903
Reviewed-by: https://github.com/tcl3 ✅
6 changed files with 8 additions and 13 deletions
|
@ -941,6 +941,12 @@ void KeyframeEffect::update_computed_properties()
|
|||
return;
|
||||
|
||||
auto animated_properties_before_update = style->animated_property_values();
|
||||
if (!pseudo_element_type().has_value()) {
|
||||
if (auto computed_properties = target->computed_properties())
|
||||
computed_properties->reset_animated_properties({});
|
||||
} else if (auto computed_properties = target->pseudo_element_computed_properties(pseudo_element_type().value())) {
|
||||
computed_properties->reset_animated_properties({});
|
||||
}
|
||||
|
||||
auto& document = target->document();
|
||||
document.style_computer().collect_animation_into(*target, pseudo_element_type(), *this, *style, CSS::StyleComputer::AnimationRefresh::Yes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue