Closed Bug 1509060 Opened Last year Closed Last year

Port bug 1489833 - Replace use of nsIWindowMediator::getZOrderDOMWindowEnumerator

Categories

(Thunderbird :: General, task)

task
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 65.0

People

(Reporter: jorgk, Assigned: jorgk)

References

Details

Attachments

(2 files, 2 obsolete files)

We have four call sites and one comment, suite/ has two more:

mail/base/content/mailCore.js
653 let windowList = Services.wm.getZOrderDOMWindowEnumerator("mail:3pane", true);

mail/base/content/msgMail3PaneWindow.js
670 // XXX We'd like to use getZOrderDOMWindowEnumerator here, but it doesn't work

mail/components/devtools/tb-root-actor.js
158 let winIter = Services.wm.getZOrderDOMWindowEnumerator(null, true);

mail/components/extensions/parent/ext-mail.js
132 let windowList = Services.wm.getZOrderDOMWindowEnumerator("mail:3pane", true);

mailnews/base/src/nsMsgMailSession.cpp
273 rv = windowMediator->GetZOrderDOMWindowEnumerator(nullptr, true, ...

For a replacement, see bug 1489833 comment #3, although I'm not sure what BrowserWindowTracker.getTopWindow is about.
Blocks: 1489833
(In reply to Jorg K (GMT+1) from comment #0)
> For a replacement, see bug 1489833 comment #3, although I'm not sure what
> BrowserWindowTracker.getTopWindow is about.

See https://searchfox.org/mozilla-central/search?q=BrowserWindowTracker.getTopWindow&case=true
Thanks, we also have a C++ call site.
For the C++ callsite you could fall back to the XP_UNIX path across the board for the moment, at least to keep things compiling.
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
This simple removes the Windows code paths which contain getZOrderDOMWindowEnumerator(). Looking at BrowserWindowTracker.jsm, it can't be used directly, instead as per bug 1489833 comment #3 we "should adopt something like BrowserWindowTracker.getTopWindow". I can't magically implement that when I have three hours at 9 PM.
Attached patch 1509060-no-ws.patch (obsolete) — Splinter Review
Here's a patch that ignores the indentation changes.

Boris, care to take a look? You have f? switched off. Try here:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=11605bf53999ab4d5c223720ee24ac496fa1457e
Flags: needinfo?(bzbarsky)
Remove a comment.
Attachment #9026794 - Attachment is obsolete: true
Removed comment.
Attachment #9026796 - Attachment is obsolete: true
> Boris, care to take a look? You have f? switched off

Right, because I don't have time to take a look right now and probably for the next few weeks...  In any case, I don't know this stuff well enough to review intelligently.
Flags: needinfo?(bzbarsky)
Comment on attachment 9026800 [details] [diff] [review]
1509060-no-ws.patch

Geoff, what do you think of this? I'll have to land it when bug 1489833 merges, most likely within one hour from now.
Attachment #9026800 - Flags: review?(geoff)
Keywords: leave-open
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/aa31b79e0b50
Port bug 1489833: Remove use of nsIWindowMediator::GetZOrderDOMWindowEnumerator. rs=bustage-fix
Comment on attachment 9026800 [details] [diff] [review]
1509060-no-ws.patch

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

This looks fine to me.
Attachment #9026800 - Flags: review?(geoff) → review+
OK, leave it at that then.
Status: ASSIGNED → RESOLVED
Closed: Last year
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 65.0
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.