mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +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:
committed by
Andreas Kling
parent
d67d93f870
commit
e4d3a9aa68
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user