Bug 1949969 - Fix the early return of WSRunScanner::GetFirstVisiblePoint r=m_kato

It's obviously wrong, but I don't find how to make us hit here with the
traditional white-space normalizer, but this will cause new failure once
applying the patches for bug 1940377.  Therefore, this does not have a new
test, but it'll be tested by extant tests soon.

Differential Revision: https://phabricator.services.mozilla.com/D239270
This commit is contained in:
Masayuki Nakano
2025-02-26 05:57:18 +00:00
parent 8bb457917b
commit 7369030c9e

View File

@@ -356,7 +356,7 @@ EditorDOMPointType WSRunScanner::GetFirstVisiblePoint(
const Element* aAncestorLimiter /* = nullptr */) {
EditorDOMPoint atStartOfTextNode(&aTextNode, 0);
if (!atStartOfTextNode.IsContainerEmpty() &&
atStartOfTextNode.IsCharCollapsibleASCIISpace()) {
!atStartOfTextNode.IsCharCollapsibleASCIISpace()) {
return atStartOfTextNode.To<EditorDOMPointType>();
}
const TextFragmentData textFragmentData(