mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-05 08:31:51 +00:00
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:
parent
e5b107b6b6
commit
bd2488a468
Notes:
github-actions[bot]
2025-01-10 22:39:36 +00:00
Author: https://github.com/gmta
Commit: bd2488a468
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3216
2 changed files with 7 additions and 7 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue