mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
104 lines
3.2 KiB
XML
104 lines
3.2 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<bindings xmlns="http://www.mozilla.org/xbl"
|
|
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
xmlns:xbl="http://www.mozilla.org/xbl">
|
|
|
|
<binding id="flyoutpanelBinding" extends="xul:box">
|
|
<resources>
|
|
<stylesheet src="chrome://browser/skin/flyoutpanel.css"/>
|
|
</resources>
|
|
|
|
<content>
|
|
<xul:vbox class="flyoutpanel-wrapper">
|
|
<xul:hbox class="flyoutpanel-header" align="top">
|
|
<xul:toolbarbutton class="flyout-close-button"
|
|
command="cmd_flyout_back"
|
|
xbl:inherits="command"/>
|
|
<xul:label class="flyout-header-label" xbl:inherits="value=headertext"/>
|
|
</xul:hbox>
|
|
<xul:scrollbox class="flyoutpanel-contents" observes="bcast_preciseInput" flex="1" orient="vertical">
|
|
<children/>
|
|
</xul:scrollbox>
|
|
</xul:vbox>
|
|
</content>
|
|
|
|
<implementation>
|
|
<constructor>
|
|
<![CDATA[
|
|
this.setAttribute("isSlidOut", true);
|
|
]]>
|
|
</constructor>
|
|
<method name="_onAfterSlideOut">
|
|
<body>
|
|
<![CDATA[
|
|
this.removeAttribute("isSlidingOut");
|
|
this.setAttribute("isSlidOut", true);
|
|
this.removeAttribute("visible");
|
|
this.removeEventListener("transitionend", this._onAfterSlideOut);
|
|
]]>
|
|
</body>
|
|
</method>
|
|
|
|
<method name="_onAfterSlideIn">
|
|
<body>
|
|
<![CDATA[
|
|
this.removeAttribute("isSlidingIn");
|
|
this.setAttribute("isSlidIn", true);
|
|
this.removeEventListener("transitionend", this._onAfterSlideIn);
|
|
]]>
|
|
</body>
|
|
</method>
|
|
|
|
<method name="hide">
|
|
<body>
|
|
<![CDATA[
|
|
if (this.hasAttribute("isSlidingOut")
|
|
|| this.hasAttribute("isSlidOut")) {
|
|
return;
|
|
}
|
|
|
|
if (this.hasAttribute("isSlidingIn")) {
|
|
this._onAfterSlideIn();
|
|
}
|
|
|
|
this.addEventListener("transitionend", this._onAfterSlideOut);
|
|
this.classList.remove("flyoutpanel-slide-in");
|
|
this.setAttribute("isSlidingOut", true);
|
|
this.removeAttribute("isSlidIn");
|
|
]]>
|
|
</body>
|
|
</method>
|
|
|
|
<method name="show">
|
|
<body>
|
|
<![CDATA[
|
|
if (this.hasAttribute("isSlidingIn")
|
|
|| this.hasAttribute("isSlidIn")) {
|
|
return;
|
|
}
|
|
|
|
if (this.hasAttribute("isSlidingOut")) {
|
|
this._onAfterSlideOut();
|
|
}
|
|
|
|
let event = document.createEvent("Events");
|
|
event.initEvent("MozFlyoutPanelShowing", true, false);
|
|
this.dispatchEvent(event);
|
|
this.classList.add("flyoutpanel-slide-in");
|
|
|
|
this.setAttribute("isSlidingIn", true);
|
|
this.setAttribute("visible", true);
|
|
this.removeAttribute("isSlidOut");
|
|
]]>
|
|
</body>
|
|
</method>
|
|
|
|
<field name="anonScrollBox" readonly="true"><![CDATA[
|
|
// Expose the anyonymous scrollbox so ScrollUtils.getScrollboxFromElement can find it.
|
|
document.getAnonymousElementByAttribute(this, "class", "flyoutpanel-contents");
|
|
]]></field>
|
|
</implementation>
|
|
</binding>
|
|
</bindings>
|