Skip to content

Commit 32e79bd

Browse files
kalenikaliaksandrawesomekling
authored andcommitted
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.
1 parent dc1a646 commit 32e79bd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Userland/Libraries/LibWeb/Animations/Animation.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,9 +1330,13 @@ JS::NonnullGCPtr<WebIDL::Promise> Animation::current_finished_promise() const
13301330

13311331
void Animation::invalidate_effect()
13321332
{
1333-
if (m_effect) {
1334-
if (auto target = m_effect->target(); target && target->paintable()) {
1335-
target->document().set_needs_animated_style_update();
1333+
if (!m_effect) {
1334+
return;
1335+
}
1336+
1337+
if (auto* target = m_effect->target(); target) {
1338+
target->document().set_needs_animated_style_update();
1339+
if (target->paintable()) {
13361340
target->paintable()->set_needs_display();
13371341
}
13381342
}

0 commit comments

Comments
 (0)