Closed Bug 1951362 Opened 1 year ago Closed 1 year ago

Text-Fragments: Consider prefix context terms correctly for range-based text directive

Categories

(Core :: DOM: Selection, defect)

defect

Tracking

()

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: jjaschke, Assigned: jjaschke)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When creating a text fragment that spans over block boundaries, range-based text directives need to be used (prefix-,start,end,-suffix). Currently, logic for adding the correct prefix is broken, which leads to the first occurrence of start being used. This behavior can be seen in bug 1948506.

At first, this was resolved as patch 2 in bug 1948211. However, part 1 of that patch set needs more work, therefore I'm moving this into its own bug that can be landed first.

For range-based matching, the previous matches were determined incorrectly:
The start match must be matched until the end of the start of the target range,
and the end match must be matched until the end of the end of the target rage.

Before this change, the start of the target range was always considered as a
match to eliminate, therefore producing wrong results.

Pushed by jjaschke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aa91bcae0e42 Text Fragments: Correctly consider prefixes for range-based matching. r=dom-core,farre
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
Regressions: 1953686
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: