Closed Bug 941945 Opened 6 years ago Closed 6 years ago
Session manager causes tab bar hit area to not be flush with screen edge by inserting element in #titlebar-content
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release) Build ID: 20131121030201 Steps to reproduce: In the 28.0 (2013-11-21) nightly, starting Firefox results in the tab bar being about 2 pixels from the edge of the screen if it was maximized before restarting; performing actions on tabs cannot be done from the edge of the screen because of these 2 pixels of nothing. Actual results: I couldn't reproduce this in safe mode or a fresh profile. Turning off all addons and turning them back on one at a time I noticed that Session Manager (I'm using 0.8.0.9pre20130816b) when enabled (it is a restartless addon) causes the tab bar to jump down 2 pixels. Indeed it seems like Session Manager is the culprit.
Alright, I looked into this, and it turns out that session manager adds an element to the titlebar-content box when it installs/loads initially. It does this after we do our initial TabsInTitlebar calculations that determine how to make the tabstoolbar overlap the window's titlebar. Restoring and maximizing the window again makes us redo those calculations so that's why that gets rid of the bug for now, but we may start caching some of that at some point in the future, to speed up what is a comparatively costly procedure. There are a couple of things the add-on could do to fix this, but not very many things we can really do about this unless we want to add a DOM Mutation listener on the titlebar and deal with this kind of thing (which is presumably pretty rare, so I don't think we'd consider doing that). Here's what Session Manager could do (any of these would fix it): (a) make sure the element is display: none initially and only show it when browser.tabs.drawInTitlebar is false; (b) ensure the element is never higher than the titlebar buttons, (c) only append the element when the titlebar is visible, and otherwise don't add it in there as there's no point (d) manually call TabsInTitlebar.updateAppearance(true); after inserting it (please don't resort to this unless you really really can't do the other two, as it'll slow down creating new windows, if only by a few ms - if everyone starts doing this they'll cause reflows all over the place and it'll be sadfaces all around) I'm CC'ing Michael Kraft so that he's aware of this issue, but I'm marking this particular report itself INVALID because it's not an issue with Firefox's own code.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Summary: Tab bar hit area is not flush with screen edge → Session manager causes tab bar hit area to not be flush with screen edge by inserting element in #titlebar-content
Thanks for the heads up. This should be corrected in 0.8.0.9pre20131125b. If you have any additional issues, either email me directly or report them at http://sessionmanager.mozdev.org/bugs.html
You need to log in before you can comment on or make changes to this bug.