Text Fragments: Replace spec find-string-in-range algorithm with nsFind
.
nsFind
is updated in this patch to allow checking for word boundaries at the beginning and the end of the match pattern instead of only allowing to specify whether a whole word should be searched (ie., word boundary at start and end), or not (ie., no word boundary required at start and end).
This change does not affect the IDL interface and is only available from C++. It is tested by the scroll-to-text-fragment WPTs.
This patch also introduces some more verbose debug logging for the algorithm to find a text directive.
Differential Revision: https://phabricator.services.mozilla.com/D211029
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1897942
gecko-commit: a239855b02eaca9e5c04bc184ccc67c7eef5775a
gecko-reviewers: emilio