Skip to content

Commit

Permalink
Bug 1740847 - part 1: Track split point at replacing collapsible whit…
Browse files Browse the repository at this point in the history
…e-spaces r=m_kato

It `pointToSplit` should be tracked at replacing text, but I have no idea how
to test this because it replaces the text after the split point.

Differential Revision: https://phabricator.services.mozilla.com/D131036
  • Loading branch information
masayuki-nakano committed Nov 12, 2021
1 parent 4f41efa commit 4916b94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/libeditor/WSRunObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2351,6 +2351,8 @@ WhiteSpaceVisibilityKeeper::MakeSureToKeepVisibleWhiteSpacesVisibleAfterSplit(
// pointToSplit will be referred bellow so that we need to keep
// it a valid point.
AutoEditorDOMPointChildInvalidator forgetChild(pointToSplit);
AutoTrackDOMPoint trackSplitPoint(aHTMLEditor.RangeUpdaterRef(),
&pointToSplit);
if (atNextCharOfStart.IsStartOfContainer() ||
atNextCharOfStart.IsPreviousCharASCIISpace()) {
atNextCharOfStart = textFragmentDataAtSplitPoint
Expand Down

0 comments on commit 4916b94

Please sign in to comment.