Closed Bug 1584122 Opened 5 years ago Closed 5 years ago

clean out some xbl related functionality: getAnonymousElementByAttribute, getAnonymousNodes

Categories

(Thunderbird :: General, task)

task
Not set
normal

Tracking

(thunderbird70 fixed, thunderbird71 fixed)

RESOLVED FIXED
Thunderbird 71.0
Tracking Status
thunderbird70 --- fixed
thunderbird71 --- fixed

People

(Reporter: mkmelin, Assigned: mkmelin)

Details

Attachments

(1 file, 1 obsolete file)

Some xbl related functionality is going away in bug 1584019. We need to remove the usage of getAnonymousElementByAttribute, getAnonymousNodes

https://searchfox.org/comm-central/search?q=GetAnonymousElementByAttribute&case=false&regexp=false&path=
Disregarding gData, there are four callsites in mail(news) and some more in test (scroll down).
That's begs the question when we will drop gData so we don't get hits on its code anymore.

https://searchfox.org/comm-central/search?q=getAnonymousNodes&case=false&regexp=false&path=
Few hits, including in tests (scroll down).

I have a patch amost finished, will send to try soon. Philpp said he'll be ready for gdata removal tomorrow.

Won't be updating the gdata ones, especially as it's not exactly clear how (without debugging it).

anonid attribute will be just like any other random attribute, that you can match on. I think we're already covered there.

Status: NEW → ASSIGNED
Comment on attachment 9096355 [details] [diff] [review]
bug1584122_xbl_cleanup.patch

Review of attachment 9096355 [details] [diff] [review]:
-----------------------------------------------------------------

Great to be clearing out the dregs of XBL.  r+ with the comments addressed.  Tested like so:

- Right-clicked on the column headers for a table of messages and select an option, the columns show/hide as expected, but the popup menu does not go away like I expected.  I checked and this is already what happens without this patch.  We should file a separate bug.

- Not sure exactly how to test removing an activity element.  Clearing the list in the activity manager worked as expected.

- Checked that "Reply with Template" was not an option when creating a filter when there were no templates saved, and that it was an option after creating a template.

::: mail/components/activity/content/activity.js
@@ +159,5 @@
>            item.remove();
>            break;
>          }
>        } else {
> +        let actElement = item.querySelector("[actID='" + aID + "']");

A template string might be clearer here:  `[actID="${aID}"]`

::: mail/test/mozmill/shared-modules/WindowHelpers.jsm
@@ -1043,5 @@
> -    aid: function _get_anon_elementid(aId, aQuery) {
> -      return new elib.Elem(this.a(aId, aQuery));
> -    },
> -
> -    /**

Hooray for being able to delete this code!

::: mailnews/base/search/content/searchWidgets.js
@@ +111,5 @@
> +      );
> +      for (let { label, value } of raMenulist.findTemplates()) {
> +        menulist.appendItem(label, value);
> +      }
> +      raMenulist.findTemplates(true, menulist);

I see that `findTemplates` no longer takes arguments, which makes me suspect that this line is just a leftover and should be removed.  Or am I missing something?

@@ +1393,5 @@
>        /**
>         * Check if there exist any templates in this account.
>         *
> +       * @param {boolean} populateTemplateList - Whether to add menuitems
> +       *  for the found templates.

This param has been removed, so its doc string should go as well.
Attachment #9096355 - Flags: review?(paul) → review+

Testing "checkin-needed". Please ignore.

Keywords: checkin-needed

Thanks!

Attachment #9096355 - Attachment is obsolete: true
Attachment #9096990 - Flags: review+

(In reply to Paul Morris [:pmorris] from comment #6)

  • Right-clicked on the column headers for a table of messages and select an
    option, the columns show/hide as expected, but the popup menu does not go
    away like I expected. I checked and this is already what happens without
    this patch. We should file a separate bug.

It goes away once you click outside it. I think it works like designed, so you can choose which columns to show (many changes at once).

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/aab0650cbf1d
clean out some xbl related functionality: getAnonymousElementByAttribute, getAnonymousNodes. r=pmorris

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 71.0
Comment on attachment 9096990 [details] [diff] [review]
bug1584122_xbl_cleanup.patch

We just need to backport https://hg.mozilla.org/comm-central/rev/aab0650cbf1d#l8.46 to fix bug 1584835 if we do TB 70 beta 4.
Attachment #9096990 - Flags: approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: