Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
AutoEmptyBlockAncestorDeleter::GetNewCaretPosition
always retu…
…rn a valid point if succeeded The testcase is tricky. It creates 2 `Selection` ranges, one is collapsed at end of the `<html>`, the other is collapsed in the new `<h3>` element. The first one is ignored by delete handler since Gecko does not allow to edit outside `<body>` for now. Then, deleting non-collapsed selection ranges tries to delete empty parent blocks at the remaining collapsed selection range in the `<h3>`. At this time, it works with `nsIEditor::eNone`. Then, its `GetNewCaretPosition` does not return a valid point. Then, the `Run` does not remove the `Selection` range outside the `<body>`. Therefore, `HTMLEditor::DeleteSelectionAndPrepareToCreateNode()` will see 2 ranges, then, hit the assertion. Although there are some other cases which meet 2 or more `Selection` ranges after deletion in `DeleteSelectionAndPrepareToCreateNode`, but for now, we should make `AutoEmptyBlockAncestorDeleter::Run` collapse `Selection` when it deletes empty ancestors. Differential Revision: https://phabricator.services.mozilla.com/D159581 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1699256 gecko-commit: c3323ac610b4b181872b46030ff084d5f6d6023a gecko-reviewers: m_kato
- Loading branch information
1db0e4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh! Looks like an error! Details
HttpError: You have exceeded a secondary rate limit. Please wait a few minutes before you try again.