Bug 1932150 - Allow using flat tree order for point comparing in selection r=jjaschke,smaug,dom-core

Differential Revision: https://phabricator.services.mozilla.com/D231588
This commit is contained in:
Sean Feng
2025-05-07 15:05:09 +00:00
committed by sefeng@mozilla.com
parent 793c2453f1
commit 2ba73e1639
11 changed files with 363 additions and 127 deletions

View File

@@ -5063,7 +5063,8 @@ nsRect PresShell::ClipListToRange(nsDisplayListBuilder* aBuilder,
// if the node is within the range, append it to the temporary list
bool before, after;
nsresult rv =
RangeUtils::CompareNodeToRange(content, aRange, &before, &after);
RangeUtils::CompareNodeToRange<TreeKind::ShadowIncludingDOM>(
content, aRange, &before, &after);
if (NS_SUCCEEDED(rv) && !before && !after) {
itemToInsert = i;
bool snap;