Rewrite `HTMLEditor::HandleDeleteNonCollapsedSelection()` as not using `Selection`
Categories
(Core :: DOM: Editor, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(5 files)
After fixing bug 1656430, we can make it free from Selection
.
Assignee | ||
Comment 1•4 years ago
|
||
Depends on D85686
Assignee | ||
Comment 2•4 years ago
|
||
There is only AutoTrackDOMPoint
, but
HTMLEditor::HandleDeleteNonCollapsedSelection()
requires to tack pairs of
DOM points, i.e., requires to track ranges. For making the code simpler,
we should have range tracker too.
Depends on D85845
Assignee | ||
Comment 3•4 years ago
|
||
It may be faster to use AutoTrackDOMRange
directly. Therefore, current
WhiteSpaceVisibilityKeeper::PrepareToDeleteRange()
should be renamed to
WhiteSpaceVisibilityKeeper::PrepareToDeleteRangeAndTrackPoints()
and
we should make HTMLEditor::HandleDeleteNonCollapsedSelection()
track
the range by itself.
Depends on D85846
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D85847
Assignee | ||
Comment 5•4 years ago
|
||
Creation cost of nsRange
is expensive, and it's only user,
HTMLEditor::HandleDeleteNonCollapsedRanges()
wants to extend the range.
Therefore, we can make it directly extend the given range.
Depends on D85848
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/27409fc97733 part 1: Make `HTMLEditor::HandleDeleteNonCollapsedSelection()` store selection ranges with `AutoRangeArray` first r=m_kato https://hg.mozilla.org/integration/autoland/rev/cd8960cc9561 part 2: Create range tracker r=m_kato https://hg.mozilla.org/integration/autoland/rev/5f6940372132 part 3: Make `WhiteSpaceVisibilityKeeper::PrepareToDeleteRange()` not track `EditorDOMPoint`s r=m_kato https://hg.mozilla.org/integration/autoland/rev/ea2f2ca8c778 part 4: Make `HTMLEditor::HandleDeleteNonCollapsedSelection()` take ranges to delete instead of retrieving it via `Selection` r=m_kato https://hg.mozilla.org/integration/autoland/rev/5f6fd01e29a2 part 5: Make `HTMLEditor::GetRangeExtendedToIncludeInvisibleNodes()` directly extend given range r=m_kato
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/27409fc97733
https://hg.mozilla.org/mozilla-central/rev/cd8960cc9561
https://hg.mozilla.org/mozilla-central/rev/5f6940372132
https://hg.mozilla.org/mozilla-central/rev/ea2f2ca8c778
https://hg.mozilla.org/mozilla-central/rev/5f6fd01e29a2
Description
•