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 1756237 - Make
HTMLEditor::HandleHTMLIndentAroundRanges
validat…
…e DOM tree in each time of the loop r=m_kato There are 2 possible scenarios which are not handled by the method. 1. Moving content node to new `<blockquote>` has already been moved to outside of the editing host. 2. There is no container to insert new `<blockquote>`, e.g., in an inline editing host. In the case #1, we should ignore the ex-child node. In the case #2, we should abort it. Note that Chrome inserts `<blockquote>` even if there is no proper container. However, such behavior is disagreed in interop-2023. Therefore, it's okay just to abort it for now. Depends on D180781 Differential Revision: https://phabricator.services.mozilla.com/D180782
- Loading branch information
1 parent
21a2f56
commit 9a4701f
Showing
3 changed files
with
76 additions
and
26 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
18 changes: 18 additions & 0 deletions
18
...ing/web-platform/tests/editing/crashtests/indent-in-inline-editing-host-outside-body.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<script> | ||
addEventListener("load", () => { | ||
const samp = document.createElement("samp"); | ||
samp.innerText = "ABC"; | ||
samp.contentEditable = true; | ||
document.documentElement.appendChild(samp); | ||
getSelection().selectAllChildren(samp); | ||
document.execCommand("indent"); | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |