<?xml version="1.0"?>

<bindings id="selectBindings"
          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="select-size" extends="resource:///res/builtin/selectBindings.xml#select-size">
    <content>
      <xul:treecolgroup>
        <xul:treecol flex="1"/>
      </xul:treecolgroup>
      <xul:treerows class="select-container-treerows" flex="1">
        <xul:treechildren flex="1" outer="true" treeitem="optgroup" treerow="option" 
                          sizemode="true" style="-moz-binding: none; overflow: -moz-scrollbars-vertical;">
          <children/> <!-- includes="optgroup|option" -->
        </xul:treechildren>
      </xul:treerows> 
    </content>
  </binding>
 
  <binding id="option-size" extends="resource:///res/builtin/selectBindings.xml#option-size">
    <!-- extends="resource:///res/builtin/selectBindings.xml#option-size"> -->
    <content includes="*">
      <xul:treecell style="-moz-binding: none;">
        <!--xul:treeindentation/-->
        <xul:text xbl:inherits="value=xbl:text,value=label"/>
      </xul:treecell>
    </content>
  </binding>
  
  <binding id="optgroup-size" extends="xul:treeitem">
    <!-- extends="resource:///res/builtin/selectBindings.xml#optgroup-size"> -->
    <content open="true">
      <xul:treerow>
        <xul:treecell style="-moz-binding: none;">
          <!--xul:treeindentation/-->
          <xul:label xbl:inherits="value=label" flex="1" crop="right"/>
        </xul:treecell>
      </xul:treerow>
      <xul:treechildren>
        <children/> <!-- includes="optgroup|option" -->
      </xul:treechildren>
    </content>
  </binding>
  
  <binding id="select" extends="resource:///res/builtin/selectBindings.xml#select">
    <content sizetopopup="true">
      <xul:box class="select-menulist-internal-box" flex="1">
        <xul:box class="select-menulist-display-box" flex="1" valign="middle" align="center">
          <xul:label value="[[[[[MENULIST!]]]]]" class="select-menulist-text" 
                    selectattr="text" xbl:inherits="accesskey" crop="right" flex="1"/>
        </xul:box>
        <xul:box class="select-menulist-dropmarker-box-1" valign="middle" xbl:inherits="open">
          <xul:box class="select-menulist-dropmarker-box-2" flex="1" align="center" valign="middle" xbl:inherits="open">
            <xul:image class="select-menulist-dropmarker" xbl:inherits="disabled"/>
          </xul:box>
        </xul:box>
      </xul:box>
      <xul:menupopup class="select-menulist-menupopup" style="-moz-binding: none;" menugenerated="true">
        <xul:vbox class="select-menulistpopup-internal-box" flex="1" style="overflow: auto">
          <children/>
        </xul:vbox>
      </xul:menupopup>
    </content>
  </binding>
 
  <binding id="option" extends="resource:///res/builtin/selectBindings.xml#option">
    <content includes="*">
      <xul:label xbl:inherits="value=xbl:text,value=label" crop="right"/>
    </content>
  </binding>
  
  <binding id="optgroup" extends="xul:menu">
    <!-- extends="resource:///res/builtin/selectBindings.xml#optgroup-size"> -->
    <content includes="*">
      <xul:label xbl:inherits="value=label" crop="right"/>
      <xul:menupopup style="overflow:auto; -moz-binding: none;" menugenerated="true">
        <children/>
      </xul:menupopup>
    </content>
  </binding>
  
</bindings>          
