LibWeb: Make block_extend_a_range() take a GC::Ref for the range

This makes it more consistent with the other signatures.
This commit is contained in:
Jelle Raaijmakers 2025-01-07 12:52:15 +01:00 committed by Andreas Kling
parent e5b107b6b6
commit bd2488a468
Notes: github-actions[bot] 2025-01-10 22:39:36 +00:00
2 changed files with 7 additions and 7 deletions

View file

@ -38,13 +38,13 @@
namespace Web::Editing {
// https://w3c.github.io/editing/docs/execCommand/#block-extend
GC::Ref<DOM::Range> block_extend_a_range(DOM::Range& range)
GC::Ref<DOM::Range> block_extend_a_range(GC::Ref<DOM::Range> range)
{
// 1. Let start node, start offset, end node, and end offset be the start and end nodes and offsets of range.
GC::Ptr<DOM::Node> start_node = range.start_container();
auto start_offset = range.start_offset();
GC::Ptr<DOM::Node> end_node = range.end_container();
auto end_offset = range.end_offset();
GC::Ptr<DOM::Node> start_node = range->start_container();
auto start_offset = range->start_offset();
GC::Ptr<DOM::Node> end_node = range->end_container();
auto end_offset = range->end_offset();
// 2. If some inclusive ancestor of start node is an li, set start offset to the index of the last such li in tree
// order, and set start node to that li's parent.