Closed Bug 1801766 Opened 1 year ago Closed 1 year ago

Some `nsIEditor.insertNode` callers set unknown 4th arguments

Categories

(Thunderbird :: Message Compose Window, defect, P3)

Tracking

(thunderbird_esr102 wontfix)

RESOLVED FIXED
109 Branch
Tracking Status
thunderbird_esr102 --- wontfix

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

Starting from the initial release of nsIEditor.insertNode, it has only 3 arguments, but some callers set true or false. According to the comments under suite/editor/components, it's intended to prevent editor to update Selection.

Currently, I'm try to add such argument in bug 1764895, but I don't like to use bool because of unclear from the caller sites. Therefore, first, I'd like to correct current code in comm-central first.

Oddly, the API never has 4th argument. However, some callers set it to true
to prevent the editor updating Selection. Some of them also use
nsIEditor.setShouldTxnSetSelection correctly, but the others do not.

This patch just removes them with adding XXX comment only where the wrong
callers to keep current behavior.

frg: I don't find your account in Phabricator. Could you check attachment 9304653 [details]?

Flags: needinfo?(frgrahl)

We don't use phab in suite. Dones not suit us :) I am ok with the patch. If you need and r+ from suite I added IanN.

Interesting. Nothing to find about the fourth parameter even going to cvs. So it is safe to remove. I will take it to our current release branch and check there too. Central builds but is still broken.
Thanks and r+ for the suite parts and stated.

Flags: needinfo?(frgrahl)

Thank you, frg. It's fine to land it without the stamp because it's important that somebody who maintains around the changes checks it.

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/comm-central/rev/87360d9e8dca
Make the callers of nsIEditor.insertNode stop using unknown 4th argument r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: