mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 08:59:50 +00:00
LibWeb: Pass existing DOM::BoundaryPoints in delete_the_selection()
This commit is contained in:
parent
9b614eebb3
commit
c557db8315
Notes:
github-actions[bot]
2025-09-16 10:58:42 +00:00
Author: https://github.com/gmta
Commit: c557db8315
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6203
Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 1 additions and 1 deletions
|
|
@ -707,7 +707,7 @@ void delete_the_selection(Selection& selection, bool block_merging, bool strip_w
|
|||
auto end = first_equivalent_point(active_range(document)->end());
|
||||
|
||||
// 6. If (end node, end offset) is not after (start node, start offset):
|
||||
auto relative_position = DOM::position_of_boundary_point_relative_to_other_boundary_point({ end.node, end.offset }, { start.node, start.offset });
|
||||
auto relative_position = DOM::position_of_boundary_point_relative_to_other_boundary_point(end, start);
|
||||
if (relative_position != DOM::RelativeBoundaryPointPosition::After) {
|
||||
// 1. If direction is "forward", call collapseToStart() on the context object's selection.
|
||||
if (direction == Selection::Direction::Forwards) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue