Skip to content

Commit

Permalink
Bug 1173768 - Force TabsInTitlebar to re-update appearance after exit…
Browse files Browse the repository at this point in the history
…ing fullscreen. r=Gijs
  • Loading branch information
upsuper committed Jun 18, 2015
1 parent 76e8633 commit ff8c910
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions browser/base/content/browser-fullScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ var FullScreen = {
// This is needed if they use the context menu to quit fullscreen
this._isPopupOpen = false;
this.cleanup();
// In TabsInTitlebar._update(), we cancel the appearance update on
// resize event for exiting fullscreen, since that happens before we
// change the UI here in the "fullscreen" event. Hence we need to
// call it here to ensure the appearance is properly updated. See
// TabsInTitlebar._update() and bug 1173768.
TabsInTitlebar.updateAppearance(true);
}
},

Expand Down
8 changes: 8 additions & 0 deletions browser/base/content/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5066,7 +5066,15 @@ var TabsInTitlebar = {
if (this._lastSizeMode == sizemode) {
return;
}
let oldSizeMode = this._lastSizeMode;
this._lastSizeMode = sizemode;
// Don't update right now if we are leaving fullscreen, since the UI is
// still changing in the consequent "fullscreen" event. Code there will
// call this function again when everything is ready.
// See browser-fullScreen.js: FullScreen.toggle and bug 1173768.
if (oldSizeMode == "fullscreen") {
return;
}
}

for (let something in this._disallowed) {
Expand Down

0 comments on commit ff8c910

Please sign in to comment.