LibWeb: Add explicit "active range" editing algorithm

This makes some of the spec implementations easier to follow and makes
it extra clear that the range is optional.
This commit is contained in:
Jelle Raaijmakers 2025-01-07 23:00:06 +01:00 committed by Andreas Kling
parent 2987dd1060
commit 85abad30b0
Notes: github-actions[bot] 2025-01-10 22:38:46 +00:00
2 changed files with 26 additions and 15 deletions

View file

@ -31,6 +31,7 @@ using Selection::Selection;
// Below algorithms are specified here:
// https://w3c.github.io/editing/docs/execCommand/#assorted-common-algorithms
GC::Ptr<DOM::Range> active_range(DOM::Document const&);
GC::Ref<DOM::Range> block_extend_a_range(GC::Ref<DOM::Range>);
GC::Ptr<DOM::Node> block_node_of_node(GC::Ref<DOM::Node>);
String canonical_space_sequence(u32 length, bool non_breaking_start, bool non_breaking_end);