mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-26 03:08:59 +00:00
LibWeb: Invalidate animated style even if target doesn't have paintable
...otherwise animated style invalidation will be skipped. This change is a preparation before applying latest HTML event loop procesing spec changes to avoid regressing our tests.
This commit is contained in:
parent
dc1a646764
commit
32e79bd12e
Notes:
github-actions[bot]
2024-10-04 05:08:09 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 32e79bd12e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1616
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/awesomekling
1 changed files with 7 additions and 3 deletions
|
@ -1330,9 +1330,13 @@ JS::NonnullGCPtr<WebIDL::Promise> Animation::current_finished_promise() const
|
|||
|
||||
void Animation::invalidate_effect()
|
||||
{
|
||||
if (m_effect) {
|
||||
if (auto target = m_effect->target(); target && target->paintable()) {
|
||||
target->document().set_needs_animated_style_update();
|
||||
if (!m_effect) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (auto* target = m_effect->target(); target) {
|
||||
target->document().set_needs_animated_style_update();
|
||||
if (target->paintable()) {
|
||||
target->paintable()->set_needs_display();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue