Text-Fragments: Replace find algorithm with nsfind
Categories
(Core :: DOM: Core & HTML, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox129 | --- | fixed |
People
(Reporter: jjaschke, Assigned: jjaschke)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
nsFind
is a much more robust and fast way of finding a string in a web page, which should replace the find algorithm given in the text fragments spec. Some small adjustments need to be made (nsFind only respects word boundaries on both ends, text fragments needs to set this separately).
Assignee | ||
Comment 1•1 month ago
|
||
This patch depends on bug 1897956, which contains some prerequisite code that needs to land to allow the tests here to pass.
Here is a try run with this patch rebased on top of the patch of bug 1897956.
Assignee | ||
Comment 2•1 month ago
|
||
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.
Pushed by jjaschke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a239855b02ea Text Fragments: Replace spec find-string-in-range algorithm with `nsFind`. r=emilio https://hg.mozilla.org/integration/autoland/rev/ec3fcdcbfbd7 1897956, 1898321: apply code formatting via Lando
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/46755 for changes under testing/web-platform/tests
Comment 5•15 days ago
|
||
Backed out 4 changesets (bug 1898321, bug 1897942, bug 1897956) for causing multiple failures.
Upstream PR merged by moz-wptsync-bot
Pushed by jjaschke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cc2126bec6e6 Text Fragments: Replace spec find-string-in-range algorithm with `nsFind`. r=emilio https://hg.mozilla.org/integration/autoland/rev/95850130fec8 1897956, 1898321: apply code formatting via Lando
Comment 8•10 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cc2126bec6e6
https://hg.mozilla.org/mozilla-central/rev/95850130fec8
Assignee | ||
Updated•10 days ago
|
Description
•