LibWeb: Remove redundant dynamic_cast in ~AnimationUpdateContext()

This commit is contained in:
Andreas Kling 2025-08-19 11:27:52 +02:00 committed by Jelle Raaijmakers
parent 775d15c115
commit 0baf068bbf

View File

@ -678,10 +678,8 @@ AnimationUpdateContext::~AnimationUpdateContext()
if (target->layout_node()) if (target->layout_node())
target->layout_node()->apply_style(*style); target->layout_node()->apply_style(*style);
} else { } else {
auto pseudo_element_node = target->get_pseudo_element_node(element.pseudo_element().value()); if (auto pseudo_element_node = target->get_pseudo_element_node(element.pseudo_element().value()))
if (auto* node_with_style = dynamic_cast<Layout::NodeWithStyle*>(pseudo_element_node.ptr())) { pseudo_element_node->apply_style(*style);
node_with_style->apply_style(*style);
}
} }
if (invalidation.relayout && target->layout_node()) if (invalidation.relayout && target->layout_node())