Closed Bug 1422721 Opened 7 years ago Closed 6 years ago

Move old utilityOverlay.js functions into Thunderbird code

Categories

(Thunderbird :: Mail Window Front End, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 59.0

People

(Reporter: standard8, Assigned: jorgk-bmo)

References

Details

Attachments

(2 files)

We've discovered that Firefox no longer uses various functions in utilityOverlay.js, and will be removing them in bug 1422720:

goSetMenuValue, goSetAccessKey, goOnEvent, setTooltipText

It looks like Thunderbird/SeaMonkey still use these, my guess is that they'd want to be in utilityOverlay.js, but I haven't tested that.
Blocks: 1422720
setTooltipText seems unused, goOnEvent is used once.
Are there any official replacements for the other functions?
I've not looked in history to find out. My suspicion is that there were some larger replacements/rework for how the menus/commands/keys etc are formed & operated. It is likely that they weren't removed due to add-on compatibility constraints.

I think all of the functions could easily be moved directly into Thunderbird without issue as they are fairly generic wrappers. Though you might want to find out what the replacement work was & get that planned in.
Looking back as far as mozilla 1.8 it sees they were only ever used in mail and suite. Why do you want them removed now?
(In reply to Frank-Rainer Grahl (:frg) from comment #3)
> Looking back as far as mozilla 1.8 it sees they were only ever used in mail
> and suite. Why do you want them removed now?

There's a couple of reasons. Firstly it is dead code, extensions can't use it now, and nothing else is using it (for Firefox). Secondly, we have too many globals already on the browser window and we need to start cutting them down to help it be less complex.
I'm likely to pick up bug 1422720 next week.

It looks like Thunderbird's utilityOverlay.js might be a good place to put stuff, though I've not verified if it'll work for everything or not.
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/87da74e0446e
Adopt goSetMenuValue(), goSetAccessKey(), goOnEvent() into mail/base/. rs=bustage-fix
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
That did the trick.
Target Milestone: --- → Thunderbird 59.0
Comment on attachment 8943522 [details] [diff] [review]
1422721-bustage-fix.patch

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

Thanks.
Attachment #8943522 - Flags: review+
Assignee: nobody → jorgk
Inspecting mozmill logs revealed 
JavaScript error: chrome://messenger/content/addressbook/abResultsPane.js, line 401: ReferenceError: goSetMenuValue is not defined
in mail/test/mozmill/composition/test-send-button.js | test-send-button.js::test_send_enabled_address_contacts_sidebar

It does not make the test fail, but may affect normal usage.

This happens when right-clicking the found cards inside the contacts panel in compose window.
This patch should fix it.
Attachment #8944207 - Flags: review?(jorgk)
Comment on attachment 8944207 [details] [diff] [review]
fix abContactsPanel

Thanks.
Attachment #8944207 - Flags: review?(jorgk) → review+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/83de7e9299d5
Follow-up: add utilityOverlay.js to abContactsPanel.xul to get goSetMenuValue(). r=jorgk CLOSED TREE DONTBUILD
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: