treestyletab/content/treestyletab/treestyletab.xml

35 lines
1.0 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="tab-icon"
extends="xul:stack">
<content>
<xul:image xbl:inherits="validate,src" class="tab-icon-image"/>
<xbl:children/>
</content>
</binding>
<binding id="tabbrowser-arrowscrollbox"
extends="chrome://browser/content/tabbrowser.xml#tabbrowser-arrowscrollbox">
<handlers>
<handler event="underflow"><![CDATA[
var tabs = document.getBindingParent(this);
if ((event.detail == 0) == (tabs.orient == 'horizontal'))
return;
tabs.removeAttribute("overflow");
]]></handler>
<handler event="overflow"><![CDATA[
var tabs = document.getBindingParent(this);
if ((event.detail == 0) == (tabs.orient == 'horizontal'))
return;
tabs.setAttribute("overflow", "true");
this.scrollBoxObject.ensureElementIsVisible(tabs.selectedItem);
]]></handler>
</handlers>
</binding>
</bindings>