Bug 1793694 - part 1: Move some static inline methods of HTMLEditor to HTMLEditUtils r=m_kato

Depends on D158483

Differential Revision: https://phabricator.services.mozilla.com/D158631
This commit is contained in:
Masayuki Nakano
2022-10-12 02:44:17 +00:00
parent 4230a9d1a4
commit 6a157a88b2
11 changed files with 51 additions and 40 deletions

View File

@@ -907,7 +907,7 @@ HTMLEditor::HTMLWithContextInserter::InsertContents(
HTMLEditUtils::IsTable(pointToInsert.GetContainer()))) {
// Move children of current node to the insertion point.
AutoTArray<OwningNonNull<nsIContent>, 24> children;
HTMLEditor::GetChildNodesOf(*content, children);
HTMLEditUtils::CollectAllChildren(*content, children);
EditorDOMPoint pointToPutCaret;
for (const OwningNonNull<nsIContent>& child : children) {
// MOZ_KnownLive(child) because of bug 1622253
@@ -960,7 +960,7 @@ HTMLEditor::HTMLWithContextInserter::InsertContents(
(HTMLEditUtils::IsAnyListElement(pointToInsert.GetContainer()) ||
HTMLEditUtils::IsListItem(pointToInsert.GetContainer()))) {
AutoTArray<OwningNonNull<nsIContent>, 24> children;
HTMLEditor::GetChildNodesOf(*content, children);
HTMLEditUtils::CollectAllChildren(*content, children);
EditorDOMPoint pointToPutCaret;
for (const OwningNonNull<nsIContent>& child : children) {
if (HTMLEditUtils::IsListItem(child) ||
@@ -1068,7 +1068,7 @@ HTMLEditor::HTMLWithContextInserter::InsertContents(
HTMLEditUtils::IsPre(content)) {
// Check for pre's going into pre's.
AutoTArray<OwningNonNull<nsIContent>, 24> children;
HTMLEditor::GetChildNodesOf(*content, children);
HTMLEditUtils::CollectAllChildren(*content, children);
EditorDOMPoint pointToPutCaret;
for (const OwningNonNull<nsIContent>& child : children) {
// MOZ_KnownLive(child) because of bug 1622253