Closed
Bug 1446151
Opened 7 years ago
Closed 7 years ago
Draw In Titlebar not working anymore on Trunk as of 2018-03-15
Categories
(Thunderbird :: General, defect)
Thunderbird
General
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 61.0
People
(Reporter: Paenglab, Assigned: jorgk-bmo)
References
Details
(Keywords: regression)
Attachments
(1 file, 6 obsolete files)
19.79 KB,
patch
|
jorgk-bmo
:
review+
|
Details | Diff | Splinter Review |
No matter how the pref mail.tabs.drawInTitlebar is set, the window titlebar is always shown. Seen on Mac and Windows.
It looks like bug 1439875 is the reason for this.
maybe we need something like https://hg.mozilla.org/mozilla-central/rev/1ee5a2d21901#l1.1
Assignee | ||
Updated•7 years ago
|
Summary: Draw In Titlebar no more works → Draw In Titlebar not working anymore on Trunk as of 2018-03-15
Comment 1•7 years ago
|
||
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1445737, which is the same code looking fishy in FF. I'll try to address it pretty much that way.
Updated•7 years ago
|
Keywords: regression
Assignee | ||
Comment 2•7 years ago
|
||
Bug 1439875 has just been backed out:
c43177719f36 Gurzau Raul — Backed out 6 changesets (bug 1439875) for massive breakage for nightly users a=backout
Reporter | ||
Comment 3•7 years ago
|
||
Tested on my Mac again with the build showing the problem. When I maximize the window the tabs are back in the titlebar. This shows, we initialize it at the wrong moment.
I made a port of bug 1445737 to be in sync. It doesn't fixes the issue on Mac but still works with the latest builds.
I tried to place TabsInTitlebar.onDOMContentLoaded(); on different places but didn't succeed. Maybe somebody can point to where this needs to be placed.
Assignee | ||
Comment 4•7 years ago
|
||
Well, sadly M-C have refactored this area again:
https://hg.mozilla.org/mozilla-central/rev/e343c24ea4c0
So the TabsInTitlebar.onDOMContentLoaded() call is no longer there:
https://hg.mozilla.org/mozilla-central/rev/e343c24ea4c0#l3.53
Maybe you want to follow that.
TabsInTitlebar.init(); is done before they do new LightweightThemeConsumer():
https://searchfox.org/mozilla-central/rev/a0665934fa05158a5a943d4c8b277465910c029c/browser/base/content/browser.js#1208
so my suggestion would be to put the init() call and the whenWindowLayoutReady() into mailGlue:
https://dxr.mozilla.org/comm-central/rev/ab720c6d3a9f330ab95707c78337cf9b0449fbc7/mail/components/mailGlue.js#75
I might be wrong :-(
Reporter | ||
Comment 5•7 years ago
|
||
Tried it and got a "TabsInTitlebar is not defined". Then copied the whole TabsInTitlebar function to mailGle.js and got "Window is not defined".
Maybe this should someone try that knows what he does. :(
Assignee | ||
Comment 6•7 years ago
|
||
I was going to try it, but the patch here doesn't apply any more. I'm not sure how much of
https://hg.mozilla.org/mozilla-central/rev/e343c24ea4c0
we'd need to port.
In any case, something like this can be done:
+++ b/mail/components/mailGlue.js
new LightweightThemeConsumer(aSubject.document);
+ let win = Services.wm.getMostRecentWindow("mail:3pane");
+ dump("=== Tabs in titlebar!!\n");
+ win.TabsInTitlebar.init();
}
If you have TabsInTitlebar in msgMail3PaneWindow.js, then you can call it like this from mailGlue. You'd have to check with some logging whether that runs earlier than the call in OnLoadMessenger().
Sadly we don't have any expert on this unless you want to ask Florian who did the refactoring in bug 1448303.
Assignee | ||
Comment 7•7 years ago
|
||
Refreshed and with dumps. You can see that the mailGlue code runs first, but it still doesn't work.
Florian, can you help us out here?
Attachment #8959636 -
Attachment is obsolete: true
Flags: needinfo?(florian)
Assignee | ||
Comment 8•7 years ago
|
||
There's been more happening in bug 1449689. We're really late following those changes.
Assignee | ||
Comment 9•7 years ago
|
||
Getting there. The problem is that at startup, 'allow' is set to false. Debugging that now.
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(florian)
Assignee | ||
Comment 10•7 years ago
|
||
You wanted someone who knows what they're doing? Here you go.
This is refactored according to bug 1445737, bug 1448303 and bug 1449689 from browser-tabsintitlebar.js.
As far as I can see, everything is working on Windows.
I don't quite understand what that sizemode stuff is about. M-C have a handleEvent() function which doesn't appear to be called in the file. I rolled the code into the resize observer. Of course, `break` becomes `return`.
Attachment #8965118 -
Attachment is obsolete: true
Attachment #8965129 -
Flags: review?(richard.marti)
Assignee | ||
Comment 11•7 years ago
|
||
Minor tweak: returned the variable name for the pref to the original.
Attachment #8965129 -
Attachment is obsolete: true
Attachment #8965129 -
Flags: review?(richard.marti)
Attachment #8965139 -
Flags: review?(richard.marti)
Assignee | ||
Comment 12•7 years ago
|
||
Now using handleEvent() to be even more in sync with M-C.
Attachment #8965139 -
Attachment is obsolete: true
Attachment #8965139 -
Flags: review?(richard.marti)
Attachment #8965230 -
Flags: review?(richard.marti)
Reporter | ||
Comment 13•7 years ago
|
||
Comment on attachment 8965230 [details] [diff] [review]
1446151-drawtabs-refactor.patch (v3)
Review of attachment 8965230 [details] [diff] [review]:
-----------------------------------------------------------------
Many thanks for fixing this.
I checked the FX file and our file with WinMerge and the differences are looking reasonable with our different implementations and features.
Attachment #8965230 -
Flags: review?(richard.marti) → review+
Assignee | ||
Comment 14•7 years ago
|
||
Very good idea to use WinMerge to compare the two files. I found more things that should have been more similar, so that's fixed here now.
Attachment #8965230 -
Attachment is obsolete: true
Attachment #8965436 -
Flags: review+
Comment 15•7 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/7bd736b50792
Refactor TabsInTitlebar according to bug 1445737, bug 1448613, bug 1448303 and bug 1449689. r=Paenglab
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•7 years ago
|
Target Milestone: --- → Thunderbird 61.0
You need to log in
before you can comment on or make changes to this bug.
Description
•