From ba6d410ac6276f320d542f540791069de8c766f2 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Wed, 27 Sep 2023 03:01:26 +0000 Subject: [PATCH] Bug 1851951 - Make `HTMLEditUtils::GetElementOfImmediateBlockBoundary` ignore invisible text node r=m_kato Without this patch, the following test newly fails: ``` /editing/other/insertparagraph-with-white-space-style.tentative.html?white-space=nowrap&command=insertText FAIL
abc[]
(defaultparagraphseparator: div) - assert_equals: A
should be inserted at end expected "abc

" but got "abc
" FAIL
abc[]
(defaultparagraphseparator: p) - assert_equals: A
should be inserted at end expected "abc

" but got "abc
" ``` The reasons is, the inlined editing host is at end of the ``, therefore, even though the editing host itself is `inline`, it needs a padding `
` to make it the new line visible. However, `HTMLEditUtils::GetElementOfImmediateBlockBoundary` does not return `` because the editing host is followed by `