mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge m-i to m-c
This commit is contained in:
commit
9ccf8ae5dd
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user