forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1677566 - part 3: Ignore non-deletable ranges in `HTMLEditor::Han…
…dleDeleteSelection()` r=m_kato For making delete handlers simpler, and set better target ranges to the corresponding `beforeinput` event, we should ignore non-editable ranges before handling deletion. This patch makes editor stop handling deleteion when a range crosses editing host boundaries. In this case, Gecko has done nothing, but fired `beforeinput` event. Note that Blink deletes editable contents in the range **until** it meets first non-editable content, but I don't think this is a good behavior because it makes things complicated. Therefore, I filed a spec issue: w3c/editing#283 On the other hand, this behavior change causes different behavior in https://searchfox.org/mozilla-central/source/editor/libeditor/crashtests/1345015.html It tries to insert paragraph into `<html>` element, but our editor currently does not support it. Therefore, it hits `MOZ_ASSERT`. Therefore, this patch added a new check into `HTMLEditor::InsertParagraphSeparatorAsSubAction()`. Differential Revision: https://phabricator.services.mozilla.com/D107588
- Loading branch information
1 parent
1229430
commit 7af10ce
Showing
13 changed files
with
762 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
.../meta/editing/other/select-all-and-delete-in-html-element-having-contenteditable.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.