Refactor `nsFrameSelection::CreateRangeExtendedToSomewhere()` to remove dependency of `Selection`
Categories
(Core :: DOM: Selection, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox134 | --- | fixed |
People
(Reporter: jjaschke, Assigned: jjaschke)
References
(Blocks 3 open bugs)
Details
Attachments
(5 files, 1 obsolete file)
nsFrameSelection::CreateRangeExtendedToSomewhere() currently expects the range to be extended to be the first range of the normal Selection.
However, extending a range by a word comes in handy when implementing an algorithm to create a text fragment from a range (Bug 1876524), in which no Selection is present (instead only nsRanges), among other use cases.
This bug moves the logic to extend a range by an amount into SelectionMovementUtils and removes the dependency of Selection.
| Assignee | ||
Comment 1•1 year ago
|
||
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
| Assignee | ||
Comment 4•1 year ago
|
||
This new helper function can move a range boundary by aAmount without requiring to be in a selection.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 5•1 year ago
|
||
| Assignee | ||
Comment 6•1 year ago
|
||
The logic of this method was moved into helper methods in part 2 of this patchset.
Now, there was only one caller left.
So, we can easily move the code into the one call site and get rid of the method.
Comment 8•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ac1cca025807
https://hg.mozilla.org/mozilla-central/rev/2f6e8e5ac5dd
https://hg.mozilla.org/mozilla-central/rev/f0ba0a69319a
https://hg.mozilla.org/mozilla-central/rev/dc7e27f6058a
https://hg.mozilla.org/mozilla-central/rev/27cbe2030881
https://hg.mozilla.org/mozilla-central/rev/89ffb15c23a7
Description
•