browser/metro/base/content/bindings/flyoutpanel.xml

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     1 <?xml version="1.0"?>
     3 <bindings xmlns="http://www.mozilla.org/xbl"
     4           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     5           xmlns:xbl="http://www.mozilla.org/xbl">
     7   <binding id="flyoutpanelBinding" extends="xul:box">
     8     <resources>
     9       <stylesheet src="chrome://browser/skin/flyoutpanel.css"/>
    10     </resources>
    12     <content>
    13       <xul:vbox class="flyoutpanel-wrapper">
    14         <xul:hbox class="flyoutpanel-header" align="top">
    15           <xul:toolbarbutton class="flyout-close-button"
    16                              command="cmd_flyout_back"
    17                              xbl:inherits="command"/>
    18           <xul:label class="flyout-header-label" xbl:inherits="value=headertext"/>
    19         </xul:hbox>
    20         <xul:scrollbox class="flyoutpanel-contents" observes="bcast_preciseInput" flex="1" orient="vertical">
    21           <children/>
    22         </xul:scrollbox>
    23       </xul:vbox>
    24     </content>
    26     <implementation>
    27       <constructor>
    28         <![CDATA[
    29             this.setAttribute("isSlidOut", true);
    30         ]]>
    31       </constructor>
    32       <method name="_onAfterSlideOut">
    33         <body>
    34           <![CDATA[
    35             this.removeAttribute("isSlidingOut");
    36             this.setAttribute("isSlidOut", true);
    37             this.removeAttribute("visible");
    38             this.removeEventListener("transitionend", this._onAfterSlideOut);
    39           ]]>
    40         </body>
    41       </method>
    43       <method name="_onAfterSlideIn">
    44         <body>
    45           <![CDATA[
    46             this.removeAttribute("isSlidingIn");
    47             this.setAttribute("isSlidIn", true);
    48             this.removeEventListener("transitionend", this._onAfterSlideIn);
    49           ]]>
    50         </body>
    51       </method>
    53       <method name="hide">
    54         <body>
    55           <![CDATA[
    56             if (this.hasAttribute("isSlidingOut")
    57              || this.hasAttribute("isSlidOut")) {
    58               return;
    59             }
    61             if (this.hasAttribute("isSlidingIn")) {
    62               this._onAfterSlideIn();
    63             }
    65             this.addEventListener("transitionend", this._onAfterSlideOut);
    66             this.classList.remove("flyoutpanel-slide-in");
    67             this.setAttribute("isSlidingOut", true);
    68             this.removeAttribute("isSlidIn");
    70             let event = document.createEvent("Events");
    71             event.initEvent("MozFlyoutPanelHiding", true, false);
    72             this.dispatchEvent(event);
    73           ]]>
    74         </body>
    75       </method>
    77       <method name="show">
    78         <body>
    79           <![CDATA[
    80             if (this.hasAttribute("isSlidingIn")
    81              || this.hasAttribute("isSlidIn")) {
    82               return;
    83             }
    85             if (this.hasAttribute("isSlidingOut")) {
    86               this._onAfterSlideOut();
    87             }
    89             let event = document.createEvent("Events");
    90             event.initEvent("MozFlyoutPanelShowing", true, false);
    91             this.dispatchEvent(event);
    92             this.classList.add("flyoutpanel-slide-in");
    94             this.setAttribute("isSlidingIn", true);
    95             this.setAttribute("visible", true);
    96             this.removeAttribute("isSlidOut");
    97           ]]>
    98         </body>
    99       </method>
   101       <field name="anonScrollBox" readonly="true"><![CDATA[
   102         // Expose the anyonymous scrollbox so ScrollUtils.getScrollboxFromElement can find it.
   103         document.getAnonymousElementByAttribute(this, "class", "flyoutpanel-contents");
   104       ]]></field>
   105     </implementation>
   106   </binding>
   107 </bindings>

mercurial