mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 18:32:00 +00:00
Bug 1273094 - only trigger TabsInTitlebar.init() after the tabbrowser has updated the visibility of the tabs toolbar, r=mikedeboer
MozReview-Commit-ID: 2NOPYqbq4Zp --HG-- extra : rebase_source : fcafa79a232d994ad56e73539134a2f01934a210 extra : amend_source : 42aad7336111e104b44c2286932bbbf409db5914
This commit is contained in:
parent
1ba465d13d
commit
df7777aa11
@ -8,6 +8,9 @@
|
||||
|
||||
var TabsInTitlebar = {
|
||||
init: function () {
|
||||
if (this._initialized) {
|
||||
return;
|
||||
}
|
||||
this._readPref();
|
||||
Services.prefs.addObserver(this._prefName, this, false);
|
||||
|
||||
|
@ -990,7 +990,6 @@ var gBrowserInit = {
|
||||
TabletModeUpdater.init();
|
||||
CombinedStopReload.init();
|
||||
gPrivateBrowsingUI.init();
|
||||
TabsInTitlebar.init();
|
||||
|
||||
if (window.matchMedia("(-moz-os-version: windows-win8)").matches &&
|
||||
window.matchMedia("(-moz-windows-default-theme)").matches) {
|
||||
@ -5099,12 +5098,15 @@ var TabletModeUpdater = {
|
||||
},
|
||||
|
||||
update(isInTabletMode) {
|
||||
let wasInTabletMode = document.documentElement.hasAttribute("tabletmode");
|
||||
if (isInTabletMode) {
|
||||
document.documentElement.setAttribute("tabletmode", "true");
|
||||
} else {
|
||||
document.documentElement.removeAttribute("tabletmode");
|
||||
}
|
||||
TabsInTitlebar.updateAppearance(true);
|
||||
if (wasInTabletMode != isInTabletMode) {
|
||||
TabsInTitlebar.updateAppearance(true);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -5364,6 +5364,7 @@
|
||||
switch (aEvent.type) {
|
||||
case "load":
|
||||
this.updateVisibility();
|
||||
TabsInTitlebar.init();
|
||||
break;
|
||||
case "resize":
|
||||
if (aEvent.target != window)
|
||||
|
Loading…
x
Reference in New Issue
Block a user