Skip to content

Commit 0baf068

Browse files
awesomeklinggmta
authored andcommitted
LibWeb: Remove redundant dynamic_cast in ~AnimationUpdateContext()
1 parent 775d15c commit 0baf068

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Libraries/LibWeb/Animations/AnimationEffect.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -678,10 +678,8 @@ AnimationUpdateContext::~AnimationUpdateContext()
678678
if (target->layout_node())
679679
target->layout_node()->apply_style(*style);
680680
} else {
681-
auto pseudo_element_node = target->get_pseudo_element_node(element.pseudo_element().value());
682-
if (auto* node_with_style = dynamic_cast<Layout::NodeWithStyle*>(pseudo_element_node.ptr())) {
683-
node_with_style->apply_style(*style);
684-
}
681+
if (auto pseudo_element_node = target->get_pseudo_element_node(element.pseudo_element().value()))
682+
pseudo_element_node->apply_style(*style);
685683
}
686684

687685
if (invalidation.relayout && target->layout_node())

0 commit comments

Comments
 (0)