mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 11:36:10 +00:00
LibWeb: Avoid double dynamic_cast in parent_element_for_event_dispatch()
This commit is contained in:
parent
9a4a76ac5c
commit
f065dfb558
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue