Hi Jan. Would you be able to answer some questions about overlapping custom highlight ranges? 1. As I understand it, custom highlight ranges can overlap. Does this mean that there can be overlapping ranges within a single Highlight object (and thus a single dom::Selection), ranges in different Highlight objects (and thus different dom::Selections), or both? 2. [This comment in the DOM code](https://searchfox.org/mozilla-central/rev/e24277e20c492b4a785b4488af02cca062ec7c2c/dom/base/Selection.h#823) suggests that "overlapping ranges are disallowed". This was done all the way back in bug 348681. Is that no longer true and this comment is just out of date? Or is there something I'm missing here? 3. As I understand it, ranges are sorted within a dom::Selection and GetAbstractRangesForIntervalArray returns a sorted array of ranges. How then are overlapping ranges handled? Are they sorted by start offset only? Or are they sorted by end offset? Or something else? Anything else you think might be relevant regarding overlapping ranges would also be super helpful. Thanks!
Bug 1909142 Comment 1 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Hi Jan. Would you be able to answer some questions about overlapping custom highlight ranges? 1. As I understand it, custom highlight ranges can overlap. Does this mean that there can be overlapping ranges within a single Highlight object (and thus a single dom::Selection), overlapping ranges in different Highlight objects (and thus different dom::Selections), or both? 2. [This comment in the DOM code](https://searchfox.org/mozilla-central/rev/e24277e20c492b4a785b4488af02cca062ec7c2c/dom/base/Selection.h#823) suggests that "overlapping ranges are disallowed". This was done all the way back in bug 348681. Is that no longer true and this comment is just out of date? Or is there something I'm missing here? 3. As I understand it, ranges are sorted within a dom::Selection and GetAbstractRangesForIntervalArray returns a sorted array of ranges. How then are overlapping ranges handled? Are they sorted by start offset only? Or are they sorted by end offset? Or something else? Anything else you think might be relevant regarding overlapping ranges would also be super helpful. Thanks!