Loading
Bug 1723895 - Make `WhiteSpaceVisibilityKeeper::ReplaceText()` call...
Bug 1723895 - Make `WhiteSpaceVisibilityKeeper::ReplaceText()` call `GetInclusiveNextNBSPPointIfNeedToReplaceWithASCIIWhiteSpace` with end of the replacing range instead of start of it r=m_kato It tries to replace a following NBSP with an ASCII white-space if there is. However, it calls the scan method with start of the replacing range. Therefore, the assertion in `GetInclusiveNextNBSPPointIfNeedToReplaceWithASCIIWhiteSpace()` detects this bug. Note that this occurs only when updating composition string because it's called with non-collapsed range only for doing it. Otherwise, selected range has already been deleted by `HTMLEditor::DeleteSelectionAsSubAction()`. Unfortunately, I don't have how to make this bug appear. It seems that the path does nothing in the wild because it tries to replace a first character of composition string from an NBSP to a normal white-space, but it'll be replaced with new composition string anyway. Therefore, this patch does not have new tests. Differential Revision: https://phabricator.services.mozilla.com/D122182