mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Dispatch pointer events to ::backdrop originating element
This commit is contained in:
parent
4b9f5c6fb8
commit
972547635f
Notes:
github-actions[bot]
2025-04-09 11:11:42 +00:00
Author: https://github.com/Gingeh
Commit: 972547635f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4263
Reviewed-by: https://github.com/AtkinsSJ ✅
7 changed files with 47 additions and 13 deletions
|
@ -66,6 +66,12 @@ static DOM::Node* input_control_associated_with_ancestor_label_element(Painting:
|
|||
|
||||
static bool parent_element_for_event_dispatch(Painting::Paintable& paintable, GC::Ptr<DOM::Node>& node, Layout::Node*& layout_node)
|
||||
{
|
||||
layout_node = &paintable.layout_node();
|
||||
if (layout_node->is_generated_for_backdrop_pseudo_element()) {
|
||||
node = layout_node->pseudo_element_generator();
|
||||
layout_node = node->layout_node();
|
||||
}
|
||||
|
||||
auto* current_ancestor_node = node.ptr();
|
||||
do {
|
||||
if (is<HTML::FormAssociatedElement>(current_ancestor_node) && !dynamic_cast<HTML::FormAssociatedElement*>(current_ancestor_node)->enabled()) {
|
||||
|
@ -73,7 +79,6 @@ static bool parent_element_for_event_dispatch(Painting::Paintable& paintable, GC
|
|||
}
|
||||
} while ((current_ancestor_node = current_ancestor_node->parent()));
|
||||
|
||||
layout_node = &paintable.layout_node();
|
||||
while (layout_node && node && !node->is_element() && layout_node->parent()) {
|
||||
layout_node = layout_node->parent();
|
||||
if (layout_node->is_anonymous())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue