Bug 1600267: part 4) Call ComparePoints instead of ComparePoints_Deprecated in FilteredContentIterator. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D55298

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mirko Brodesser 2019-12-19 13:27:35 +00:00
parent 575a1d78d3
commit e51df4cb8e

View File

@ -225,11 +225,12 @@ static bool ContentIsInTraversalRange(nsIContent* aContent, bool aIsPreMode,
if (!aIsPreMode) ++indx;
int32_t startRes = nsContentUtils::ComparePoints_Deprecated(
const Maybe<int32_t> startRes = nsContentUtils::ComparePoints(
aStartContainer, aStartOffset, parentNode, indx);
int32_t endRes = nsContentUtils::ComparePoints_Deprecated(
const Maybe<int32_t> endRes = nsContentUtils::ComparePoints(
aEndContainer, aEndOffset, parentNode, indx);
return (startRes <= 0) && (endRes >= 0);
return !NS_WARN_IF(!startRes || !endRes) && (*startRes <= 0) &&
(*endRes >= 0);
}
static bool ContentIsInTraversalRange(nsRange* aRange, nsIContent* aNextContent,