From 6381b6c3372810fccd45a2acca504d5618222e1e Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Thu, 15 Jun 2023 08:36:42 +0000 Subject: [PATCH] Make `HTMLEditor::HandleHTMLIndentAroundRanges` validate DOM tree in each time of the loop There are 2 possible scenarios which are not handled by the method. 1. Moving content node to new `
` has already been moved to outside of the editing host. 2. There is no container to insert new `
`, 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 `
` 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 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1756237 gecko-commit: 42f3f3ab11b47f1d56d8bcd6a128398539dd1f23 gecko-reviewers: m_kato --- ...nt-in-inline-editing-host-outside-body.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 editing/crashtests/indent-in-inline-editing-host-outside-body.html diff --git a/editing/crashtests/indent-in-inline-editing-host-outside-body.html b/editing/crashtests/indent-in-inline-editing-host-outside-body.html new file mode 100644 index 00000000000000..d56a0fd248b9f9 --- /dev/null +++ b/editing/crashtests/indent-in-inline-editing-host-outside-body.html @@ -0,0 +1,18 @@ + + + + + + + + +