treestyletab/content/treestyletab/treestyletab.xml
Piro / YUKI Hiroshi 6bce4e5e19 Inherit width, height, and others via xbl:inherits (#550)
The inner box of the tab bar should inherit width, height, and other attributes given via setTabbrowserAttribute(), from the parent element. However, if the binding is re-assigned again and again, then it can happen infinitely loop when the inheritance is done by xbl:constructor.
2013-08-28 02:25:49 +09:00

55 lines
3.3 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"
display="xul:stack">
<content>
<xul:image xbl:inherits="validate,src" class="tab-icon-image"/>
<xbl:children/>
</content>
</binding>
<!--
If these bindings are unexpectedly re-assigned, then all attributes
(including sizes) are lost and the appearance becomes broken.
To prevent this problem, the inner box should inherit all attributes
given via setTabbrowserAttribute() method, from the parent element.
See also: https://github.com/piroor/treestyletab/issues/538
On some versions, these inheritence are done by xbl:constructor.
However, it causes infinitely loop on some environments, so
now I use xbl:inherits.
See also: https://github.com/piroor/treestyletab/issues/550
-->
<binding id="toolbar"
extends="chrome://global/content/bindings/toolbar.xml#toolbar">
<content><xul:hbox flex="1"
xbl:inherits="orient,width,height,treestyletab-allow-subtree-collapse,treestyletab-animation-enabled,treestyletab-closebox-inverted,treestyletab-firsttab-border,treestyletab-invert-scrollbar,treestyletab-max-tree-level,treestyletab-mode,treestyletab-narrow-scrollbar,treestyletab-print-preview,treestyletab-stack-collapsed-tabs,treestyletab-style,treestyletab-tab-contents-inverted,treestyletab-tab-inverted,treestyletab-tabbar-autohide,treestyletab-tabbar-autohide-state,treestyletab-tabbar-fixed,treestyletab-tabbar-fixed-horizontal,treestyletab-tabbar-fixed-vertical,treestyletab-tabbar-position,treestyletab-tabbar-resizing,treestyletab-tabs-indented,treestyletab-twisty-style"
anonid="toolbar-innerbox"
class="treestyletab-toolbar-inner-box"><xbl:children/></xul:hbox></content>
<implementation>
<field name="treeStyleTabToolbarInnerBox" readonly="true">
document.getAnonymousElementByAttribute(this, 'anonid', 'toolbar-innerbox')
</field>
</implementation>
</binding>
<binding id="toolbar-drag"
extends="chrome://global/content/bindings/toolbar.xml#toolbar-drag">
<content><xul:hbox flex="1"
xbl:inherits="orient,width,height,treestyletab-allow-subtree-collapse,treestyletab-animation-enabled,treestyletab-closebox-inverted,treestyletab-firsttab-border,treestyletab-invert-scrollbar,treestyletab-max-tree-level,treestyletab-mode,treestyletab-narrow-scrollbar,treestyletab-print-preview,treestyletab-stack-collapsed-tabs,treestyletab-style,treestyletab-tab-contents-inverted,treestyletab-tab-inverted,treestyletab-tabbar-autohide,treestyletab-tabbar-autohide-state,treestyletab-tabbar-fixed,treestyletab-tabbar-fixed-horizontal,treestyletab-tabbar-fixed-vertical,treestyletab-tabbar-position,treestyletab-tabbar-resizing,treestyletab-tabs-indented,treestyletab-twisty-style"
anonid="toolbar-innerbox"
class="treestyletab-toolbar-inner-box"><xbl:children/></xul:hbox></content>
<implementation>
<field name="treeStyleTabToolbarInnerBox" readonly="true">
document.getAnonymousElementByAttribute(this, 'anonid', 'toolbar-innerbox')
</field>
</implementation>
</binding>
</bindings>