Closed Bug 1947107 Opened 4 days ago Closed 15 hours ago

Rename `WhiteSpaceVisibilityKeeper::ReplaceText` because it does not replace text without `CompositionTransaction`

Categories

(Core :: DOM: Editor, task)

task

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It uses EditorBase::IntertTextWithTransaction() and it replaces composition string if it's called for updating a composition string. So, the name may make developers misunderstood.

Despite the name, it does not replace text of the specified the range.

The range is not collapsed only when updating composition string and even in
the case, EditorBase::InsertTextWithTransaction automatically creates
a CompositionTransaction and the transaction will delete the existing
composition string before inserting the new string.

For making the job of the method clearer, this patch renames it as
InsertOrUpdateCompositionString and it's actually implemented by
InsertTextOrInsertOrUpdateCompositionString.

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/518a565d9872 Rename `WhiteSpaceVisibilityKeeper::ReplaceText` r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 15 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: