mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Avoid double dynamic_cast in parent_element_for_event_dispatch()
This commit is contained in:
parent
877391d569
commit
207afb0d3b
|
|
@ -74,7 +74,8 @@ static bool parent_element_for_event_dispatch(Painting::Paintable& paintable, GC
|
|||
|
||||
auto* current_ancestor_node = node.ptr();
|
||||
do {
|
||||
if (is<HTML::FormAssociatedElement>(current_ancestor_node) && !dynamic_cast<HTML::FormAssociatedElement*>(current_ancestor_node)->enabled()) {
|
||||
auto const* form_associated_element = as_if<HTML::FormAssociatedElement>(current_ancestor_node);
|
||||
if (form_associated_element && !form_associated_element->enabled()) {
|
||||
return false;
|
||||
}
|
||||
} while ((current_ancestor_node = current_ancestor_node->parent()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user