mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibWeb: Ensure DOM events on slottables are properly propagated
Most events on a slottable are composed, meaning they propagate from the slottable and through its shadow tree before bubbling up to the parent of the slottable.
This commit is contained in:
parent
d67d93f870
commit
e4d3a9aa68
2 changed files with 32 additions and 7 deletions
|
@ -929,7 +929,11 @@ void Node::detach_layout_node(Badge<Layout::TreeBuilder>)
|
|||
|
||||
EventTarget* Node::get_parent(Event const&)
|
||||
{
|
||||
// FIXME: returns the node’s assigned slot, if node is assigned, and node’s parent otherwise.
|
||||
// A node’s get the parent algorithm, given an event, returns the node’s assigned slot, if node is assigned;
|
||||
// otherwise node’s parent.
|
||||
if (auto assigned_slot = assigned_slot_for_node(*this))
|
||||
return assigned_slot.ptr();
|
||||
|
||||
return parent();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue