Closed Bug 1434830 Opened 2 years ago Closed 2 years ago

Port |bug 1434819 Remove XPCOM DOM traversal interfaces| to comm-central

Categories

(Thunderbird :: General, enhancement)

enhancement
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 60.0

People

(Reporter: bzbarsky, Assigned: jorgk)

Details

Attachments

(1 file, 1 obsolete file)

Particular care needed for the nsIDOMNodeFilter uses in JS (e.g. chat/modules/imThemes.jsm).
And dom_traversal.xpt is going away.
So affected are: nsIDOMNodeIterator, nsIDOMTreeWalker, NodeFilterHolder, nsIDOMNodeFilter which are all going completely, right? Pasting these four into DXR, only nsIDOMNodeFilter is used in chat/ (one use).

Boris, was that your conclusion as well? Is there a replacement? Sorry, I've only looked at it for five minutes.
Summary: Port bug 1434819 to comm-central → Port |bug 1434819 Remove XPCOM DOM traversal interfaces| to comm-central
> which are all going completely, right?

Yes.

> Boris, was that your conclusion as well?

In had only checked for nodefilter.  Checking now, that's the only use, yes.

> Is there a replacement?

Most simply, replace the Ci.nsIDOMNodeFilter with something like:

  { "SHOW_ELEMENT": 0x1, "FILTER_ACCEPT": 1, "FILTER_SKIP": 3 }

and a comment pointing to the WebIDL NodeFilter interface....  You could use NodeFilter directly, if you were not in a JSM.
Thanks for the suggestion, Boris. I removed the quotes around the object's properties.

Bug 1434819 is already on inbound.
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Attachment #8947571 - Flags: review?(bzbarsky)
Attachment #8947571 - Flags: review?(bzbarsky) → review+
Sorry about the noise, I included the dom_traversal.xpt removal as well.
Attachment #8947571 - Attachment is obsolete: true
Attachment #8947574 - Flags: review?(bzbarsky)
Comment on attachment 8947574 [details] [diff] [review]
1434830-nsIDOMNodeFilter.patch (v2)

I guess I can forward the r+ ;-)
Thanks!
Attachment #8947574 - Flags: review?(bzbarsky) → review+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/a1956e0c9e16
Port bug 1434819: Replace use of nsIDOMNodeFilter. r=bz
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 60.0
You need to log in before you can comment on or make changes to this bug.