Closed Bug 1655388 Opened 6 months ago Closed 5 months ago

Split `HTMLEditor::HandleDeleteCollapsedSelectionAtAtomicContent()` to range computation part and modifying DOM tree part

Categories

(Core :: DOM: Editor, task, P2)

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(7 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

It works with the traditional white-space normalizer. Therefore, it should
be moved into WhiteSpaceVisibilityKeeper.

Depends on D86910

Although it does not need to join text nodes around the <br> element since
its previous node is <hr>, it can use
WhiteSpaceVisibilityKeeper::DeleteContentNodeAndJoinTextNodesAroundIt() too.

Depends on D87029

Even though it hasn't normalize white-spaces before invisible <br> element,
it needs to do it for making them visible. Therefore, we should make it
use the new method in this case too.

Depends on D87030

Now, the new method is only user of it. So, we can get rid of it.

Depends on D87031

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/990499d5de2e
part 1: Move the last part of `HTMLEditor::HandleDeleteCollapsedSelectionAtAtomicContent()` into `WhiteSpaceVisibilityKeeper` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/ac478c296d34
part 2: Make deleting `<br>` element after `<hr>` element in `HTMLEditor::HandleDeleteCollapsedSelectionAtAtomicContent()` use the new method r=m_kato
https://hg.mozilla.org/integration/autoland/rev/a6a2d95cfc97
part 3: Make `HTMLEditor::HandleDeleteSelectionInternal()` use the new method when it removes an invisible `<br>` element r=m_kato
https://hg.mozilla.org/integration/autoland/rev/7fb690081b4f
part 4: Get rid of `WhiteSpaceVisiblityKeeper::PrepareToDeleteNode()` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/a8a01f9d51d1
part 5: Split the special handling for `<hr>` element off from `HTMLEditor::HandleDeleteCollapsedSelectionAtAtomicContent()` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/daff773f52f4
part 6: Get rid of unnecessary arguments of `HTMLEditor::HandleDeleteCollapsedSelectionAtAtomicContent()` and `HTMLEditor::HandleDeleteCollapsedSelectionAtHRElement()` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/6ec0d78d40c4
part 7: Split off the check whether `<hr>` element should be removed or not from `HTMLEditor::HandleDeleteCollapsedSelectionAtHRElement()` r=m_kato
You need to log in before you can comment on or make changes to this bug.