diff --git a/Libraries/LibWeb/Editing/Internal/Algorithms.cpp b/Libraries/LibWeb/Editing/Internal/Algorithms.cpp index 75d09b4ef9d..85f3c828aae 100644 --- a/Libraries/LibWeb/Editing/Internal/Algorithms.cpp +++ b/Libraries/LibWeb/Editing/Internal/Algorithms.cpp @@ -38,13 +38,13 @@ namespace Web::Editing { // https://w3c.github.io/editing/docs/execCommand/#block-extend -GC::Ref block_extend_a_range(DOM::Range& range) +GC::Ref block_extend_a_range(GC::Ref range) { // 1. Let start node, start offset, end node, and end offset be the start and end nodes and offsets of range. - GC::Ptr start_node = range.start_container(); - auto start_offset = range.start_offset(); - GC::Ptr end_node = range.end_container(); - auto end_offset = range.end_offset(); + GC::Ptr start_node = range->start_container(); + auto start_offset = range->start_offset(); + GC::Ptr 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. diff --git a/Libraries/LibWeb/Editing/Internal/Algorithms.h b/Libraries/LibWeb/Editing/Internal/Algorithms.h index eb9ab2338a8..7a2dd05256d 100644 --- a/Libraries/LibWeb/Editing/Internal/Algorithms.h +++ b/Libraries/LibWeb/Editing/Internal/Algorithms.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Jelle Raaijmakers + * Copyright (c) 2024-2025, Jelle Raaijmakers * * SPDX-License-Identifier: BSD-2-Clause */ @@ -31,7 +31,7 @@ using Selection::Selection; // Below algorithms are specified here: // https://w3c.github.io/editing/docs/execCommand/#assorted-common-algorithms -GC::Ref block_extend_a_range(DOM::Range&); +GC::Ref block_extend_a_range(GC::Ref); GC::Ptr block_node_of_node(GC::Ref); String canonical_space_sequence(u32 length, bool non_breaking_start, bool non_breaking_end); void canonicalize_whitespace(DOM::BoundaryPoint, bool fix_collapsed_space = true);