Text Fragments: It's not possible to create a range based text directive if start and end are equal and can't expand
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox153 | --- | fixed |
People
(Reporter: jjaschke, Assigned: jjaschke)
Details
Attachments
(2 files)
STR: Open attached file, select all, click Copy Link to Highlight
Expected Results: the valid text directive is :~:text=test,test
Actual Results: The algorithm fails to create a text directive.
Analysis:
This happens because RangeBasedTextDirectiveCreator::FindAllMatchingCandidates() uses the start point of the target range as search start for finding all matches for the end word. If the start word is the same as the end word, it is a match. However, the spec mandates that the search starts at the end of the start content ("potentialMatch"). If the end word can't be expanded (nothing else inside the range, and end of document/no suffix possible), this would be ambiguous and the algorithm bails.
| Assignee | ||
Comment 1•21 days ago
|
||
Comment 2•10 days ago
|
||
There is an r+ patch which didn't land and no activity in this bug for 1 week.
:jjaschke, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•10 days ago
|
Comment 4•7 days ago
|
||
| bugherder | ||
Description
•