LibWeb/DOM: Implement 'find flattened slottables'

Returning a Vector of Slottable is not very nice here, but this
matches find_slottable (which this calls), and as far as I can
tell this is technically 'safe' at the moment in the way in
which it is / will be called.

It's also not great that like find_slottable it takes a non-const
ref, but changing that causes a bunch of other fallout.
This commit is contained in:
Shannon Booth 2025-05-03 16:34:50 +12:00 committed by Shannon Booth
commit 2d6b11c8cb
Notes: github-actions[bot] 2025-05-19 11:27:20 +00:00
2 changed files with 50 additions and 0 deletions

View file

@ -57,6 +57,7 @@ bool is_an_assigned_slottable(GC::Ref<Node>);
GC::Ptr<HTML::HTMLSlotElement> find_a_slot(Slottable const&, OpenFlag = OpenFlag::Unset);
Vector<Slottable> find_slottables(GC::Ref<HTML::HTMLSlotElement>);
Vector<Slottable> find_flattened_slottables(GC::Ref<HTML::HTMLSlotElement>);
void assign_slottables(GC::Ref<HTML::HTMLSlotElement>);
void assign_slottables_for_a_tree(GC::Ref<Node>);
void assign_a_slot(Slottable const&);