LibWeb: Add concept of boundary point to DOM::AbstractRange

This makes comparing the relative position of boundary points a bit
nicer when one of the boundary points is the range's start or end.
This commit is contained in:
Jelle Raaijmakers 2024-12-18 13:30:19 +01:00 committed by Jelle Raaijmakers
commit e6631a4216
Notes: github-actions[bot] 2024-12-21 18:17:22 +00:00
7 changed files with 88 additions and 102 deletions

View file

@ -65,7 +65,7 @@ bool command_delete_action(DOM::Document& document, String const&)
}
// 2. Canonicalize whitespace at the active range's start.
canonicalize_whitespace(active_range.start_container(), active_range.start_offset());
canonicalize_whitespace(active_range.start());
// 3. Let node and offset be the active range's start node and offset.
GC::Ptr<DOM::Node> node = active_range.start_container();