merge m-i to m-c

This commit is contained in:
Daniel Holbert 2012-03-11 19:40:36 -07:00
commit 9ccf8ae5dd
2 changed files with 9 additions and 9 deletions

View File

@ -5331,8 +5331,6 @@ function setToolbarVisibility(toolbar, isVisible) {
var TabsOnTop = {
init: function TabsOnTop_init() {
this._initialized = true;
this.syncUI();
Services.prefs.addObserver(this._prefName, this, false);
},
@ -5345,9 +5343,6 @@ var TabsOnTop = {
},
syncUI: function () {
if (!this._initialized)
return;
let userEnabled = Services.prefs.getBoolPref(this._prefName);
let enabled = userEnabled && gBrowser.tabContainer.visible;

View File

@ -2779,9 +2779,7 @@
Services.prefs.addObserver("browser.tabs.", this._prefObserver, false);
window.addEventListener("resize", this, false);
this.updateVisibility();
this._propagateVisibility();
window.addEventListener("load", this, false);
]]>
</constructor>
@ -2841,15 +2839,19 @@
this.parentNode && this.parentNode.localName == "toolbar" ? this.parentNode : this;
]]></field>
<field name="_propagatedVisibilityOnce">false</field>
<property name="visible"
onget="return !this._container.collapsed;">
<setter><![CDATA[
if (val == this.visible)
if (val == this.visible &&
this._propagatedVisibilityOnce)
return val;
this._container.collapsed = !val;
this._propagateVisibility();
this._propagatedVisibilityOnce = true;
return val;
]]></setter>
@ -3080,6 +3082,9 @@
<parameter name="aEvent"/>
<body><![CDATA[
switch (aEvent.type) {
case "load":
this.updateVisibility();
break;
case "resize":
if (aEvent.target != window)
break;