63246 - global stylesheet scoping, r=jag/blake, sr=hyatt

This commit is contained in:
hewitt%netscape.com 2001-05-12 04:51:28 +00:00
Родитель cb3e2fc976
Коммит e4e8350056
95 изменённых файлов: 4184 добавлений и 3599 удалений

Просмотреть файл

@ -26,14 +26,6 @@ embed.jar:
content/global/treePopups.js (toolkit/content/global/treePopups.js)
content/global/nsTreeController.js (toolkit/content/global/nsTreeController.js)
content/global/nsTreeUtils.js (toolkit/content/global/nsTreeUtils.js)
content/global/xulBindings.xml (toolkit/content/global/xulBindings.xml)
content/global/menulistBindings.xml (toolkit/content/global/menulistBindings.xml)
content/global/radioBindings.xml (toolkit/content/global/radioBindings.xml)
content/global/scrollbarBindings.xml (toolkit/content/global/scrollbarBindings.xml)
content/global/tabBindings.xml (toolkit/content/global/tabBindings.xml)
content/global/treeBindings.xml (toolkit/content/global/treeBindings.xml)
content/global/popupBindings.xml (toolkit/content/global/popupBindings.xml)
content/global/colorpickerBindings.xml (toolkit/content/global/colorpickerBindings.xml)
content/global/nsClipboard.js (toolkit/content/global/nsClipboard.js)
content/global/nsDragAndDrop.js (toolkit/content/global/nsDragAndDrop.js)
content/global/nsJSSupportsUtils.js (toolkit/content/global/nsJSSupportsUtils.js)
@ -41,9 +33,32 @@ embed.jar:
content/global/nsJSComponentManager.js (toolkit/content/global/nsJSComponentManager.js)
content/global/nsUserSettings.js (toolkit/content/global/nsUserSettings.js)
content/global/xul.css (toolkit/content/global/xul.css)
content/global/toolbarBindings.xml (toolkit/content/global/toolbarBindings.xml)
content/global/stringbundleBindings.xml (toolkit/content/global/stringbundleBindings.xml)
content/global/build.dtd (toolkit/content/global/build.dtd)
content/global/build.dtd (toolkit/content/global/build.dtd)
content/global/bindings/browser.xml (toolkit/content/global/bindings/browser.xml)
content/global/bindings/button.xml (toolkit/content/global/bindings/button.xml)
content/global/bindings/checkbox.xml (toolkit/content/global/bindings/checkbox.xml)
content/global/bindings/colorpicker.xml (toolkit/content/global/bindings/colorpicker.xml)
content/global/bindings/general.xml (toolkit/content/global/bindings/general.xml)
content/global/bindings/menu.xml (toolkit/content/global/bindings/menu.xml)
content/global/bindings/menulist.xml (toolkit/content/global/bindings/menulist.xml)
content/global/bindings/menubutton.xml (toolkit/content/global/bindings/menubutton.xml)
content/global/bindings/outliner.xml (toolkit/content/global/bindings/outliner.xml)
content/global/bindings/outliner.css (toolkit/content/global/bindings/outliner.css)
content/global/bindings/popup.xml (toolkit/content/global/bindings/popup.xml)
content/global/bindings/progressmeter.xml (toolkit/content/global/bindings/progressmeter.xml)
content/global/bindings/radio.xml (toolkit/content/global/bindings/radio.xml)
content/global/bindings/scrollbar.xml (toolkit/content/global/bindings/scrollbar.xml)
content/global/bindings/scrollbox.xml (toolkit/content/global/bindings/scrollbox.xml)
content/global/bindings/splitter.xml (toolkit/content/global/bindings/splitter.xml)
content/global/bindings/stringbundle.xml (toolkit/content/global/bindings/stringbundle.xml)
content/global/bindings/tabcontrol.xml (toolkit/content/global/bindings/tabcontrol.xml)
content/global/bindings/text.xml (toolkit/content/global/bindings/text.xml)
content/global/bindings/textbox.xml (toolkit/content/global/bindings/textbox.xml)
content/global/bindings/titledbox.xml (toolkit/content/global/bindings/titledbox.xml)
content/global/bindings/toolbar.xml (toolkit/content/global/bindings/toolbar.xml)
content/global/bindings/tree.xml (toolkit/content/global/bindings/tree.xml)
content/global/bindings/tree.css (toolkit/content/global/bindings/tree.css)
content/global/bindings/wizard.xml (toolkit/content/global/bindings/wizard.xml)
skin/classic/global/contents.rdf (classic/skin/classic/global/contents.rdf)
skin/classic/global/scrollbars.css (classic/skin/classic/global/scrollbars.css)
skin/classic/global/classicBindings.xml (classic/skin/classic/global/classicBindings.xml)

Просмотреть файл

@ -6,7 +6,7 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="fromMenuitem"
extends="chrome://global/content/xulBindings.xml#menuitem">
extends="chrome://global/content/bindings/menu.xml#menuitem">
<content autostretch="never" excludes="template,observes,menupopup">
<xul:text class="composemenu-text" inherits="value=label,accesskey,crop"
crop="right"/>

Просмотреть файл

@ -43,7 +43,7 @@
.bookmark-item.button-toolbar
{
cursor : pointer;
-moz-binding : url("chrome://global/content/xulBindings.xml#buttonleft-ile");
-moz-binding : url("chrome://global/content/bindings/general.xml#buttonleft-ile");
}
.bookmark-item.button-toolbar[container="true"],

Просмотреть файл

@ -5,7 +5,8 @@
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="menubutton-toolbar">
<binding id="menubutton-toolbar"
extends="chrome://global/content/bindings/menubutton.xml#menubutton-base">
<content>
<xul:button class="menubutton-dual-button button-toolbar-1 top" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey,disabled"/>
@ -16,7 +17,8 @@
</content>
</binding>
<binding id="menubutton-toolbar-single" extends="chrome://global/content/menulistBindings.xml#menubutton-single-left">
<binding id="menubutton-toolbar-single"
extends="chrome://global/content/bindings/menubutton.xml#menubutton-single-left">
<content>
<xul:hbox class="menubutton-toolbar-single-internal-box" flex="1" autostretch="never">
<xul:image class="menubutton-toolbar-single-icon" inherits="src,disabled"/>
@ -27,7 +29,8 @@
</content>
</binding>
<binding id="menubutton-toolbar-single-ile" extends="chrome://global/content/xulBindings.xml#inline-edit-base" display="xul:menu">
<binding id="menubutton-toolbar-single-ile" display="xul:menu"
extends="chrome://global/content/bindings/general.xml#inline-edit-base">
<content>
<xul:hbox class="menubutton-toolbar-single-internal-box" flex="1" autostretch="never">
<xul:image class="menubutton-toolbar-single-icon" inherits="src,disabled"/>

Просмотреть файл

@ -1,7 +1,7 @@
#navigator-throbber
{
-moz-binding : url("chrome://global/content/xulBindings.xml#buttontop");
-moz-binding : url("chrome://global/content/bindings/button.xml#buttontop");
border : 1px solid ThreeDDarkShadow;
list-style-image : url("chrome://global/skin/animthrob_single.gif");
margin : 1px 2px 1px 10px;

Просмотреть файл

@ -5,7 +5,7 @@
/* outer frame */
.button-toolbar-1, .button-toolbar-2
{
-moz-binding : url("chrome://global/content/xulBindings.xml#buttontop");
-moz-binding : url("chrome://global/content/bindings/button.xml#buttontop");
min-width : 47px;
margin : 0px;
border : 1px solid transparent;
@ -91,7 +91,7 @@
**/
.button-toolbar
{
-moz-binding : url("chrome://global/content/xulBindings.xml#buttonleft");
-moz-binding : url("chrome://global/content/bindings/button.xml#buttonleft");
margin : 1px;
border : 1px solid transparent;
min-width : 0px;
@ -135,6 +135,7 @@
.button-toolbar:hover
{
border : 1px solid ThreeDDarkShadow;
color : #0000FF;
}
.button-toolbar:hover > .button-internal-box
@ -143,7 +144,11 @@
border-top : 1px solid ThreeDHighlight;
border-right : 1px solid ThreeDShadow;
border-bottom : 1px solid ThreeDShadow;
color : #0000FF;
}
.button-toolbar:hover:active
{
color : #000080;
}
.button-toolbar:hover:active > .button-internal-box
@ -153,7 +158,6 @@
border-top : 1px solid ThreeDShadow;
border-right : 1px solid ThreeDHighlight;
border-bottom : 1px solid ThreeDHighlight;
color : #000080;
}
.button-toolbar[disabled="true"],
@ -180,7 +184,7 @@
{
background-color : transparent;
color : -moz-DialogText;
-moz-binding : url("chrome://global/content/xulBindings.xml#buttonleft");
-moz-binding : url("chrome://global/content/bindings/button.xml#buttonleft");
min-width : 0px;
margin : 0px;
border : 1px solid transparent;
@ -243,7 +247,7 @@
menubutton.button-toolbar-4
{
-moz-binding : url("chrome://global/content/menulistBindings.xml#menubutton-single-right");
-moz-binding : url("chrome://global/content/bindings/menubutton.xml#menubutton-single-right");
}
/** Low profile rollover buttons, e.g. "search"
@ -251,7 +255,7 @@
.button-toolbar-3
{
-moz-binding : url("chrome://global/content/xulBindings.xml#buttonleft");
-moz-binding : url("chrome://global/content/bindings/button.xml#buttonleft");
margin : 0px 0px 1px 3px !important;
min-width : 0px;
background-color : transparent;

Просмотреть файл

@ -1,14 +1,14 @@
.menubutton-dual.top
{
-moz-binding : url("chrome://global/content/menulistBindings.xml#menubutton-dual-ex");
-moz-binding : url("chrome://global/content/bindings/menubutton.xml#menubutton-dual-ex");
border : 1px solid transparent;
-moz-user-focus : ignore !important;
}
.menubutton-dual.left
{
-moz-binding : url("chrome://global/content/menulistBindings.xml#menubutton-dual-ex-left");
-moz-binding : url("chrome://global/content/bindings/menubutton.xml#menubutton-dual-ex-left");
border : 1px solid transparent;
-moz-user-focus : none !important;
}
@ -317,7 +317,7 @@
*/
menubutton.button-toolbar-2
{
-moz-binding : url("chrome://global/content/menulistBindings.xml#menubutton-single-right") !important;
-moz-binding : url("chrome://global/content/bindings/menubutton.xml#menubutton-single-right") !important;
border : 1px solid transparent;
margin : 0px;
}
@ -361,11 +361,11 @@ menubutton.button-toolbar-2[open="true"] > .menubutton-internal-box
}
menubutton.button-toolbar-2.top {
-moz-binding : url("chrome://global/content/xulBindings.xml#buttontop") !important;
-moz-binding : url("chrome://global/content/bindings/button.xml#buttontop") !important;
}
menubutton.button-toolbar-2.bottom {
-moz-binding : url("chrome://global/content/xulBindings.xml#buttontop") !important;
-moz-binding : url("chrome://global/content/bindings/button.xml#buttontop") !important;
}
/** Low profile rollover menubuttons
@ -373,7 +373,7 @@ menubutton.button-toolbar-2.bottom {
.menubutton-dual.button-toolbar-3
{
-moz-binding : url("chrome://global/content/menulistBindings.xml#menubutton-dual-ex");
-moz-binding : url("chrome://global/content/bindings/menubutton.xml#menubutton-dual-ex");
}
.menubutton-dual.button-toolbar-3 > .menubutton-dual-ex-button,

Просмотреть файл

@ -61,7 +61,7 @@ button.edit-mode:hover,
button.edit-mode:hover:active,
button.edit-mode
{
-moz-binding : url(chrome://global/content/xulBindings.xml#buttonleft);
-moz-binding : url(chrome://global/content/bindings/button.xml#buttonleft);
-moz-border-radius : 0px 0px 8px 8px;
padding : 1px 5px 1px 4px;
margin : 0px 1px;

Просмотреть файл

@ -61,7 +61,7 @@ button.edit-mode:hover,
button.edit-mode:hover:active,
button.edit-mode
{
-moz-binding : url(chrome://global/content/xulBindings.xml#buttonleft);
-moz-binding : url(chrome://global/content/bindings/button.xml#buttonleft);
-moz-border-radius : 0px 0px 8px 8px;
padding : 1px 5px 1px 4px;
margin : 0px 1px;

Просмотреть файл

@ -61,7 +61,7 @@ button.edit-mode:hover,
button.edit-mode:hover:active,
button.edit-mode
{
-moz-binding : url(chrome://global/content/xulBindings.xml#buttonleft);
-moz-binding : url(chrome://global/content/bindings/button.xml#buttonleft);
-moz-border-radius : 0px 0px 8px 8px;
padding : 1px 5px 1px 4px;
margin : 0px 1px;

Просмотреть файл

@ -1,60 +0,0 @@
titledbox
{
border : 2px groove #CCCCCC;
padding : 7px;
margin : 5px;
}
title
{
margin-left : 6px;
padding-left : 3px;
padding-right : 3px;
background-color : #DEDEDE;
}
box.titledbox-title
{
padding-left : 5px;
padding-right : 5px;
}
box.titledbox-body
{
padding : inherit;
}
/** box formatting **/
box[autostretch="never"]
{
vertical-align : middle;
}
box[autostretch="never"][valign="top"]
{
vertical-align : top;
}
box[autostretch="never"][valign="bottom"]
{
vertical-align : bottom;
}
box[autostretch="never"][halign="center"]
{
text-align : center;
}
box[autostretch="never"][halign="right"]
{
text-align : right;
}
row
{
vertical-align : middle;
}

Просмотреть файл

@ -5,11 +5,6 @@
/** plain (raw) buttons, class="plain" **/
button.plain
{
-moz-binding : url(chrome://global/content/xulBindings.xml#buttonleft);
}
button.plain, button.plain:hover, button.plain:hover:active,
button.plain:hover:active > .button-internal-box,
button.plain > .button-internal-box,
@ -37,7 +32,6 @@
button.plain-extended
{
-moz-binding : url("chrome://global/skin/buttonBindings.xml#buttonleft");
border-left : 1px solid #DDDDDD;
border-top : 1px solid #DDDDDD;
border-right : 1px solid #000000;
@ -103,7 +97,6 @@
/** All .button-* styles also apply to dialog exit buttons (OK/Cancel) (as seen in XBL binding) **/
button, .exit-dialog {
-moz-binding : url(chrome://global/skin/buttonBindings.xml#nine-slice-button);
border : 0px;
-moz-user-focus : ignore;
min-width : 60px;

Просмотреть файл

@ -5,7 +5,7 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="buttonleft" extends="chrome://global/content/xulBindings.xml#basetext">
<binding id="buttonleft" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-box-1" autostretch="never" flex="1">
<xul:box class="button-box-2" autostretch="never" flex="1">
@ -18,7 +18,7 @@
</content>
</binding>
<binding id="buttonright" extends="chrome://global/content/xulBindings.xml#basetext">
<binding id="buttonright" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-box-1" autostretch="never" flex="1">
<xul:box class="button-box-2" autostretch="never" flex="1">
@ -31,7 +31,7 @@
</content>
</binding>
<binding id="buttontop" extends="chrome://global/content/xulBindings.xml#basetext">
<binding id="buttontop" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-box-1" autostretch="never" flex="1">
<xul:box class="button-box-2" autostretch="never" flex="1" orient="vertical" align="center">
@ -44,7 +44,7 @@
</content>
</binding>
<binding id="buttonbottom" extends="chrome://global/content/xulBindings.xml#basetext">
<binding id="buttonbottom" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-box-1" autostretch="never" flex="1">
<xul:box class="button-box-2" autostretch="never" flex="1" orient="vertical" align="center">
@ -57,7 +57,7 @@
</content>
</binding>
<binding id="exit-button" extends="chrome://global/content/xulBindings.xml#basetext">
<binding id="exit-button" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:spring class="button-image-left" inherits="default,disabled"/>
<xul:box flex="1" class="button-image-middle" inherits="default,disabled" orient="vertical" align="center">
@ -74,7 +74,7 @@
</content>
</binding>
<binding id="nine-slice-button" extends="chrome://global/content/xulBindings.xml#basetext">
<binding id="nine-slice-button" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-box-left" inherits="default,disabled" orient="vertical">
<xul:spring class="button-left-top" inherits="default,disabled"/>
@ -105,7 +105,7 @@
</binding>
<binding id="simplebutton" extends="chrome://global/content/xulBindings.xml#basetext">
<binding id="simplebutton" extends="chrome://global/content/bindings/button.xml#button-base">
<content orient="vertical" autostretch="never" align="center">
<xul:image class="simplebutton-icon" inherits="src,disabled"/>
<xul:text class="simplebutton-text" inherits="value=label,accesskey,crop,disabled"/>

Просмотреть файл

@ -13,7 +13,7 @@
</content>
</binding>
<binding id="toolbargrippy" extends="chrome://global/content/toolbarBindings.xml#toolbargrippy">
<binding id="toolbargrippy" extends="chrome://global/content/bindings/toolbar.xml#toolbargrippy">
<content orient="vertical">
<xul:box autostretch="never" halign="center">
<xul:image class="toolbargrippy-twisty"/>
@ -22,7 +22,7 @@
</content>
</binding>
<binding id="toolbargrippy-collapsed" extends="chrome://global/content/toolbarBindings.xml#toolbargrippy">
<binding id="toolbargrippy-collapsed" extends="chrome://global/content/bindings/toolbar.xml#toolbargrippy">
<content>
<xul:box autostretch="never" halign="center">
<xul:image class="toolbargrippy-twisty-collapsed"/>
@ -32,7 +32,7 @@
</binding>
<binding id="radio" extends="chrome://global/content/radioBindings.xml#radio">
<binding id="radio" extends="chrome://global/content/bindings/radio.xml#radio">
<content>
<xul:box flex="1" class="radio-internal-box" autostretch="never" valign="middle">
<xul:box class="radio-checkmark-box-1" autostretch="never" inherits="disabled">
@ -48,7 +48,7 @@
</content>
</binding>
<binding id="checkbox" extends="chrome://global/content/xulBindings.xml#checkbox">
<binding id="checkbox" extends="chrome://global/content/bindings/checkbox.xml#checkbox">
<content>
<xul:box flex="1" class="checkbox-internal-box" autostretch="never" valign="middle">
<xul:box class="checkbox-checkmark-box-1" autostretch="never" inherits="disabled">
@ -64,7 +64,7 @@
</content>
</binding>
<binding id="thumb" extends="xul:button">
<binding id="thumb" extends="chrome://global/content/bindings/scrollbar.xml#thumb">
<content>
<xul:box class="thumb-border" orient="vertical" flex="1">
<xul:spring flex="1"/>
@ -78,7 +78,7 @@
</content>
</binding>
<binding id="scrollbar" extends="chrome://global/content/scrollbarBindings.xml#scrollbar">
<binding id="scrollbar" extends="chrome://global/content/bindings/scrollbar.xml#scrollbar">
<content>
<xul:scrollbarbutton sbattr="scrollbar-up-top" type="decrement" inherits="sborient=align">
<xul:image inherits="src"/>
@ -120,7 +120,8 @@
</content>
</binding>
<binding id="treeheader" extends="xul:button">
<binding id="treeheader"
extends="chrome://global/content/bindings/tree.xml#treecell-header">
<content>
<xul:box class="treeheader-box" flex="1" autostretch="never">
<xul:image class="treeheader-icon" inherits="src,loading"/>
@ -129,15 +130,8 @@
</content>
</binding>
<binding id="treeheader-children" extends="xul:button">
<content>
<xul:box class="treeheader-box" flex="1" autostretch="never">
<children/>
</xul:box>
</content>
</binding>
<binding id="menubutton-icon">
<binding id="menubutton-icon"
extends="chrome://global/content/bindings/menubutton.xml#menubutton-base">
<content>
<xul:box class="menubutton-icon-box">
<xul:image inherits="src" class="menubutton-icon-image"/>
@ -146,7 +140,8 @@
</content>
</binding>
<binding id="menubutton-icon-nostretch">
<binding id="menubutton-icon-nostretch"
extends="chrome://global/content/bindings/tree.xml#treecell-header">
<content>
<xul:box class="menubutton-icon-box" autostretch="never">
<xul:image inherits="src" class="menubutton-icon-image"/>
@ -155,7 +150,7 @@
</content>
</binding>
<binding id="tab" extends="chrome://global/content/tabBindings.xml#tab">
<binding id="tab" extends="chrome://global/content/bindings/tabcontrol.xml#tab">
<content>
<xul:spring class="tab-image-left" inherits="selected"/>
<xul:box flex="1" class="tab-image-middle" orient="horizontal" align="center" inherits="selected" autostretch="never">
@ -166,7 +161,7 @@
</content>
</binding>
<binding id="tabs" extends="chrome://global/content/tabBindings.xml#tabs">
<binding id="tabs" extends="chrome://global/content/bindings/tabcontrol.xml#tabs">
<content>
<xul:spring class="tab-border-top-left-cap"/>
<xul:spring class="tab-border-top-left"/>
@ -192,14 +187,14 @@
</content>
</binding>
<binding id="toolbarbutton-left" extends="chrome://global/content/xulBindings.xml#buttonleft">
<binding id="toolbarbutton-left" extends="chrome://global/content/bindings/button.xml#buttonleft">
<content autostretch="never">
<xul:image class="toolbarbutton-left-icon" inherits="src,disabled"/>
<xul:text class="toolbarbutton-left-text" inherits="value=label,crop"/>
</content>
</binding>
<binding id="toolbarbutton-top" extends="chrome://global/content/xulBindings.xml#buttontop">
<binding id="toolbarbutton-top" extends="chrome://global/content/bindings/button.xml#buttontop">
<content autostretch="never" orient="vertical">
<xul:image class="toolbarbutton-top-icon" inherits="src,disabled"/>
<xul:text class="toolbarbutton-top-text" inherits="value=label,crop"/>

Просмотреть файл

@ -3,7 +3,7 @@
**/
.box-smallheader
{
-moz-binding : url(chrome://global/content/dialogBindings.xml#smallheader);
-moz-binding : url(chrome://communicator/content/dialogBindings.xml#smallheader);
border : 1px inset #CCCCCC;
margin : 0px 5px 6px 5px;
}
@ -39,7 +39,7 @@
**/
.box-header
{
-moz-binding : url(chrome://global/content/dialogBindings.xml#largeheader);
-moz-binding : url(chrome://communicator/content/dialogBindings.xml#largeheader);
}
.box-header-header
@ -83,7 +83,7 @@
**/
.box-status
{
-moz-binding : url(chrome://global/content/dialogBindings.xml#status);
-moz-binding : url(chrome://communicator/content/dialogBindings.xml#status);
}
.box-status-bg

Просмотреть файл

@ -11,26 +11,87 @@
/* all localizable skin settings shall live here */
@import url(chrome://global/locale/intl.css);
@import url(chrome://global/skin/box.css);
@import url(chrome://global/skin/button.css);
@import url(chrome://global/skin/checkbox.css);
@import url(chrome://global/skin/radio.css);
@import url(chrome://global/skin/tree.css);
@import url(chrome://global/skin/outliner.css);
@import url(chrome://global/skin/splitter.css);
@import url(chrome://global/skin/radio.css);
@import url(chrome://global/skin/menubutton.css);
@import url(chrome://global/skin/menulist.css);
@import url(chrome://global/skin/menu.css);
@import url(chrome://global/skin/formatting.css);
@import url(chrome://global/skin/textfield.css);
@import url(chrome://global/skin/toolbar.css);
@import url(chrome://global/skin/tabcontrol.css);
@import url(chrome://global/skin/colorpicker.css);
@import url("chrome://global/skin/formatting.css");
/*
@import url("chrome://global/content/bindings/outliner.css");
@import url("chrome://global/content/bindings/popup.css");
@import url("chrome://global/content/bindings/scrollbar.css");
@import url("chrome://global/content/bindings/tree.css");
@import url("chrome://global/skin/button.css");
@import url("chrome://global/skin/checkbox.css");
@import url("chrome://global/skin/colorpicker.css");
@import url("chrome://global/skin/menu.css");
@import url("chrome://global/skin/menubutton.css");
@import url("chrome://global/skin/menulist.css");
@import url("chrome://global/skin/outliner.css");
@import url("chrome://global/skin/popup.css");
@import url("chrome://global/skin/progressmeter.css");
@import url("chrome://global/skin/radio.css");
@import url("chrome://global/skin/scrollbox.css");
@import url("chrome://global/skin/splitter.css");
@import url("chrome://global/skin/tabcontrol.css");
@import url("chrome://global/skin/textbox.css");
@import url("chrome://global/skin/toolbar.css");
@import url("chrome://global/skin/tree.css");
*/
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
/**
* bindings
**/
button.plain
{
-moz-binding : url(chrome://global/content/xulBindings.xml#buttonleft);
}
button.plain-extended
{
-moz-binding : url("chrome://global/skin/buttonBindings.xml#buttonleft");
}
button,
.exit-dialog
{
-moz-binding : url(chrome://global/skin/buttonBindings.xml#nine-slice-button);
}
menulist
{
-moz-binding : url(chrome://global/skin/menulistBindings.xml#nine-slice-menulist);
}
menulist[editable="true"]
{
-moz-binding : url("chrome://global/skin/menulistBindings.xml#menulist-editable") !important;
}
grippy, grippy[collapse="before"]
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#grippy");
}
tab
{
-moz-binding : url(chrome://global/skin/classicBindings.xml#tab);
}
tabs
{
-moz-binding : url(chrome://global/skin/classicBindings.xml#tabs);
}
.wizard-header
{
-moz-binding : url("chrome://global/content/bindings/wizard.xml#wizard-header-mac");
}
.wizard-buttons
{
-moz-binding : url("chrome://global/content/bindings/wizard.xml#wizard-buttons-mac");
}
/**
* XUL <window> element
@ -151,9 +212,9 @@
}
/**
* html|iframe default sizing
* iframe default sizing
**/
html|iframe
iframe
{
min-width : 10px;
min-height : 10px;
@ -162,79 +223,3 @@
border : none;
}
/**
* XUL <progressmeter>
**/
progressmeter[mode="undetermined"] > .progressmeter-internal-box
{
background-image : url(chrome://global/skin/progressmeter-busy.gif);
}
progressmeter[mode="undetermined"] > .progressmeter-internal-box > .progressmeter-stack > .progressmeter-progressbar {
visibility: collapse;
}
progressmeter
{
min-width : 100px;
margin : 0px 4px 0px 4px;
border-top : 1px solid #AAAAAA;
border-left : 1px solid #AAAAAA;
border-right : 1px solid #FFFFFF;
border-bottom : 1px solid #FFFFFF;
}
progressmeter > .progressmeter-internal-box
{
border : 1px solid #000000;
max-height : 12px;
height : 10px;
}
.progressmeter-statusbar
{
border-left : 1px solid #FFFFFF;
border-top : 1px solid #FFFFFF;
border-right : 1px solid #9D9D9D;
border-bottom : 1px solid #9D9D9D;
margin : 0px;
}
.progressmeter-statusbar > .progressmeter-internal-box
{
border : 1px solid #DDDDDD;
}
/* progress indicators */
.progress-bar
{
background-color : #9999FF;
background-image : url(chrome://global/skin/progressmeter-bar.gif);
border-left : 1px solid #6666CC;
border-right : 1px solid #000000;
}
.progressmeter-progressbar[value="0"] > .progress-bar,
.progressmeter-progressbar[value="100"] > .progress-bar
{
display : none;
}
.progressmeter-progressbar
{
max-height : 10px;
}
/* No progress text in mac status bars */
.progress-text
{
display : none;
}
/** XUL <scrollbar> element **/
scrollbar
{
-moz-user-focus : ignore;
}

Просмотреть файл

@ -0,0 +1,27 @@
titledbox
{
border : 2px groove #CCCCCC;
padding : 7px;
margin : 5px;
}
title
{
margin-left : 6px;
padding-left : 3px;
padding-right : 3px;
background-color : #DEDEDE;
}
box.titledbox-title
{
padding-left : 5px;
padding-right : 5px;
}
box.titledbox-body
{
padding : inherit;
}

Просмотреть файл

@ -1,7 +1,6 @@
classic.jar:
skin/classic/global/contents.rdf
skin/classic/global/autocomplete.css
skin/classic/global/box.css
skin/classic/global/button.css
skin/classic/global/checkbox.css
skin/classic/global/commonDialog.css
@ -13,14 +12,18 @@ classic.jar:
skin/classic/global/menu.css
skin/classic/global/menubutton.css
skin/classic/global/menulist.css
skin/classic/global/popup.css
skin/classic/global/progressmeter.css
skin/classic/global/radio.css
skin/classic/global/scrollbars.css
skin/classic/global/scrollbox.css
skin/classic/global/splitter.css
skin/classic/global/tabcontrol.css
skin/classic/global/textfield.css
skin/classic/global/textbox.css
skin/classic/global/toolbar.css
skin/classic/global/tree.css
skin/classic/global/outliner.css
skin/classic/global/wizard.css
skin/classic/global/wizardOverlay.css
skin/classic/global/buttonBindings.xml
skin/classic/global/classicBindings.xml
@ -206,6 +209,12 @@ classic.jar:
skin/classic/global/tab-unselect-active-right.gif
skin/classic/global/tab-unselect-left.gif
skin/classic/global/tab-unselect-middle.gif
skin/classic/global/wizard-btn-lft.gif
skin/classic/global/wizard-btn-rit.gif
skin/classic/global/wizard-btn-lft-dis.gif
skin/classic/global/wizard-btn-rit-dis.gif
skin/classic/global/wizard-btn-lft-act.gif
skin/classic/global/wizard-btn-rit-act.gif
skin/classic/global/menulist-scroll.gif
skin/classic/global/tab-unselect-right.gif
skin/classic/global/ubhist-arrow.gif

Просмотреть файл

@ -1,19 +1,4 @@
menubar
{
background-color : white;
/* DON'T DELETE. Removes disappearance of scrollbars
* in content pane when window is made smaller.
* Talk to evaughan@netscape.com for details.
*/
min-width : 1px;
}
menubar > toolbargrippy
{
display : none;
}
menu, menuitem
{
color : MenuText;
@ -34,34 +19,6 @@ menuitem[menuactive="true"][disabled="true"]
color : GrayText;
}
/* XXX menupopups have to have a color explicitly specified. this is a bug */
menupopup, popup
{
background-color : Menu;
border-left : thin solid black;
border-top : thin solid black;
border-right : 3px ridge black;
border-bottom : 3px ridge black;
-moz-user-focus : ignore;
}
menupopup > menu, popup > menu,
menupopup > menuitem, popup > menuitem
{
font : menu;
max-width : 42em;
min-width : 14em;
padding : 0px;
}
/* Don't display grayed items in the contextual popup menus */
/* BUGGY: DON'T UNCOMMENT UNTIL BUG #46005 IS RESOLVED (7/20/00)
popup > menuitem[disabled="true"], popup > menu[disabled="true"]
{
display : none;
}
*/
menuseparator
{
border-top : 1px solid -moz-mac-menushadow;
@ -218,66 +175,34 @@ menuitem[checked="true"][menuactive="true"]
list-style-image : url("chrome://global/skin/menu-arrow-hover.gif");
}
/** Tooltips (tooltip <popup> element)
* class="tooltip"
**/
.tooltip
{
background-color : InfoBackground;
border : 1px solid #000000;
color : InfoText;
font : message-box;
padding : 2px 3px 2px 3px;
margin : 0px;
}
.tooltip > .popup-internal-box
{
border: none;
padding: 0px;
}
/* rules for menuitems associated with menulists */
/*
* Autorepeatbutton
*/
.autorepeatbutton-up {
list-style-image: url("chrome://global/skin/arrow-med-up.gif")
}
menulist > menupopup > menuitem
{
font: message-box;
min-width: 0px;
max-width: none;
padding: 0px 4px !important;
}
.autorepeatbutton-down {
list-style-image: url("chrome://global/skin/arrow-med-down.gif")
}
autorepeatbutton {
margin: 1px 2px 2px 1px;
border: 1px solid transparent;
padding: 1px;
height: 1em;
text-align: left;
vertical-align: middle;
}
autorepeatbutton:hover {
margin: 1px;
border: 1px inset #DDDDDD;
padding: 2px 1px 1px 2px;
}
autorepeatbutton > .autorepeatbutton-up {
padding: 2px 0px 4px 17px;
}
autorepeatbutton:hover > .autorepeatbutton-up {
list-style-image: url("chrome://global/skin/arrow-med-up-hover.gif")
}
autorepeatbutton > .autorepeatbutton-down {
padding: 4px 0px 2px 17px;
}
autorepeatbutton:hover > .autorepeatbutton-down {
list-style-image: url("chrome://global/skin/arrow-med-down-hover.gif")
}
menulist > menupopup > menuitem > .menu-iconic-left
{
width : 10px;
margin : 0px 5px 0px -6px;
padding-left : 0px;
}
menulist > menupopup > menuitem[menuactive="true"][selected="true"]
{
list-style-image : url(chrome://global/skin/menulist-select-dot-active.gif);
margin-right : 3px;
}
menulist > menupopup > menuitem[selected="true"]
{
list-style-image : url(chrome://global/skin/menulist-select-dot.gif);
margin-right : 3px;
}
/* ::::: autocomplete menuitems ::::: */
@ -287,3 +212,5 @@ autorepeatbutton:hover > .autorepeatbutton-down {
font : message-box;
}

Просмотреть файл

@ -244,7 +244,6 @@
menulist[editable="true"]
{
-moz-binding : url("chrome://global/skin/menulistBindings.xml#menulist-editable") !important;
padding : 0px;
}
@ -304,111 +303,6 @@ menulist[editable="true"]:focus > .menulist-internal-box > .menulist-dropmarker-
}
/* rules for popups and separators associated with menulists */
/** -- modern's version --
menulist > menupopup,
.menulist-menupopup
{
border : 1px solid #313948;
padding : 0px;
min-width : 0px;
background-color : #C2D0D0;
}
menulist > menupopup > .popup-internal-box
{
border: 0px;
}
menulist > menupopup > menuseparator
{
border-top: 1px solid #919FA3;
border-bottom: 1px solid #E6EFEE;
}
menulist > menupopup > menuitem,
menulist > menupopup > menu
{
padding-right : 12px;
padding-top : 1px;
padding-bottom : 1px;
min-width : 0px;
max-width : none !important;
color : #000000;
font : message-box;
}
menulist > menupopup > menuitem[menuactive="true"]
{
background-color : #465B75;
color : #FFFFFF;
}
menulist > menupopup > menuitem[selected="true"] > .menu-iconic-left
{
list-style-image : url(chrome://global/skin/menu-check.gif);
}
menulist > menupopup > menuitem[menuactive="true"][selected="true"] > .menu-iconic-left
{
list-style-image : url(chrome://global/skin/menu-check-hover.gif);
}
menulist > menupopup > arrowscrollbox > vbox > autorepeatbutton:hover
{
background-color: #B2BFBF;
border: 1px inset #B2BFBF;
}
-- end modern's version -- **/
/* rules for popups and separators associated with menulists */
menulist > menupopup,
.menulist-menupopup
{
border-left : thin solid white;
border-top : thin solid white;
border-right : 3px ridge black;
border-bottom : 3px ridge black;
background-color : #DDDDDD;
min-width : 0px;
}
menulist > menupopup > menuitem
{
font: message-box;
min-width: 0px;
max-width: none;
padding: 0px 4px !important;
}
menulist > menupopup > menuitem > .menu-iconic-left
{
width : 10px;
margin : 0px 5px 0px -6px;
padding-left : 0px;
}
menulist > menupopup > menuitem[menuactive="true"][selected="true"]
{
list-style-image : url(chrome://global/skin/menulist-select-dot-active.gif);
margin-right : 3px;
}
menulist > menupopup > menuitem[selected="true"]
{
list-style-image : url(chrome://global/skin/menulist-select-dot.gif);
margin-right : 3px;
}
/* :::::::::: compact menulists :::::::::: */
.menulist-compact {

Просмотреть файл

@ -5,17 +5,7 @@
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!--
BINDING : menulist
XUL
REPRESENTATION : <menulist>
-->
<!-- new stretchy menulist -->
<binding id="nine-slice-menulist" extends="chrome://global/content/menulistBindings.xml#menulist">
<binding id="nine-slice-menulist" extends="chrome://global/content/bindings/menulist.xml#menulist">
<content>
<xul:box class="menulist-box-left" inherits="disabled" orient="vertical">
<xul:spring class="menulist-left-top" inherits="disabled"/>
@ -48,7 +38,7 @@
</content>
</binding>
<binding id="menulist-compact" extends="chrome://global/content/menulistBindings.xml#menulist">
<binding id="menulist-compact" extends="chrome://global/content/bindings/menulist.xml#menulist">
<content flex="1">
<xul:box class="menulist-compact-internal-box" flex="1" autostretch="never">
<xul:image class="menulist-compact-dropmarker" inherits="disabled"/>
@ -61,7 +51,7 @@
<binding id="menulist-editable" extends="chrome://global/content/menulistBindings.xml#menulist-editable">
<binding id="menulist-editable" extends="chrome://global/content/bindings/menulist.xml#menulist-editable">
<content>
<xul:box class="menulist-internal-box" flex="1">
<xul:box class="menulist-display-box" flex="1" valign="middle" autostretch="never">

Просмотреть файл

@ -0,0 +1,42 @@
menupopup, popup
{
background-color : Menu;
border-left : thin solid black;
border-top : thin solid black;
border-right : 3px ridge black;
border-bottom : 3px ridge black;
-moz-user-focus : ignore;
}
/** Tooltips (tooltip <popup> element)
* class="tooltip"
**/
.tooltip
{
background-color : InfoBackground;
border : 1px solid #000000;
color : InfoText;
font : message-box;
padding : 2px 3px 2px 3px;
margin : 0px;
}
.tooltip > .popup-internal-box
{
border: none;
padding: 0px;
}
/* rules for popups associated with menulists */
menulist > menupopup,
.menulist-menupopup
{
border-left : thin solid white;
border-top : thin solid white;
border-right : 3px ridge black;
border-bottom : 3px ridge black;
background-color : #DDDDDD;
min-width : 0px;
}

Просмотреть файл

@ -0,0 +1,70 @@
/**
* XUL <progressmeter>
**/
progressmeter[mode="undetermined"] > .progressmeter-internal-box
{
background-image : url(chrome://global/skin/progressmeter-busy.gif);
}
progressmeter[mode="undetermined"] > .progressmeter-internal-box > .progressmeter-stack > .progressmeter-progressbar {
visibility: collapse;
}
progressmeter
{
min-width : 100px;
margin : 0px 4px 0px 4px;
border-top : 1px solid #AAAAAA;
border-left : 1px solid #AAAAAA;
border-right : 1px solid #FFFFFF;
border-bottom : 1px solid #FFFFFF;
}
progressmeter > .progressmeter-internal-box
{
border : 1px solid #000000;
max-height : 12px;
height : 10px;
}
.progressmeter-statusbar
{
border-left : 1px solid #FFFFFF;
border-top : 1px solid #FFFFFF;
border-right : 1px solid #9D9D9D;
border-bottom : 1px solid #9D9D9D;
margin : 0px;
}
.progressmeter-statusbar > .progressmeter-internal-box
{
border : 1px solid #DDDDDD;
}
/* progress indicators */
.progress-bar
{
background-color : #9999FF;
background-image : url(chrome://global/skin/progressmeter-bar.gif);
border-left : 1px solid #6666CC;
border-right : 1px solid #000000;
}
.progressmeter-progressbar[value="0"] > .progress-bar,
.progressmeter-progressbar[value="100"] > .progress-bar
{
display : none;
}
.progressmeter-progressbar
{
max-height : 10px;
}
/* No progress text in mac status bars */
.progress-text
{
display : none;
}

Просмотреть файл

@ -86,6 +86,7 @@ thumb[align="vertical"]:active {
}
scrollbarbutton {
-moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbarbutton");
-moz-user-focus: ignore;
-moz-user-select: none;
vertical-align: bottom;

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Autorepeatbutton
*/
.autorepeatbutton-up {
list-style-image: url("chrome://global/skin/arrow-med-up.gif")
}
.autorepeatbutton-down {
list-style-image: url("chrome://global/skin/arrow-med-down.gif")
}
autorepeatbutton {
margin: 1px 2px 2px 1px;
border: 1px solid transparent;
padding: 1px;
height: 1em;
text-align: left;
vertical-align: middle;
}
autorepeatbutton:hover {
margin: 1px;
border: 1px inset #DDDDDD;
padding: 2px 1px 1px 2px;
}
autorepeatbutton > .autorepeatbutton-up {
padding: 2px 0px 4px 17px;
}
autorepeatbutton:hover > .autorepeatbutton-up {
list-style-image: url("chrome://global/skin/arrow-med-up-hover.gif")
}
autorepeatbutton > .autorepeatbutton-down {
padding: 4px 0px 2px 17px;
}
autorepeatbutton:hover > .autorepeatbutton-down {
list-style-image: url("chrome://global/skin/arrow-med-down-hover.gif")
}

Просмотреть файл

@ -11,7 +11,6 @@ splitter
grippy, grippy[collapse="before"]
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#grippy");
margin : 0px;
border-left : 1px solid #FFFFFF;
border-top : 1px solid #FFFFFF;

Просмотреть файл

@ -8,7 +8,6 @@
/*** TAB: TOP <tab> ***/
tab {
-moz-binding : url(chrome://global/skin/classicBindings.xml#tab);
color : #000000;
padding : 0px;
}
@ -91,7 +90,6 @@ tab:hover:active[selected="true"] > .tab-image-right {
}
tabs {
-moz-binding : url(chrome://global/skin/classicBindings.xml#tabs);
padding : 0px;
}

Просмотреть файл

@ -0,0 +1,27 @@
titledbox
{
border : 2px groove #CCCCCC;
padding : 7px;
margin : 5px;
}
title
{
margin-left : 6px;
padding-left : 3px;
padding-right : 3px;
background-color : #DEDEDE;
}
box.titledbox-title
{
padding-left : 5px;
padding-right : 5px;
}
box.titledbox-body
{
padding : inherit;
}

Просмотреть файл

@ -28,6 +28,21 @@ toolbar
border-bottom : 1px solid #9D9D9D;
}
menubar
{
background-color : white;
/* DON'T DELETE. Removes disappearance of scrollbars
* in content pane when window is made smaller.
* Talk to evaughan@netscape.com for details.
*/
min-width : 1px;
}
menubar > toolbargrippy
{
display : none;
}
toolbargrippy
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#toolbargrippy");

Двоичные данные
themes/classic/global/mac/wizard-btn-lft-act.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 85 B

Двоичные данные
themes/classic/global/mac/wizard-btn-lft-dis.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 86 B

Двоичные данные
themes/classic/global/mac/wizard-btn-lft.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 86 B

Двоичные данные
themes/classic/global/mac/wizard-btn-rit-act.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 86 B

Двоичные данные
themes/classic/global/mac/wizard-btn-rit-dis.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 86 B

Двоичные данные
themes/classic/global/mac/wizard-btn-rit.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 86 B

Просмотреть файл

@ -0,0 +1,129 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.wizard-header {
list-style-image: url("chrome://communicator/skin/content-large.gif");
background-color: #FFFFFF;
}
.wizard-header-box-2 {
border-top: 1px solid #FFFFFF;
border-bottom: 1px solid #777777;
background-color: #CCCCFF;
color: #000000;
}
.wizard-header-box-text {
border-bottom: 1px solid #9999FF;
padding: 6px 0px 6px 0px;
}
.wizard-header-label {
margin-left: 23px;
font-weight: bold;
}
.wizard-header-box-icon {
margin: 3px 20px 0px 3px;
}
.wizard-header-icon {
list-style-image: inherit;
}
.wizard-page-box {
padding: 15px 23px;
background-color: #FFFFFF;
}
.wizard-buttons-top {
padding: 6px 10px;
background-color: #FFFFFF;
}
.wizard-buttons-separator {
margin: 0px !important;
border-top: 1px solid #000000 !important;
border-bottom: 1px solid #FFFFFF !important;
}
.wizard-buttons-btm {
padding: 3px 6px 6px 6px;
background-color: #DDDDDD;
}
.wizard-label-box {
border: 1px solid #777777;
padding: 0px 6px;
background-color: #BBBBBB;
font-weight: bold;
}
.wizard-button {
font: menu !important;
}
.wizard-nav-button,
.wizard-nav-button[disabled="true"]:hover:active {
-moz-binding: url("chrome://global/skin/buttonBindings.xml#buttonleft") !important;
margin: 0px !important;
border-top: 1px solid #666666 !important;
border-right: 1px solid #333333 !important;
border-bottom: 1px solid #333333 !important;
border-left: 1px solid #666666 !important;
min-width: 0px !important;
min-height: 0px !important;
}
.wizard-nav-button > .button-box-1,
.wizard-nav-button[disabled="true"]:hover:active > .button-box-1 {
border-top: 1px solid #FFFFFF !important;
border-right: 1px solid #888888 !important;
border-bottom: 1px solid #888888 !important;
border-left: 1px solid #FFFFFF !important;
background-color: #CCCCCC !important;
padding: 0px 4px !important;
}
.wizard-nav-button:hover:active {
border-top: 1px solid #333333 !important;
border-right: 1px solid #666666 !important;
border-bottom: 1px solid #666666 !important;
border-left: 1px solid #333333 !important;
}
.wizard-nav-button:hover:active > .button-box-1 {
background-color: #AAAAAA !important;
border-top: 1px solid #777777 !important;
border-right: 1px solid #AAAAAA !important;
border-bottom: 1px solid #AAAAAA !important;
border-left: 1px solid #777777 !important;
background-color: #888888 !important;
}
.wizard-button[wizardbutton="back"] {
list-style-image: url("chrome://global/skin/wizard-btn-lft.gif");
}
.wizard-button[wizardbutton="next"] {
list-style-image: url("chrome://global/skin/wizard-btn-rit.gif");
}
.wizard-button[wizardbutton="back"][disabled="true"],
.wizard-button[wizardbutton="back"][disabled="true"]:hover:active {
list-style-image: url("chrome://global/skin/wizard-btn-lft-dis.gif");
}
.wizard-button[wizardbutton="next"][disabled="true"],
.wizard-button[wizardbutton="next"][disabled="true"]:hover:active {
list-style-image: url("chrome://global/skin/wizard-btn-rit-dis.gif");
}
.wizard-button[wizardbutton="back"]:hover:active {
list-style-image: url("chrome://global/skin/wizard-btn-lft-act.gif");
}
.wizard-button[wizardbutton="next"]:hover:active {
list-style-image: url("chrome://global/skin/wizard-btn-rit-act.gif");
}

Просмотреть файл

@ -7,11 +7,6 @@ textbox[type="autocomplete"]
cursor : default !important;
}
.textbox-input
{
cursor : text;
}
.autocomplete-internal-box
{
padding : 0px !important;
@ -22,6 +17,11 @@ textbox[type="autocomplete"]
padding : 1px 2px 1px 2px;
}
.autocomplete-textbox
{
cursor : text;
}
/* ::::: history button ::::: */
.autocomplete-history-button

Просмотреть файл

@ -1,52 +0,0 @@
titledbox
{
border : 2px groove -moz-Dialog;
padding : 7px !important;
margin : 5px;
}
label
{
margin : 0px 40px 2px 6px;
padding : 0px 3px 0px 3px;
background-color : -moz-Dialog;
}
.titledbox-body
{
padding : inherit;
}
/** box formatting **/
box[autostretch="never"]
{
vertical-align : middle;
}
box[autostretch="never"][valign="top"]
{
vertical-align : top;
}
box[autostretch="never"][valign="bottom"]
{
vertical-align : bottom;
}
box[autostretch="never"][halign="center"]
{
text-align : center;
}
box[autostretch="never"][halign="right"]
{
text-align : right;
}
row[autostretch="never"]
{
vertical-align : middle;
}

Просмотреть файл

@ -7,7 +7,6 @@
/* outer frame */
button, button.left
{
-moz-binding : url("chrome://global/skin/buttonBindings.xml#buttonleft");
margin : 1px 5px 2px 5px;
min-width : 6.3em;
background-color : ThreeDFace;

Просмотреть файл

@ -4,7 +4,7 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="buttonleft" extends="chrome://global/content/xulBindings.xml#basetext">
<binding id="buttonleft" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-box-1" flex="1">
<xul:box class="button-box-2" autostretch="never" flex="1">
@ -17,7 +17,7 @@
</content>
</binding>
<binding id="buttonright" extends="chrome://global/content/xulBindings.xml#basetext">
<binding id="buttonright" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-box-1" flex="1">
<xul:box class="button-box-2" autostretch="never" flex="1">
@ -30,7 +30,7 @@
</content>
</binding>
<binding id="buttontop" extends="chrome://global/content/xulBindings.xml#basetext">
<binding id="buttontop" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-box-1" flex="1">
<xul:box class="button-box-2" autostretch="never" flex="1" orient="vertical" align="center">
@ -43,7 +43,7 @@
</content>
</binding>
<binding id="buttonbottom" extends="chrome://global/content/xulBindings.xml#basetext">
<binding id="buttonbottom" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-box-1" flex="1">
<xul:box class="button-box-2" autostretch="never" flex="1" orient="vertical" align="center">
@ -56,7 +56,7 @@
</content>
</binding>
<binding id="simplebutton" extends="chrome://global/content/xulBindings.xml#basetext">
<binding id="simplebutton" extends="chrome://global/content/bindings/button.xml#button-base">
<content orient="vertical" autostretch="never" align="center">
<xul:image class="simplebutton-icon" inherits="src,disabled"/>
<xul:text class="simplebutton-text" inherits="value=label,accesskey,crop,disabled"/>

Просмотреть файл

@ -4,7 +4,6 @@
/* outer frame */
checkbox
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#checkbox");
margin : 3px 5px 3px 5px;
}

Просмотреть файл

@ -13,7 +13,8 @@
</content>
</binding>
<binding id="toolbargrippy" extends="chrome://global/content/toolbarBindings.xml#toolbargrippy">
<binding id="toolbargrippy"
extends="chrome://global/content/bindings/toolbar.xml#toolbargrippy">
<content orient="vertical">
<xul:box autostretch="never" halign="center">
<xul:image class="toolbargrippy-twisty"/>
@ -22,7 +23,7 @@
</content>
</binding>
<binding id="toolbargrippy-collapsed" extends="chrome://global/content/toolbarBindings.xml#toolbargrippy">
<binding id="toolbargrippy-collapsed" extends="chrome://global/content/bindings/toolbar.xml#toolbargrippy">
<content>
<xul:box autostretch="never" halign="center">
<xul:image class="toolbargrippy-twisty-collapsed"/>
@ -32,7 +33,7 @@
</binding>
<binding id="radio" extends="chrome://global/content/radioBindings.xml#radio">
<binding id="radio" extends="chrome://global/content/bindings/radio.xml#radio">
<content>
<xul:box flex="1" class="radio-internal-box" autostretch="never" valign="middle">
<xul:box class="radio-checkmark-box-1" autostretch="never" inherits="disabled">
@ -50,7 +51,7 @@
</content>
</binding>
<binding id="checkbox" extends="chrome://global/content/xulBindings.xml#checkbox">
<binding id="checkbox" extends="chrome://global/content/bindings/checkbox.xml#checkbox">
<content>
<xul:box flex="1" class="checkbox-internal-box" autostretch="never" valign="middle">
<xul:box class="checkbox-checkmark-box-1" autostretch="never" inherits="disabled">
@ -66,7 +67,7 @@
</content>
</binding>
<binding id="thumb" extends="chrome://global/content/scrollbarBindings.xml#thumb">
<binding id="thumb" extends="chrome://global/content/bindings/scrollbar.xml#thumb">
<content>
<xul:box class="thumb-box" autostretch="never" orient="vertical" flex="1">
<xul:spring class="thumb-spring" flex="1"/>
@ -74,7 +75,7 @@
</content>
</binding>
<binding id="scrollbar" extends="chrome://global/content/scrollbarBindings.xml#scrollbar">
<binding id="scrollbar" extends="chrome://global/content/bindings/scrollbar.xml#scrollbar">
<content>
<xul:scrollbarbutton type="decrement" inherits="sborient=align"/>
<xul:slider flex="1" inherits="curpos,maxpos,pageincrement,increment">
@ -84,16 +85,16 @@
</content>
</binding>
<binding id="scrollbarbutton" extends="chrome://global/content/scrollbarBindings.xml#scrollbarbutton">
<binding id="scrollbarbutton" extends="chrome://global/content/bindings/scrollbar.xml#scrollbarbutton">
</binding>
<binding id="slider">
<binding id="slider" extends="chrome://global/content/bindings/scrollbar.xml#slider">
<content>
<xul:button class="slider-button"/>
</content>
</binding>
<binding id="grippy">
<binding id="grippy" extends="chrome://global/content/bindings/splitter.xml#grippy">
<content>
<xul:box class="grippy-box" flex="1">
<xul:image class="grippy-image" inherits="src" />
@ -109,7 +110,7 @@
</content>
</binding>
<binding id="menuitem-iconic" extends="chrome://global/content/xulBindings.xml#menuitem-iconic">
<binding id="menuitem-iconic" extends="chrome://global/content/bindings/menu.xml#menuitem-iconic">
<content>
<xul:box class="menu-iconic-left" orient="vertical" autostretch="never" inherits="selected,menuactive,disabled,checked">
<xul:image/>
@ -137,21 +138,21 @@
</content>
</binding>
<binding id="toolbarbutton-left" extends="chrome://global/content/xulBindings.xml#buttonleft">
<binding id="toolbarbutton-left" extends="chrome://global/content/bindings/button.xml#buttonleft">
<content autostretch="never">
<xul:image class="toolbarbutton-left-icon" inherits="src,disabled"/>
<xul:text class="toolbarbutton-left-text" inherits="value=label,crop"/>
</content>
</binding>
<binding id="toolbarbutton-top" extends="chrome://global/content/xulBindings.xml#buttontop">
<binding id="toolbarbutton-top" extends="chrome://global/content/bindings/button.xml#buttontop">
<content autostretch="never" orient="vertical">
<xul:image class="toolbarbutton-top-icon" inherits="src,disabled"/>
<xul:text class="toolbarbutton-top-text" inherits="value=label,crop"/>
</content>
</binding>
<binding id="splitter-hack" extends="xul:splitter">
<binding id="splitter-hack" extends="chrome://global/content/bindings/splitter.xml#splitter">
<content>
<xul:box class="splitter-hack-box" flex="1" autostretch="never">
<children/>
@ -180,13 +181,5 @@
</content>
</binding>
<!--
<binding id="throbber" extends="xul:box">
<content autostretch="never">
<button allowevents="true" class="throbber-button" inherits="oncommand=throbberaction,tooltip=throbbertooltip,tooltiptext=throbbertooltiptext"/>
</content>
</binding>
-->
</bindings>

Просмотреть файл

@ -3,7 +3,7 @@
**/
.box-smallheader
{
-moz-binding : url(chrome://global/content/dialogBindings.xml#smallheader);
-moz-binding : url(chrome://communicator/content/dialogBindings.xml#smallheader);
border-left : 1px solid ThreeDShadow;
border-top : 1px solid ThreeDShadow;
border-right : 1px solid ThreeDHighlight;

Просмотреть файл

@ -1,40 +1,101 @@
/** this should only contain XUL dialog and document window widget defaults. Defaults for widgets of
a particular application should be in that application's style sheet.
For example style definitions for navigator can be found in navigator.css
THIS FILE IS LOCKED DOWN. YOU ARE NOT ALLOWED TO MODIFY IT WITHOUT FIRST HAVING YOUR
CHANGES REVIEWED BY hyatt@netscape.com.
**/
/* import the widget style sheets */
/* all localizable skin settings shall live here */
@import url(chrome://global/locale/intl.css);
@import url(chrome://global/skin/box.css);
@import url(chrome://global/skin/button.css);
@import url(chrome://global/skin/checkbox.css);
@import url(chrome://global/skin/radio.css);
@import url(chrome://global/skin/tree.css);
@import url(chrome://global/skin/outliner.css);
@import url(chrome://global/skin/splitter.css);
@import url(chrome://global/skin/radio.css);
@import url(chrome://global/skin/menubutton.css);
@import url(chrome://global/skin/menulist.css);
@import url(chrome://global/skin/menu.css);
@import url(chrome://global/skin/formatting.css);
@import url(chrome://global/skin/textfield.css);
@import url(chrome://global/skin/tabcontrol.css);
@import url(chrome://global/skin/toolbar.css);
@import url(chrome://global/skin/colorpicker.css);
@import url("chrome://global/skin/formatting.css");
/*
@import url("chrome://global/content/bindings/outliner.css");
@import url("chrome://global/content/bindings/popup.css");
@import url("chrome://global/content/bindings/scrollbar.css");
@import url("chrome://global/content/bindings/tree.css");
@import url("chrome://global/skin/button.css");
@import url("chrome://global/skin/checkbox.css");
@import url("chrome://global/skin/colorpicker.css");
@import url("chrome://global/skin/menu.css");
@import url("chrome://global/skin/menubutton.css");
@import url("chrome://global/skin/menulist.css");
@import url("chrome://global/skin/outliner.css");
@import url("chrome://global/skin/popup.css");
@import url("chrome://global/skin/progressmeter.css");
@import url("chrome://global/skin/radio.css");
@import url("chrome://global/skin/scrollbox.css");
@import url("chrome://global/skin/splitter.css");
@import url("chrome://global/skin/tabcontrol.css");
@import url("chrome://global/skin/textbox.css");
@import url("chrome://global/skin/toolbar.css");
@import url("chrome://global/skin/tree.css");
*/
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
/**
* XXX-DEBUG: HTML namespace/titledbutton striping.
**/
/**
* bindings
**/
button, button.left
{
-moz-binding : url("chrome://global/skin/buttonBindings.xml#buttonleft");
}
checkbox
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#checkbox");
}
menulist
{
-moz-binding : url("chrome://global/skin/menulistBindings.xml#menulist");
}
menulist[editable="true"]
{
-moz-binding : url("chrome://global/skin/menulistBindings.xml#menulist-editable") !important;
}
menulist > menupopup,
.menulist-menupopup
{
-moz-binding : url("chrome://global/skin/menulistBindings.xml#menulistpopup");
}
.menulist-compact
{
-moz-binding : url("chrome://global/skin/menulistBindings.xml#menulist-compact");
}
radio
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#radio");
}
grippy, grippy[collapse="before"]
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#grippy");
}
window[orient="vertical"] > splitter,
box[orient="vertical"] > splitter,
window[align="vertical"] > splitter,
box[align="vertical"] > splitter,
vbox > splitter
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#splitter-hack");
}
tabs
{
-moz-binding: url("chrome://global/skin/tabBindings.xml#tabs");
}
toolbargrippy
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#toolbargrippy");
}
toolbargrippy[tbgrippy-collapsed="true"]
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#toolbargrippy-collapsed");
}
/**
* XUL <window> element
**/
@ -144,9 +205,9 @@
}
/**
* html|iframe default sizing
* iframe default sizing
**/
html|iframe
iframe
{
min-width : 10px;
min-height : 10px;
@ -155,73 +216,10 @@
border : none;
}
/**
* XUL <progressmeter>
/**
* disabled text
**/
progressmeter[mode="undetermined"] > .progressmeter-internal-box
{
background-image : url(chrome://global/skin/progressmeter-busy.gif);
}
progressmeter[mode="undetermined"] > .progressmeter-internal-box > .progressmeter-stack > .progressmeter-progressbar
{
visibility : collapse;
}
progressmeter
{
min-width : 100px;
border-left : 1px solid ThreeDShadow;
border-top : 1px solid ThreeDShadow;
border-right : 1px solid ThreeDHighlight;
border-bottom : 1px solid ThreeDHighlight;
background-color : -moz-Dialog;
}
.progressmeter-statusbar
{
border-left : 1px solid ThreeDHighlight;
border-top : 1px solid ThreeDHighlight;
border-right : 1px solid ThreeDShadow;
border-bottom : 1px solid ThreeDShadow;
}
.progress-text
{
visibility : collapse;
}
.progressmeter-internal-box
{
border : 1px solid -moz-Dialog;
padding : 1px;
}
.progressmeter-inset
{
margin : 1px 5px 2px 5px;
}
.progressmeter-inset > .progressmeter-internal-box
{
border-left : 1px solid ThreeDDarkShadow;
border-top : 1px solid ThreeDDarkShadow;
border-right : 1px solid ThreeDHighlight;
border-bottom : 1px solid ThreeDHighlight;
}
/* progress indicators */
.progress-bar
{
background-color : ThreeDShadow;
}
/** XUL <scrollbar> element **/
scrollbar
{
-moz-user-focus : ignore;
}
.disabled-text-bottom
{
color : ThreeDShadow;
@ -233,3 +231,10 @@
color : ThreeDHighlight;
margin : 1px 0px 0px 1px;
}
.tooltip-label
{
margin : 0px;
}

Просмотреть файл

@ -0,0 +1,18 @@
titledbox
{
border : 2px groove -moz-Dialog;
padding : 7px !important;
margin : 5px;
}
label
{
margin : 0px 40px 2px 6px;
padding : 0px 3px 0px 3px;
background-color : -moz-Dialog;
}
.titledbox-body
{
padding : inherit;
}

Просмотреть файл

@ -2,7 +2,6 @@ classic.jar:
skin/classic/global/contents.rdf
skin/classic/global/preview.png (../../preview/win/preview.png)
skin/classic/global/autocomplete.css
skin/classic/global/box.css
skin/classic/global/button.css
skin/classic/global/checkbox.css
skin/classic/global/commonDialog.css
@ -14,14 +13,19 @@ classic.jar:
skin/classic/global/menu.css
skin/classic/global/menubutton.css
skin/classic/global/menulist.css
skin/classic/global/popup.css
skin/classic/global/progressmeter.css
skin/classic/global/radio.css
skin/classic/global/scrollbars.css
skin/classic/global/scrollbox.css
skin/classic/global/splitter.css
skin/classic/global/tabcontrol.css
skin/classic/global/textfield.css
skin/classic/global/textbox.css
skin/classic/global/titledbox.css
skin/classic/global/toolbar.css
skin/classic/global/tree.css
skin/classic/global/outliner.css
skin/classic/global/wizard.css
skin/classic/global/wizardOverlay.css
skin/classic/global/buttonBindings.xml
skin/classic/global/classicBindings.xml

Просмотреть файл

@ -1,13 +1,3 @@
menubar, menupopup, popup
{
/* DON'T DELETE. Removes disappearance of scrollbars
* in content pane when window is made smaller.
* Talk to evaughan@netscape.com for details.
*/
min-width : 1px;
background-color : Menu;
}
menu, menuitem
{
font : menu;
@ -34,37 +24,12 @@ menuitem[default="true"]
font-weight : bold;
}
/* XXX menupopups have to have a color explicitly specified. this is a bug */
menupopup, popup
{
border-left : 1px solid ThreeDLightShadow;
border-top : 1px solid ThreeDLightShadow;
border-right : 1px solid ThreeDDarkShadow;
border-bottom : 1px solid ThreeDDarkShadow;
}
.popup-internal-box
{
border-left : 1px solid ThreeDHighlight;
border-top : 1px solid ThreeDHighlight;
border-right : 1px solid ThreeDShadow;
border-bottom : 1px solid ThreeDShadow;
padding : 1px;
}
menupopup > menu,
menupopup > menuitem
{
max-width : 20em; /* should move to content */
min-width : 14em; /* should move to content */
margin : 0px;
}
menupopup > menuitem,
popup > menu,
popup > menuitem
{
max-width : 20em; /* should move to content */
min-width : 8em; /* should move to content */
max-width : 42em; /* should move to content */
margin : 0px;
}
@ -211,60 +176,6 @@ menuitem[checked="true"][type="radio"][menuactive="true"]
list-style-image : url("chrome://global/skin/menu-arrow-hover.gif");
}
/** Tooltips (tooltip <popup> element)
* class="tooltip"
**/
.tooltip
{
border : 1px solid WindowFrame;
padding : 2px;
max-width : 40em;
background-color : InfoBackground;
color : InfoText;
font : message-box;
}
.tooltip > .popup-internal-box
{
border : 0px;
padding : 0px;
}
#TOOLTIP-tooltipText
{
margin : 0px;
}
/*
* Autorepeatbutton
*/
.autorepeatbutton-up
{
list-style-image : url("chrome://global/skin/scroll-up.gif")
}
.autorepeatbutton-down
{
list-style-image : url("chrome://global/skin/scroll-down.gif")
}
autorepeatbutton
{
margin : 1px 2px 2px 1px;
border : 1px solid transparent;
padding : 1px;
height : 1em;
text-align : center;
vertical-align : middle;
}
autorepeatbutton:hover
{
margin : 1px;
border : 1px inset ThreeDFace;
padding : 2px 1px 1px 2px;
}
/* ::::: autocomplete menuitems ::::: */
.autocomplete-history-popup > menuitem
@ -272,3 +183,49 @@ autorepeatbutton:hover
max-width : none !important;
font-size : smaller;
}
/* ::::: menu/menuitems in a menulist popup ::::: */
menulist > menupopup > menuitem,
menulist > menupopup > menu
{
border : 1px solid transparent;
padding : 0px 7px !important;
min-width : 0px; /* should be in content*/
max-width : none; /* should be in content*/
font : message-box;
color : -moz-FieldText;
}
menulist > menupopup > menuitem > .menu-iconic-accel,
menulist > menupopup > menuitem > .menu-accel,
menulist > menupopup > menuitem > .menu-text,
menulist > menupopup > menuitem > .menu-iconic-text,
menulist > menupopup > menu > .menu-text,
menulist > menupopup > menu > .menu-accel,
menulist > menupopup > menu > .menu-iconic-text,
menulist > menupopup > menu > .menu-iconic-accel
{
margin-top : 0px;
margin-bottom : 0px;
}
menulist > menupopup > menuitem[selected="true"]
{
border : 1px dotted #F5DB95;
}
menulist > menupopup > menuitem > .menu-iconic-left,
menulist > menupopup > menuitem > .menu-iconic-left[menuactive="true"]
{
list-style-image : inherit;
width : 0px;
border : none;
}
menulist > menupopup > menuseparator
{
border-top: none;
border-bottom: 1px solid WindowText;
}

Просмотреть файл

@ -1,7 +1,6 @@
/* outer frame */
menulist
{
-moz-binding : url("chrome://global/skin/menulistBindings.xml#menulist");
border-left : 1px solid ThreeDShadow;
border-top : 1px solid ThreeDShadow;
border-right : 1px solid ThreeDHighlight;
@ -90,67 +89,12 @@
padding : 3px 0px 1px 2px;
}
/* rules for popups and separators associated with menulists */
menulist > menupopup,
.menulist-menupopup
{
-moz-binding : url("chrome://global/skin/menulistBindings.xml#menulistpopup");
border : 1px solid -moz-FieldText;
min-width : 0px;
background-color : -moz-Field;
}
menulist > menupopup > menuitem,
menulist > menupopup > menu
{
border : 1px solid transparent;
padding : 0px 7px !important;
min-width : 0px; /* should be in content*/
max-width : none; /* should be in content*/
font : message-box;
color : -moz-FieldText;
}
menulist > menupopup > menuitem > .menu-iconic-accel,
menulist > menupopup > menuitem > .menu-accel,
menulist > menupopup > menuitem > .menu-text,
menulist > menupopup > menuitem > .menu-iconic-text,
menulist > menupopup > menu > .menu-text,
menulist > menupopup > menu > .menu-accel,
menulist > menupopup > menu > .menu-iconic-text,
menulist > menupopup > menu > .menu-iconic-accel
{
margin-top : 0px;
margin-bottom : 0px;
}
menulist > menupopup > menuitem[selected="true"]
{
border : 1px dotted #F5DB95;
}
menulist > menupopup > menuitem > .menu-iconic-left,
menulist > menupopup > menuitem > .menu-iconic-left[menuactive="true"]
{
list-style-image : inherit;
width : 0px;
border : none;
}
menulist > menupopup > menuseparator
{
border-top: none;
border-bottom: 1px solid WindowText;
}
/**
* <menulist>s for things like mailnews addressing widget
**/
.menulist-compact
{
-moz-binding : url("chrome://global/skin/menulistBindings.xml#menulist-compact");
margin : 0px;
border-top : 1px solid ThreeDHighlight;
border-right : 1px solid ThreeDDarkShadow;
@ -197,11 +141,6 @@
* Editable menulists (comboboxes)
*/
menulist[editable="true"]
{
-moz-binding : url("chrome://global/skin/menulistBindings.xml#menulist-editable") !important;
}
.menulist-editable-text
{
border : none !important;

Просмотреть файл

@ -5,11 +5,8 @@
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!--
BINDING : menulist
XUL REPRESENTATION : <menulist>
-->
<binding id="menulist" extends="chrome://global/content/menulistBindings.xml#menulist">
<binding id="menulist"
extends="chrome://global/content/bindings/menulist.xml#menulist">
<content>
<xul:box class="menulist-internal-box" flex="1">
<xul:box class="menulist-display-box" flex="1" valign="middle" autostretch="never">
@ -26,7 +23,8 @@
</content>
</binding>
<binding id="menulist-editable" extends="chrome://global/content/menulistBindings.xml#menulist-editable">
<binding id="menulist-editable"
extends="chrome://global/content/bindings/menulist.xml#menulist-editable">
<content>
<xul:box class="menulist-internal-box" flex="1">
<xul:box class="menulist-display-box" flex="1" valign="middle" autostretch="never">
@ -43,7 +41,8 @@
</content>
</binding>
<binding id="menulistpopup">
<binding id="menulistpopup"
extends="chrome://global/content/bindings/popup.xml#popup">
<content>
<xul:box class="menulistpopup-internal-box" orient="vertical" flex="1" style="overflow: auto">
<children/>
@ -51,7 +50,7 @@
</content>
</binding>
<binding id="menulist-compact" extends="chrome://global/content/menulistBindings.xml#menulist">
<binding id="menulist-compact" extends="chrome://global/content/bindings/menulist.xml#menulist">
<content flex="1">
<xul:box class="menulist-compact-internal-box" flex="1" autostretch="never">
<xul:image class="menulist-compact-dropmarker" inherits="disabled"/>
@ -61,7 +60,5 @@
<children includes="menupopup"/>
</content>
</binding>
</bindings>

Просмотреть файл

@ -0,0 +1,57 @@
menupopup, popup
{
/* DON'T DELETE. Removes disappearance of scrollbars
* in content pane when window is made smaller.
* Talk to evaughan@netscape.com for details.
*/
min-width : 1px;
background-color : Menu;
}
/* XXX menupopups have to have a color explicitly specified. this is a bug */
menupopup, popup
{
border-left : 1px solid ThreeDLightShadow;
border-top : 1px solid ThreeDLightShadow;
border-right : 1px solid ThreeDDarkShadow;
border-bottom : 1px solid ThreeDDarkShadow;
}
.popup-internal-box
{
border-left : 1px solid ThreeDHighlight;
border-top : 1px solid ThreeDHighlight;
border-right : 1px solid ThreeDShadow;
border-bottom : 1px solid ThreeDShadow;
padding : 1px;
}
/** Tooltips (tooltip <popup> element)
* class="tooltip"
**/
.tooltip
{
border : 1px solid WindowFrame;
padding : 2px;
max-width : 40em;
background-color : InfoBackground;
color : InfoText;
font : message-box;
}
.tooltip > .popup-internal-box
{
border : 0px;
padding : 0px;
}
/* rules for popups associated with menulists */
menulist > menupopup,
.menulist-menupopup
{
border : 1px solid -moz-FieldText;
min-width : 0px;
background-color : -moz-Field;
}

Просмотреть файл

@ -0,0 +1,61 @@
/**
* XUL <progressmeter>
**/
progressmeter[mode="undetermined"] > .progressmeter-internal-box
{
background-image : url(chrome://global/skin/progressmeter-busy.gif);
}
progressmeter[mode="undetermined"] > .progressmeter-internal-box > .progressmeter-stack > .progressmeter-progressbar
{
visibility : collapse;
}
progressmeter
{
min-width : 100px;
border-left : 1px solid ThreeDShadow;
border-top : 1px solid ThreeDShadow;
border-right : 1px solid ThreeDHighlight;
border-bottom : 1px solid ThreeDHighlight;
background-color : -moz-Dialog;
}
.progressmeter-statusbar
{
border-left : 1px solid ThreeDHighlight;
border-top : 1px solid ThreeDHighlight;
border-right : 1px solid ThreeDShadow;
border-bottom : 1px solid ThreeDShadow;
}
.progress-text
{
visibility : collapse;
}
.progressmeter-internal-box
{
border : 1px solid -moz-Dialog;
padding : 1px;
}
.progressmeter-inset
{
margin : 1px 5px 2px 5px;
}
.progressmeter-inset > .progressmeter-internal-box
{
border-left : 1px solid ThreeDDarkShadow;
border-top : 1px solid ThreeDDarkShadow;
border-right : 1px solid ThreeDHighlight;
border-bottom : 1px solid ThreeDHighlight;
}
/* progress indicators */
.progress-bar
{
background-color : ThreeDShadow;
}

Просмотреть файл

@ -4,7 +4,6 @@
/* outer frame */
radio
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#radio");
margin : 3px 5px 3px 5px;
}

Просмотреть файл

@ -0,0 +1,29 @@
/*
* Autorepeatbutton
*/
.autorepeatbutton-up
{
list-style-image : url("chrome://global/skin/scroll-up.gif")
}
.autorepeatbutton-down
{
list-style-image : url("chrome://global/skin/scroll-down.gif")
}
autorepeatbutton
{
margin : 1px 2px 2px 1px;
border : 1px solid transparent;
padding : 1px;
height : 1em;
text-align : center;
vertical-align : middle;
}
autorepeatbutton:hover
{
margin : 1px;
border : 1px inset ThreeDFace;
padding : 2px 1px 1px 2px;
}

Просмотреть файл

@ -16,7 +16,6 @@
grippy, grippy[collapse="before"]
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#grippy");
border : 1px solid ThreeDShadow;
list-style-image : url("chrome://global/skin/grippy-horizontal-before.gif");
cursor : pointer;
@ -65,7 +64,6 @@
vbox > splitter
{
cursor : n-resize;
-moz-binding : url("chrome://global/skin/classicBindings.xml#splitter-hack");
border-top : 1px solid ThreeDHighlight;
}

Просмотреть файл

@ -4,7 +4,7 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="tabs" extends="chrome://global/content/tabBindings.xml#tabs">
<binding id="tabs" extends="chrome://global/content/bindings/tabcontrol.xml#tabs">
<content>
<xul:box class="tabcontainer">
<children/>
@ -13,7 +13,7 @@
</content>
</binding>
<binding id="tabpanels" extends="chrome://global/content/tabBindings.xml#tabpanels">
<binding id="tabpanels" extends="chrome://global/content/bindings/tabcontrol.xml#tabpanels">
<content>
<xul:box class="tabpanels-inner-box" flex="1">
<children/>

Просмотреть файл

@ -3,7 +3,6 @@
/*============ tabpanels widget =============*/
tabpanels {
/*-moz-binding: url("chrome://global/skin/tabBindings.xml#tabpanels"); */
padding: 5px;
}
@ -47,12 +46,6 @@ tabpanels.light {
border-bottom: 1px solid ThreeDShadow;
}
/*============ tabs widget ============*/
tabs {
-moz-binding: url("chrome://global/skin/tabBindings.xml#tabs");
}
/* tabs-spring ========================== */
/* top tabs */

Просмотреть файл

@ -62,4 +62,26 @@
border : none !important;
}
/** inline edit textbox **/
.textbox-inline-edit
{
border : 1px solid WindowFrame !important;
margin : 0px !important;
}
.textbox-inline-edit > .textbox-internal-box > .textbox-input
{
border : none !important;
padding : 0px !important;
margin : 0px !important;
}
.textbox-inline-edit > .textbox-internal-box
{
border : none !important;
padding : 1px !important;
margin : 0px !important;
}

Просмотреть файл

@ -0,0 +1,18 @@
titledbox
{
border : 2px groove -moz-Dialog;
padding : 7px !important;
margin : 5px;
}
label
{
margin : 0px 40px 2px 6px;
padding : 0px 3px 0px 3px;
background-color : -moz-Dialog;
}
.titledbox-body
{
padding : inherit;
}

Просмотреть файл

@ -25,9 +25,18 @@ toolbar
border-bottom : 1px solid ThreeDShadow;
}
menubar
{
/* DON'T DELETE. Removes disappearance of scrollbars
* in content pane when window is made smaller.
* Talk to evaughan@netscape.com for details.
*/
min-width : 1px;
background-color : Menu;
}
toolbargrippy
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#toolbargrippy");
border-left : 1px solid ThreeDHighlight;
border-top : 1px solid ThreeDHighlight;
border-right : 1px solid ThreeDShadow;
@ -52,7 +61,6 @@ toolbargrippy
toolbargrippy[tbgrippy-collapsed="true"]
{
-moz-binding : url("chrome://global/skin/classicBindings.xml#toolbargrippy-collapsed");
border-left : 1px solid ThreeDHighlight;
border-top : 1px solid ThreeDHighlight;
border-right : 1px solid ThreeDShadow;

Просмотреть файл

@ -274,24 +274,3 @@ treerow[mode="inline-edit"]
margin-left : 0px;
}
.textbox-inline-edit
{
border : 1px solid WindowFrame !important;
margin : 0px !important;
}
.textbox-inline-edit > .textbox-internal-box > .textbox-input
{
border : none !important;
padding : 0px !important;
margin : 0px !important;
}
.textbox-inline-edit > .textbox-internal-box
{
border : none !important;
padding : 1px !important;
margin : 0px !important;
}

Просмотреть файл

@ -0,0 +1,38 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.wizard-header {
border-bottom: 2px groove ThreeDFace;
padding: 10px 0px 10px 0px;
background-color: #FFFFFF;
color: #000000;
}
.wizard-header-label {
margin-left: 23px;
font-weight: bold;
}
.wizard-header-description {
margin-left: 44px;
}
.wizard-page-box {
margin: 10px 44px;
}
.wizard-buttons-separator {
margin-bottom: 0px !important;
}
.wizard-buttons-box-2 {
margin: 10px;
}
.wizard-button[wizardbutton="finish"],
.wizard-button[wizardbutton="next"] {
margin-left: -1px !important;
}
.wizard-button[wizardbutton="back"] {
margin-right: 0px !important;
}

Просмотреть файл

@ -43,7 +43,7 @@
</handlers>
</binding>
<binding id="menulist-editable" extends="chrome://global/content/menulistBindings.xml#menulist">
<binding id="menulist-editable" extends="chrome://global/content/bindings/menulist.xml#menulist">
<content>
<xul:box autostretch="never" valign="middle" flex="1" class="menulist-container">
<xul:image class="menulist-icon" inherits="src" emattr="icon"/>

Просмотреть файл

@ -6,7 +6,7 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="autocomplete-result-popup" extends="chrome://global/content/autocomplete.xml#autocomplete-result-popup">
<content menugenerated="true">
<content menugenerated="true" orient="vertical">
<xul:box class="autocomplete-result-box" flex="1">
<xul:outliner anonid="outliner" class="autocomplete-outliner" flex="1">
<xul:outlinerbody anonid="outlinerbody" class="autocomplete-outlinerbody" flex="1"/>
@ -341,11 +341,4 @@
</handlers>
</binding>
<binding id="autocomplete-result" extends="chrome://global/content/xulBindings.xml#menuitem">
<content>
<xul:text class="menu-text autocomplete-page-url" inherits="value=label" flex="2" crop="right"/>
<xul:text class="autocomplete-page-title" inherits="value=comment" flex="1" crop="right"/>
</content>
</binding>
</bindings>

Просмотреть файл

@ -29,16 +29,6 @@ toolkit.jar:
content/global/treePopups.js (resources/content/treePopups.js)
content/global/nsTreeController.js (resources/content/nsTreeController.js)
content/global/nsTreeUtils.js (resources/content/nsTreeUtils.js)
content/global/xulBindings.xml (resources/content/xulBindings.xml)
content/global/browserBindings.xml (resources/content/browserBindings.xml)
content/global/menulistBindings.xml (resources/content/menulistBindings.xml)
content/global/radioBindings.xml (resources/content/radioBindings.xml)
content/global/scrollbarBindings.xml (resources/content/scrollbarBindings.xml)
content/global/tabBindings.xml (resources/content/tabBindings.xml)
content/global/treeBindings.xml (resources/content/treeBindings.xml)
content/global/outlinerBindings.xml (resources/content/outlinerBindings.xml)
content/global/popupBindings.xml (resources/content/popupBindings.xml)
content/global/colorpickerBindings.xml (resources/content/colorpickerBindings.xml)
content/global/nsClipboard.js (resources/content/nsClipboard.js)
content/global/nsDragAndDrop.js (resources/content/nsDragAndDrop.js)
content/global/nsJSSupportsUtils.js (resources/content/nsJSSupportsUtils.js)
@ -46,9 +36,32 @@ toolkit.jar:
content/global/nsJSComponentManager.js (resources/content/nsJSComponentManager.js)
content/global/nsUserSettings.js (resources/content/nsUserSettings.js)
content/global/xul.css (resources/content/xul.css)
content/global/toolbarBindings.xml (resources/content/toolbarBindings.xml)
content/global/stringbundleBindings.xml (resources/content/stringbundleBindings.xml)
content/global/build.dtd (build.dtd)
content/global/bindings/browser.xml (resources/content/bindings/browser.xml)
content/global/bindings/button.xml (resources/content/bindings/button.xml)
content/global/bindings/checkbox.xml (resources/content/bindings/checkbox.xml)
content/global/bindings/colorpicker.xml (resources/content/bindings/colorpicker.xml)
content/global/bindings/general.xml (resources/content/bindings/general.xml)
content/global/bindings/menu.xml (resources/content/bindings/menu.xml)
content/global/bindings/menulist.xml (resources/content/bindings/menulist.xml)
content/global/bindings/menubutton.xml (resources/content/bindings/menubutton.xml)
content/global/bindings/outliner.xml (resources/content/bindings/outliner.xml)
content/global/bindings/outliner.css (resources/content/bindings/outliner.css)
content/global/bindings/popup.xml (resources/content/bindings/popup.xml)
content/global/bindings/progressmeter.xml (resources/content/bindings/progressmeter.xml)
content/global/bindings/radio.xml (resources/content/bindings/radio.xml)
content/global/bindings/scrollbar.xml (resources/content/bindings/scrollbar.xml)
content/global/bindings/scrollbox.xml (resources/content/bindings/scrollbox.xml)
content/global/bindings/splitter.xml (resources/content/bindings/splitter.xml)
content/global/bindings/stringbundle.xml (resources/content/bindings/stringbundle.xml)
content/global/bindings/tabcontrol.xml (resources/content/bindings/tabcontrol.xml)
content/global/bindings/text.xml (resources/content/bindings/text.xml)
content/global/bindings/textbox.xml (resources/content/bindings/textbox.xml)
content/global/bindings/titledbox.xml (resources/content/bindings/titledbox.xml)
content/global/bindings/toolbar.xml (resources/content/bindings/toolbar.xml)
content/global/bindings/tree.xml (resources/content/bindings/tree.xml)
content/global/bindings/tree.css (resources/content/bindings/tree.css)
content/global/bindings/wizard.xml (resources/content/bindings/wizard.xml)
en-US.jar:
locale/en-US/global/contents.rdf (resources/locale/en-US/contents.rdf)

Просмотреть файл

@ -34,7 +34,7 @@
- GPL.
-->
<bindings id="xulBindings"
<bindings id="browserBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

Просмотреть файл

@ -0,0 +1,109 @@
<?xml version="1.0"?>
<bindings id="buttonBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="button-base" extends="chrome://global/content/bindings/general.xml#basetext">
<resources>
<stylesheet src="chrome://global/skin/button.css"/>
</resources>
<implementation implements="nsIAccessible">
<method name="getAccDefaultAction">
<body><![CDATA[
return 'Click';
]]></body>
</method>
<method name="getAccDescription">
<body><![CDATA[
return 'This is a button that can be clicked to perform an action';
]]></body>
</method>
<method name="getAccValue">
<body><![CDATA[
return this.getAttribute('value');
]]></body>
</method>
<method name="getAccName">
<body><![CDATA[
return 'Left Button';
]]></body>
</method>
<method name="getAccRole">
<body><![CDATA[
return 'push button';
]]></body>
</method>
<method name="accDoDefaultAction">
<body><![CDATA[
this.click();
]]></body>
</method>
<method name="getAccChildCount">
<body><![CDATA[
return 0;
]]></body>
</method>
<method name="getAccFirstChild">
<body><![CDATA[
return null;
]]></body>
</method>
<method name="getAccLastChild">
<body><![CDATA[
return null;
]]></body>
</method>
</implementation>
</binding>
<binding id="buttonleft" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-internal-box" autostretch="never" flex="1">
<xul:image class="button-icon" inherits="src"/>
<xul:box orient="vertical" class="button-text-container" autostretch="never" flex="1">
<xul:text class="button-text" inherits="value=label,accesskey,crop,dragover-top"/>
</xul:box>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="buttontop" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-internal-box" orient="vertical" autostretch="never" flex="1">
<xul:image class="button-icon" inherits="src"/>
<xul:box orient="vertical" class="button-text-container" autostretch="never" flex="1">
<xul:text class="button-text" inherits="value=label,accesskey,crop,dragover-top"/>
</xul:box>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="buttonright" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-internal-box" inherits="orient" autostretch="never" flex="1">
<xul:box orient="vertical" class="button-text-container" autostretch="never" flex="1">
<xul:text class="button-text" inherits="value=label,accesskey,crop,dragover-top"/>
</xul:box>
<xul:image class="button-icon" inherits="src"/>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="buttonbottom" extends="chrome://global/content/bindings/button.xml#button-base">
<content>
<xul:box class="button-internal-box" orient="vertical" autostretch="never" flex="1">
<xul:box orient="vertical" class="button-text-container" autostretch="never" flex="1">
<xul:text class="button-text" inherits="value=label,accesskey,crop,dragover-top"/>
</xul:box>
<xul:image class="button-icon" inherits="src"/>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
</bindings>

Просмотреть файл

@ -0,0 +1,40 @@
<?xml version="1.0"?>
<bindings id="checkboxBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="checkbox" extends="chrome://global/content/bindings/checkbox.xml#checkbox-baseline">
<resources>
<stylesheet src="chrome://global/skin/checkbox.css"/>
</resources>
</binding>
<binding id="checkbox-baseline">
<content>
<xul:box flex="1" class="internal-box" autostretch="never" valign="top">
<xul:box class="checkmark-box" autostretch="never">
<xul:image class="checkbox-check"/>
</xul:box>
<xul:image class="checkbox-icon" inherits="src"/>
<xul:html class="checkbox-label" inherits="value=label,accesskey,crop" flex="1">
<children/>
</xul:html>
</xul:box>
</content>
<implementation>
<!-- public implementation -->
<property name="checked" onset="if (val) this.setAttribute('checked', 'true');
else this.removeAttribute('checked');
return val;"
onget="var v = this.getAttribute('checked');
if (v == 'true') return true; return false;"/>
</implementation>
<handlers>
<handler event="click" button="0" action="if (!this.disabled) this.checked = !this.checked;"/>
<handler event="keypress" key=" " action="if (!this.disabled) this.checked = !this.checked;"/>
</handlers>
</binding>
</bindings>

Просмотреть файл

@ -1,10 +1,14 @@
<?xml version="1.0"?>
<bindings id="xulBindings"
<bindings id="colorpickerBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="colorpicker" extends="xul:box">
<binding id="colorpicker">
<resources>
<stylesheet src="chrome://global/skin/colorpicker.css"/>
</resources>
<content>
<xul:box flex="1" orient="vertical">
@ -130,6 +134,7 @@
<method name="resetHover">
<body><![CDATA[
dump("go!\n");
if (this.mHoverCell)
this.mHoverCell.removeAttribute("hover");
]]></body>
@ -256,7 +261,11 @@
</handlers>
</binding>
<binding id="colorpickerButton" extends="xul:box">
<binding id="colorpicker-button">
<resources>
<stylesheet src="chrome://global/skin/colorpicker.css"/>
</resources>
<content>
<xul:box class="colorpicker-button-internal-box" allowevents="true" flex="1">
@ -350,7 +359,8 @@
this.mOpen = true;
this.setAttribute("open", "true");
this.mPicker.resetHover();
if ("resetHover" in this.mPicker)
this.mPicker.resetHover();
document._focusedPicker = this;
document.addEventListener("keydown", this.mPickerKeyDown, true);

Просмотреть файл

@ -0,0 +1,255 @@
<?xml version="1.0"?>
<bindings id="generalBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="basetext">
<implementation>
<!-- public implementation -->
<property name="label" onset="return this.setAttribute('label',val);"
onget="return this.getAttribute('label');"/>
<property name="crop" onset="return this.setAttribute('crop',val);"
onget="return this.getAttribute('crop');"/>
<property name="disabled" onset="if (val) this.setAttribute('disabled', 'true');
else this.removeAttribute('disabled');
return val;"
onget="var v = this.getAttribute('disabled');
if (v == 'true') return true; return false;"/>
<property name="src" onset="return this.setAttribute('src',val);"
onget="return this.getAttribute('src');"/>
<property name="accesskey" onset="return this.setAttribute('accesskey',val);"
onget="return this.getAttribute('accesskey');"/>
<property name="imgalign" onset="return this.setAttribute('imgalign',val);"
onget="return this.getAttribute('imgalign');"/>
</implementation>
</binding>
<binding id="text-label">
<handlers>
<handler event="click" action="var forElementID = this.getAttribute('for');
if (forElementID)
var forElement = document.getElementById(forElementID);
if(forElement)
forElement.focus();
"/>
</handlers>
</binding>
<!--
Inline Editable UI Element
- This binding forms the basis of the inline edit treecell and the inline edit
- buttons.
- TODO: investigate creating extensions to the wrapper widgets (tree, toolbar)
- to make them provide some object implementing an interface similar to
- outliner's so we can build in some of the ile behavior (such as going
- in and out of the mode, asking isEditable etc) so as to remove some of
- the burden from the implementor.
-
- Note that this widget will be no longer used in the bookmarks window once
- outliner is extended to have this functionality built in.
-->
<binding id="inline-edit-base" extends="chrome://global/content/bindings/general.xml#basetext">
<implementation>
<property name="_mode">0</property>
<method name="setMode">
<parameter name="val"/>
<body>
<![CDATA[
var ctr = document.getAnonymousElementByAttribute(this, "ileattr", "text-container");
var txt = document.getAnonymousElementByAttribute(this, "ileattr", "text");
this.setAttribute("mode", val);
if (val == "edit") {
var nodes = document.getAnonymousNodes(this);
if (txt.getAttribute("hidden") != "true") {
ctr.setAttribute("mode", "edit");
var width = ctr.boxObject.width;
txt.setAttribute("hidden", "true");
const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
var field = document.createElementNS(kXULNS, "textbox");
field.className = "textbox-inline-edit";
field.setAttribute("flex", "1");
field.setAttribute("value", txt.getAttribute("value"));
field.setAttribute("ileattr", "field");
field.setAttribute("rootcontent", txt.getAttribute("rootcontent"));
field.setAttribute("style", "width: " + width + "px");
ctr.appendChild(field);
field.addEventListener("keydown", this.fieldKeyDown, false);
field.addEventListener("change", this.fieldChange, false);
field.select();
}
}
else {
nodes = document.getAnonymousNodes(this);
var fld = document.getAnonymousElementByAttribute(this, "ileattr", "field");
if (fld && txt.getAttribute("hidden") == "true") {
ctr.removeAttribute("mode");
fld.blur();
ctr.removeChild(fld);
txt.removeAttribute("hidden");
}
}
]]>
</body>
</method>
<property name="_observers">
<![CDATA[
({
reject: [],
accept: []
})
]]>
</property>
<property name="valueIsRejected">false</property>
<method name="addObserver">
<parameter name="aObserver"/>
<parameter name="aTopic"/>
<parameter name="aParams"/>
<body>
this._observers[aTopic].push({ callback: aObserver, params: aParams });
</body>
</method>
<method name="fieldKeyDown">
<parameter name="aEvent"/>
<body>
<![CDATA[
var rootLocalName = aEvent.target.getAttribute("rootcontent");
if (rootLocalName) {
// Root content is the bound element.
var rootContent = aEvent.target;
while (rootContent && rootContent.localName != rootLocalName)
rootContent = rootContent.parentNode;
if (rootContent) {
var ctr = document.getAnonymousElementByAttribute(rootContent, "ileattr", "text-container");
if (aEvent.keyCode == 13) {
rootContent.valueIsRejected = false;
rootContent.fieldChange(aEvent);
}
if (aEvent.keyCode == 27) {
rootContent.valueIsRejected = true;
var fld = document.getAnonymousElementByAttribute(rootContent, "ileattr", "field");
for (i = 0; i < rootContent._observers["reject"].length; ++i)
rootContent._observers["reject"][i].callback(rootContent._observers["reject"][i].params.concat(fld.value), "reject");
if ("setMode" in rootContent)
rootContent.setMode("normal");
}
}
}
aEvent.preventBubble();
]]>
</body>
</method>
<property name="valueIsAccepted">false</property>
<method name="fieldChange">
<parameter name="aEvent"/>
<body>
<![CDATA[
var rootLocalName = this.getAttribute("rootcontent");
if (rootLocalName) {
// Root content is the bound element.
var rootContent = this;
while (rootContent && rootContent.localName != rootLocalName)
rootContent = rootContent.parentNode;
if (rootContent) {
var ctr = document.getAnonymousElementByAttribute(rootContent, "ileattr", "text-container");
if (!rootContent.valueIsRejected) {
var fld = document.getAnonymousElementByAttribute(rootContent, "ileattr", "field");
for (var i = 0; i < rootContent._observers["accept"].length; ++i)
rootContent._observers["accept"][i].callback(rootContent._observers["accept"][i].params.concat(fld.value), "accept");
if ("setMode" in rootContent)
rootContent.setMode("normal");
}
}
}
]]>
</body>
</method>
</implementation>
</binding>
<!-- inline editable buttons -->
<binding id="buttonleft-ile" extends="chrome://global/content/bindings/general.xml#inline-edit-base">
<content>
<xul:hbox class="button-internal-box" autostretch="never" flex="1">
<xul:image class="button-icon" inherits="src"/>
<xul:vbox class="button-text-container" autostretch="never" flex="1" ileattr="text-container">
<xul:text class="button-text" inherits="value=label,accesskey,crop,dragover-top" ileattr="text" rootcontent="button"/>
</xul:vbox>
</xul:hbox>
<children includes="menupopup"/>
</content>
</binding>
<binding id="browser">
<implementation>
<property name="docShell"
readonly="true"
onget="return this.boxObject.QueryInterface(Components.interfaces.nsIBrowserBoxObject).docShell;"/>
<property name="webNavigation"
readonly="true"
onget="return this.docShell.QueryInterface(Components.interfaces.nsIWebNavigation);"/>
<property name="webBrowserFind"
readonly="true"
onget="return this.docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebBrowserFind);"/>
<property name="markupDocumentViewer"
readonly="true"
onget="return this.docShell.contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);"/>
<property name="contentViewerEdit"
readonly="true"
onget="return this.docShell.contentViewer.QueryInterface(Components.interfaces.nsIContentViewerEdit);"/>
<property name="contentViewerFile"
readonly="true"
onget="return this.docShell.contentViewer.QueryInterface(Components.interfaces.nsIContentViewerFile);"/>
<property name="documentCharsetInfo"
readonly="true"
onget="return this.docShell.documentCharsetInfo;"/>
</implementation>
</binding>
<binding id="editor">
<implementation>
<property name="editorShell"
readonly="true"
onget="return this.boxObject.QueryInterface(Components.interfaces.nsIEditorBoxObject).editorShell"/>
<property name="webNavigation"
onget="return this.docShell.QueryInterface(Components.interfaces.nsIWebNavigation);"
readonly="true"/>
<property name="contentDocument" readonly="true"
onget="return this.webNavigation.document;"/>
</implementation>
</binding>
<binding id="iframe">
<implementation>
<property name="docShell"
readonly="true"
onget="return this.boxObject.QueryInterface(Components.interfaces.nsIIFrameBoxObject).docShell"/>
<property name="webNavigation"
onget="return this.docShell.QueryInterface(Components.interfaces.nsIWebNavigation);"
readonly="true"/>
<property name="contentDocument" readonly="true"
onget="return this.webNavigation.document;"/>
</implementation>
</binding>
<binding id="statusbar-panel" extends="xul:button">
<content autostretch="never" valign="middle">
<xul:image class="statusbar-panel-icon" inherits="src"/>
<xul:text class="statusbar-panel-text" inherits="value=label,crop" crop="right" flex="1"/>
</content>
<implementation>
<property name="label"
onget="return this.getAttribute('label');"
onset="this.setAttribute('label',val); return val;"/>
<property name="src"
onget="return this.getAttribute('src');"
onset="this.setAttribute('src',val); return val;"/>
</implementation>
</binding>
</bindings>

Просмотреть файл

@ -0,0 +1,30 @@
<?xml version="1.0"?>
<bindings id="titledboxBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="titledbox-base">
<resources>
<stylesheet src="chrome://global/skin/titledbox.css"/>
</resources>
</binding>
<binding id="titledbox" extends="chrome://global/content/bindings/titledbox.xml#titledbox-base">
<content>
<xul:box class="titledbox-title" autostretch="never" orient="vertical">
<children includes="label"/>
</xul:box>
<xul:box flex="1" class="titledbox-body" inherits="orient,autostretch,align,valign">
<children/>
</xul:box>
</content>
</binding>
<binding id="label" extends="chrome://global/content/bindings/titledbox.xml#titledbox-base">
<content>
<xul:text inherits="value"/>
</content>
</binding>
</bindings>

Просмотреть файл

@ -0,0 +1,100 @@
<?xml version="1.0"?>
<bindings id="menuitemBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="menuitem-base">
<resources>
<stylesheet src="chrome://global/skin/menu.css"/>
</resources>
</binding>
<binding id="menu" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
<content autostretch="never">
<xul:text class="menu-text" flex="1" align="left" inherits="value=label,accesskey,crop" crop="right"/>
<xul:text class="menu-accel" inherits="value=acceltext"/>
<xul:box autostretch="never" class="menu-right" inherits="menuactive,disabled">
<xul:image/>
</xul:box>
<children includes="menupopup"/>
</content>
<implementation>
<property name="value" onset="this.setAttribute('value',val); return val;"
onget="return this.getAttribute('value');"/>
</implementation>
</binding>
<binding id="menuitem" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
<content autostretch="never">
<xul:text class="menu-text" flex="1" align="left" inherits="value=label,accesskey,crop" crop="right"/>
<xul:text class="menu-accel" inherits="value=acceltext"/>
</content>
<implementation>
<property name="value" onset="this.setAttribute('value',val); return val;"
onget="return this.getAttribute('value');"/>
</implementation>
</binding>
<binding id="menu-menubar" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
<content>
<xul:text class="menubar-text" inherits="value=label,accesskey,crop" crop="right"/>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menu-menubar-iconic" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
<content>
<xul:image class="menubar-left"/>
<xul:text class="menubar-text" inherits="value=label,accesskey,crop" crop="right"/>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menuitem-iconic" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
<content>
<xul:box class="menu-iconic-left" orient="vertical" autostretch="never"
inherits="selected,menuactive,disabled,checked">
<xul:image inherits="src"/>
</xul:box>
<xul:text class="menu-iconic-text" flex="1" align="left" inherits="value=label,accesskey,crop" crop="right"/>
<xul:text class="menu-iconic-accel" inherits="value=acceltext"/>
</content>
<implementation>
<property name="value" onset="this.setAttribute('value',val); return val;"
onget="return this.getAttribute('value');"/>
</implementation>
</binding>
<binding id="menu-iconic" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
<content autostretch="never">
<xul:box class="menu-iconic-left" orient="vertical" autostretch="never">
<xul:image inherits="src"/>
</xul:box>
<xul:text class="menu-iconic-text" flex="1" align="left" inherits="value=label,accesskey,crop" crop="right"/>
<xul:text class="menu-iconic-accel" inherits="value=acceltext"/>
<xul:box orient="vertical" autostretch="never" class="menu-right" inherits="menuactive,disabled">
<xul:image/>
</xul:box>
<children includes="menupopup|template"/>
</content>
<implementation>
<property name="value" onset="this.setAttribute('value',val); return val;"
onget="return this.getAttribute('value');"/>
</implementation>
</binding>
<binding id="menubutton-item" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
<content autostretch="never">
<xul:text class="menubutton-text" flex="1" inherits="value=label,accesskey,crop" crop="right"/>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menuseparator" extends="chrome://global/content/bindings/menu.xml#menuitem-base"/>
</bindings>

Просмотреть файл

@ -0,0 +1,212 @@
<?xml version="1.0"?>
<bindings id="menubuttonBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="menubutton-base">
<resources>
<stylesheet src="chrome://global/skin/menubutton.css"/>
</resources>
</binding>
<binding id="menubutton-single-right" extends="chrome://global/content/bindings/menubutton.xml#menubutton-base">
<content>
<xul:box class="menubutton-internal-box" autostretch="never">
<xul:text class="menubutton-single-text" inherits="value=label,crop,accesskey"/>
<xul:image class="menubutton-single-icon"/>
</xul:box>
<children includes="menupopup|template"/>
</content>
</binding>
<binding id="menubutton-single-left" extends="chrome://global/content/bindings/menubutton.xml#menubutton-base">
<content>
<xul:box class="menubutton-internal-box" autostretch="never">
<xul:image class="menubutton-single-icon"/>
<xul:text class="menubutton-single-text" inherits="value=label,crop,accesskey"/>
</xul:box>
<children includes="menupopup|template"/>
</content>
</binding>
<binding id="menubutton-single-top" extends="chrome://global/content/bindings/menubutton.xml#menubutton-base">
<content>
<xul:box class="button-internal-box" autostretch="never" orient="vertical" flex="1">
<xul:image class="menubutton-single-icon"/>
<xul:text class="menubutton-single-text" inherits="value=label,crop,accesskey"/>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-single-bottom" extends="chrome://global/content/bindings/menubutton.xml#menubutton-base">
<content>
<xul:box class="button-internal-box" autostretch="never" orient="vertical" flex="1">
<xul:text class="menubutton-single-text" inherits="value=label,crop,accesskey"/>
<xul:image class="menubutton-single-icon"/>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-icon" extends="chrome://global/content/bindings/menubutton.xml#menubutton-base">
<content>
<xul:box class="menubutton-icon-internal-box" autostretch="never">
<xul:image class="menubutton-icon-icon" inherits="src"/>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-dual-top" extends="chrome://global/content/bindings/menubutton.xml#menubutton-base">
<content>
<xul:box class="menubutton-internal-box">
<xul:button class="menubutton-dual-button top" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
<xul:image class="menubutton-dropmarker"/>
</xul:box>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-dual-left" extends="chrome://global/content/bindings/menubutton.xml#menubutton-base">
<content>
<xul:box class="menubutton-internal-box">
<xul:button class="menubutton-dual-button left" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
<xul:image class="menubutton-dropmarker"/>
</xul:box>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-dual-right" extends="chrome://global/content/bindings/menubutton.xml#menubutton-base">
<content>
<xul:box class="menubutton-internal-box">
<xul:button class="menubutton-dual-button right" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
<xul:image class="menubutton-dropmarker"/>
</xul:box>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-dual-bottom" extends="chrome://global/content/bindings/menubutton.xml#menubutton-base">
<content>
<xul:box class="menubutton-internal-box">
<xul:button class="menubutton-dual-button bottom" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
<xul:image class="menubutton-dropmarker"/>
</xul:box>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-dual-ex" extends="chrome://global/content/bindings/menubutton.xml#menubutton-dual-top">
<content>
<xul:button class="menubutton-dual-ex-button top" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey,disabled"
onmouseover="this.parentNode.buttonover = true;"
onmouseout="this.parentNode.buttonover = false;"
onmousedown="this.parentNode.buttondown = true; this.parentNode.captureMouseUp();"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle" inherits="disabled">
<xul:image class="menubutton-dropmarker" inherits="disabled"/>
</xul:box>
<children includes="menupopup"/>
</content>
<implementation>
<property name="buttonover">
<getter>
return this.getAttribute("buttonover");
</getter>
<setter>
<![CDATA[
if (!val && this.getAttribute("buttondown") == "true") {
this.removeAttribute("buttondown");
this._pendingActive = true;
}
else {
if (this._pendingActive) {
this.setAttribute("buttondown", "true");
this._pendingActive = false;
}
}
this.setAttribute("buttonover", val);
return val;
]]>
</setter>
</property>
<property name="buttondown">
<getter>
return this.getAttribute("buttondown");
</getter>
<setter>
this.setAttribute("buttondown", val);
return val;
</setter>
</property>
<property name="_pendingActive">false</property>
<property name="_buttonIsDown">false</property>
<property name="_globalMouseUpHandler" readonly="true">
<![CDATA[
var fn = function(aEvent)
{
var btn = document.__MenubuttonDualExMouseDown__;
btn.onMouseReallyUp();
document.removeEventListener("mouseup", btn._globalMouseUpHandler, true);
document.__MenubuttonDualExMouseDown__ = null;
};
fn;
]]>
</property>
<method name="captureMouseUp">
<body>
<![CDATA[
document.__MenubuttonDualExMouseDown__ = this;
document.addEventListener("mouseup", this._globalMouseUpHandler, true);
]]>
</body>
</method>
<method name="onMouseReallyUp">
<body>
<![CDATA[
this._pendingActive = false;
this.buttondown = false;
]]>
</body>
</method>
</implementation>
</binding>
<binding id="menubutton-dual-ex-left" extends="chrome://global/content/bindings/menubutton.xml#menubutton-dual-ex">
<content>
<xul:button class="menubutton-dual-ex-button left" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey,disabled"
onmouseover="this.parentNode.buttonover = true;"
onmouseout="this.parentNode.buttonover = false;"
onmousedown="this.parentNode.buttondown = true;"
onmouseup="this.parentNode.buttondown = false;"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle" inherits="disabled">
<xul:image class="menubutton-dropmarker" inherits="disabled"/>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
</bindings>

Просмотреть файл

@ -0,0 +1,221 @@
<?xml version="1.0"?>
<bindings id="menulistBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="menulist-base">
<resources>
<stylesheet src="chrome://global/skin/menulist.css"/>
</resources>
</binding>
<binding id="menulist" display="xul:menu"
extends="chrome://global/content/bindings/menulist.xml#menulist-base">
<content>
<xul:image class="menu-icon" inherits="src"/>
<xul:text class="menu-text" flex="1" inherits="value=label,accesskey,crop" crop="right"/>
<xul:image class="menu-dropmarker"/>
<children includes="menupopup"/>
</content>
<handlers>
<handler event="command" phase="capturing"
action="if (event.originalTarget.localName == 'menuitem') this.selectedItem = event.originalTarget;"/>
<handler event="create">
<![CDATA[
if (event.target.parentNode == this && this.selectedItem) {
// Not ready for auto-setting the active child in hierarchies yet.
// For now, only do this when the outermost menupopup opens.
var menuBox = this.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject);
menuBox.activeChild = this.selectedItem;
}
]]>
</handler>
</handlers>
<implementation>
<constructor>
this.setInitialSelection()
</constructor>
<method name="setInitialSelection">
<body>
<![CDATA[
this.setAttribute('sizetopopup', 'true');
if (!this.label && this.childNodes.length) {
var arr = this.firstChild.getElementsByAttribute('selected', 'true');
if (!arr.length && this.value)
arr = this.firstChild.getElementsByAttribute('value', this.value);
if (arr.length)
this.selectedItem = arr[0];
else
this.selectedIndex = 0;
}
]]>
</body>
</method>
<property name="value" onget="return this.getAttribute('value');">
<setter>
<![CDATA[
var arr;
if (this.childNodes.length)
arr = this.firstChild.getElementsByAttribute('value', val);
if (arr && arr.length)
this.selectedItem = arr[0];
else
this.setAttribute('value', val);
return val;
]]>
</setter>
</property>
<property name="crop" onset="this.setAttribute('crop',val); return val;"
onget="return this.getAttribute('crop');"/>
<property name="src" onset="this.setAttribute('src',val); return val;"
onget="return this.getAttribute('src');"/>
<property name="label" onset="this.setAttribute('label',val); return val;"
onget="return this.getAttribute('label');"/>
<property name="disabled" onset="if (val) this.setAttribute('disabled',true);
else this.removeAttribute('disabled');
return val;"
onget="return (this.getAttribute('disabled')=='true');"/>
<property name="selectedInternal">
null
</property>
<property name="selectedIndex">
<getter>
<![CDATA[
// Quick and dirty. We won't deal with hierarchical menulists yet.
if (!this.selectedItem)
return -1;
var children = this.selectedItem.parentNode.childNodes;
for (var i = 0; i < children.length; i++) {
if (children[i] == this.selectedItem)
return i;
}
return -1;
]]>
</getter>
<setter>
<![CDATA[
if (val < 0)
this.selectedItem = null;
else {
var curr = this.firstChild;
while (curr && curr.localName != 'menupopup')
curr = curr.nextSibling;
if (curr && val < curr.childNodes.length)
this.selectedItem = curr.childNodes[val];
}
return val;
]]>
</setter>
</property>
<property name="selectedItem">
<getter>
<![CDATA[
return this.selectedInternal;
]]>
</getter>
<setter>
<![CDATA[
if (this.selectedInternal == val)
return val;
if (this.selectedInternal)
this.selectedInternal.removeAttribute('selected');
this.selectedInternal = val;
if (!this.selectedInternal) {
this.removeAttribute('value');
this.removeAttribute('src');
this.removeAttribute('label');
return val;
}
val.setAttribute('selected', 'true');
this.setAttribute('value', val.getAttribute('value'));
this.setAttribute('src', val.getAttribute('src'));
this.setAttribute('label', val.getAttribute('label'));
return val;
]]>
</setter>
</property>
</implementation>
</binding>
<binding id="menulist-editable" extends="chrome://global/content/bindings/menulist.xml#menulist">
<content>
<xul:box flex="1" class="menulist-editable-box">
<xul:image class="menu-icon" inherits="src"/>
<html:input type="text" flex="1" class="menulist-editable-text" allowevents="true"
inherits="value=label,disabled"/>
<xul:image class="menu-dropmarker"/>
</xul:box>
<children includes="menupopup"/>
</content>
<implementation>
<property name="inputField" readonly="true">
<![CDATA[
var v = document.getAnonymousNodes(this);
var input = null;
for (var i = 0; i < v.length; i++) {
try {
var l = v[i].getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "input");
if (l.length > 0) {
input = l[0];
break;
}
} catch (e) {}
}
input;
]]>
</property>
<property name="label" onset="this.inputField.value = val; return val;"
onget="return this.inputField.value;"/>
</implementation>
<handlers>
<handler event="focus" phase="capturing">
<![CDATA[
if (this.getAttribute('focused') != 'true') {
this.setAttribute('focused','true');
this.suppressFocusBlur = true;
if (document.commandDispatcher.focusedElement != this.inputField)
this.inputField.focus();
this.suppressFocusBlur = false;
}
]]>
</handler>
<handler event="blur" phase="capturing">
<![CDATA[
if (!this.suppressFocusBlur && this.getAttribute('focused') == 'true') {
this.removeAttribute('focused');
}
]]>
</handler>
</handlers>
</binding>
</bindings>

Просмотреть файл

@ -0,0 +1,20 @@
outliner {
-moz-user-select: none;
min-width: 0px;
min-height: 0px;
width: 10px;
height: 10px;
}
outlinercol {
min-width: 16px;
}
outlinercol[hidden="true"] {
visibility: collapse;
display: -moz-xul-box;
}

Просмотреть файл

@ -2,10 +2,16 @@
<bindings id="outlinerBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="outliner">
<binding id="outliner-base">
<resources>
<stylesheet src="chrome://global/content/bindings/outliner.css"/>
<stylesheet src="chrome://global/skin/outliner.css"/>
</resources>
</binding>
<binding id="outliner" extends="chrome://global/content/bindings/outliner.xml#outliner-base">
<content orient="vertical">
<xul:box class="outliner-columns">
<children includes="outlinercol|splitter"/>
@ -15,6 +21,7 @@
<children/>
</xul:outlinerrows>
</content>
<implementation>
<property name="outlinerBoxObject"
onget="return this.boxObject.QueryInterface(Components.interfaces.nsIOutlinerBoxObject);"
@ -29,14 +36,15 @@
-1
</property>
</implementation>
<handlers>
<handler event="focus" action="this.outlinerBoxObject.focused = true;"/>
<handler event="blur" action="this.outlinerBoxObject.focused = false;"/>
<handler event="dragenter" action="this.outlinerBoxObject.onDragEnter(event);"/>
<handler event="dragexit" action="this.outlinerBoxObject.onDragExit(event);"/>
<handler event="dragover" action="this.outlinerBoxObject.onDragOver(event);"/>
<handler event="dragdrop" action="this.outlinerBoxObject.onDragDrop(event);"/>
<handler event="focus" action="this.outlinerBoxObject.focused = true;"/>
<handler event="blur" action="this.outlinerBoxObject.focused = false;"/>
<handler event="dragenter" action="this.outlinerBoxObject.onDragEnter(event);"/>
<handler event="dragexit" action="this.outlinerBoxObject.onDragExit(event);"/>
<handler event="dragover" action="this.outlinerBoxObject.onDragOver(event);"/>
<handler event="dragdrop" action="this.outlinerBoxObject.onDragDrop(event);"/>
<handler event="keypress" keycode="vk_enter">
<![CDATA[
@ -397,7 +405,12 @@
</handlers>
</binding>
<binding id="outlinerrows" extends="xul:box">
<binding id="outlinerrows" extends="chrome://global/content/bindings/outliner.xml#outliner-base">
<resources>
<stylesheet src="chrome://global/content/bindings/outliner.css"/>
<stylesheet src="chrome://global/skin/outliner.css"/>
</resources>
<content>
<xul:box flex="1" class="outliner-bodybox">
<children/>
@ -406,7 +419,7 @@
</content>
</binding>
<binding id="outlinerbody">
<binding id="outlinerbody" extends="chrome://global/content/bindings/outliner.xml#outliner-base">
<handlers>
<!-- If there is no modifier key, we select on mousedown, not
click, so that drags work correctly. -->
@ -415,7 +428,7 @@
if (!event.ctrlKey && !event.shiftKey && !event.metaKey) {
var row = {};
var col = {};
var obj = {};
var obj = {};
var b = this.parentNode.outlinerBoxObject;
b.getCellAt(event.clientX, event.clientY, row, col, obj);
@ -502,10 +515,10 @@
</handlers>
</binding>
<binding id="outlinercol">
<binding id="outlinercol" extends="chrome://global/content/bindings/outliner.xml#outliner-base">
<content>
<xul:box class="outlinercol-box" flex="1" autostretch="never">
<xul:image class="outliner-icon" inherits="src"/>
<xul:image class="outliner-image" inherits="src"/>
<xul:text class="outlinercol-text" inherits="crop,value=label" flex="1" crop="right"/>
<xul:image class="outlinercol-sortdirection"/>
</xul:box>
@ -515,7 +528,7 @@
</handlers>
</binding>
<binding id="outlinercol-image">
<binding id="outlinercol-image" extends="chrome://global/content/bindings/outliner.xml#outliner-base">
<content>
<xul:box class="outlinercol-image-box" flex="1" autostretch="never">
<xul:image class="outlinercol-icon" inherits="src"/>
@ -526,7 +539,7 @@
</handlers>
</binding>
<binding id="columnpicker">
<binding id="columnpicker" extends="chrome://global/content/bindings/outliner.xml#outliner-base">
<content>
<xul:menu class="outliner-colpicker-menu" autostretch="never" allowevents="true">
<xul:image class="outliner-colpicker-icon"/>
@ -534,30 +547,26 @@
oncreate="this.parentNode.parentNode.buildPopup(this);"/>
</xul:menu>
</content>
<implementation>
<method name="buildPopup">
<parameter name="aPopup"/>
<body>
<![CDATA[
var popupChild = aPopup.firstChild;
var firstTime = !popupChild ? true : false;
var currCol = this.parentNode.parentNode.firstChild;
var count = 0;
// we no longer cache the picker content.
// remove the old content
while (aPopup.childNodes.length) {
aPopup.removeChild(aPopup.childNodes[0]);
}
while (currCol) {
while (currCol && (currCol.localName != "outlinercol" ||
currCol.getAttribute("primary") == "true"))
while (currCol && currCol.localName != "outlinercol")
currCol = currCol.nextSibling;
if (currCol && (currCol != this)) {
// Construct an entry for each cell in the row, unless it is not being shown
if (currCol.getAttribute("ignoreincolumnpicker") != "true") {
// Construct an entry for each cell in the row.
if (firstTime) {
var columnName = currCol.getAttribute("label");
var popupChild = document.createElement("menuitem");
popupChild = document.createElement("menuitem");
popupChild.setAttribute("type", "checkbox");
popupChild.setAttribute("label", columnName);
if (columnName == "") {
@ -594,7 +603,7 @@
]]>
</body>
</method>
</implementation>
</implementation>
</binding>
</bindings>

Просмотреть файл

@ -1,8 +1,107 @@
<?xml version="1.0"?>
<bindings id="popupBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="popup-base">
<resources>
<stylesheet src="chrome://global/skin/popup.css"/>
</resources>
</binding>
<binding id="popup" extends="chrome://global/content/bindings/popup.xml#popup-base">
<content>
<xul:arrowscrollbox class="popup-internal-box" flex="1" orient="vertical">
<children/>
</xul:arrowscrollbox>
</content>
<implementation>
<method name="openPopup">
<parameter name="element"/>
<parameter name="xpos"/>
<parameter name="ypos"/>
<parameter name="popuptype"/>
<parameter name="anchoralignment"/>
<parameter name="popupalignment"/>
<body>
<![CDATA[
try {
var popupSetBox = this.parentNode.boxObject.QueryInterface(Components.interfaces.nsIPopupSetBoxObject);
} catch(e) {}
try {
var menuBox = this.parentNode.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject);
} catch(e) {}
if (popupSetBox)
popupSetBox.createPopup(element, this, xpos, ypos, popuptype, anchoralignment, popupalignment);
else if (menuBox)
menuBox.openMenu(true);
]]>
</body>
</method>
<method name="closePopup">
<body>
<![CDATA[
try {
var popupSetBox = this.parentNode.boxObject.QueryInterface(Components.interfaces.nsIPopupSetBoxObject);
} catch(e) {}
try {
var menuBox = this.parentNode.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject);
} catch(e) {}
if (popupSetBox)
popupSetBox.destroyPopup();
else if (menuBox)
menuBox.openMenu(false);
]]>
</body>
</method>
<property name="activeChild">
<getter>
<![CDATA[
try {
var popupSetBox = this.parentNode.boxObject.QueryInterface(Components.interfaces.nsIPopupSetBoxObject);
} catch(e) {}
try {
var menuBox = this.parentNode.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject);
} catch(e) {}
if (popupSetBox)
return popupSetBox.activeChild;
else if (menuBox)
return menuBox.activeChild;
throw Components.results.NS_ERROR_FAILURE;
]]>
</getter>
<setter>
<![CDATA[
try {
var popupSetBox = this.parentNode.boxObject.QueryInterface(Components.interfaces.nsIPopupSetBoxObject);
} catch(e) {}
try {
var menuBox = this.parentNode.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject);
} catch(e) {}
if (popupSetBox)
return popupSetBox.activeChild = val;
else if (menuBox)
return menuBox.activeChild = val;
throw Components.results.NS_ERROR_FAILURE;
]]>
</setter>
</property>
</implementation>
<handlers>
<handler event="contextmenu" action="event.preventDefault();"/>
</handlers>
</binding>
<binding id="tooltips" extends="chrome://global/content/bindings/popup.xml#popup">
<content>
<xul:box class="popup-internal-box" orient="vertical" flex="1">
<children/>
</xul:box>
</content>
</binding>
<binding id="resizerbase" extends="xul:box">
<implementation>
@ -20,6 +119,7 @@
]]>
</body>
</method>
<method name="handleMouseMove">
<parameter name="aEvent"/>
<body>
@ -28,11 +128,13 @@
]]>
</body>
</method>
<property name="screenLeft">0</property>
<property name="screenTop">0</property>
<property name="direction">0</property>
<property name="popup">0</property>
</implementation>
<handlers>
<handler event="mousedown" phase="capturing">
<![CDATA[
@ -66,7 +168,7 @@
</binding>
<!-- Right horizontal resizer -->
<binding id="r-resizer" extends="xul:box"> <!-- extends="chrome://global/content/popupBindings.xml#resizerbase"> -->
<binding id="r-resizer" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
<content>
<xul:box class="b-resizer-box" flex="1"/>
</content>
@ -100,7 +202,7 @@
</binding>
<!-- Bottom vertical resizer -->
<binding id="b-resizer" extends="xul:box"> <!-- extends="chrome://global/content/popupBindings.xml#resizerbase"> -->
<binding id="b-resizer" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
<content>
<xul:box class="b-resizer-box" flex="1"/>
</content>
@ -134,7 +236,7 @@
</binding>
<!-- Right/Bottom diagonal resizer -->
<binding id="rb-resizer" extends="xul:box"> <!-- extends="chrome://global/content/popupBindings.xml#resizerbase"> -->
<binding id="rb-resizer" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
<content>
<xul:box class="rb-resizer-box" autostretch="never" flex="1">
<xul:image class="rb-resizer-image"/>
@ -174,7 +276,7 @@
-->
</binding>
<binding id="titlebar" extends="xul:box"> <!-- extends="chrome://global/content/popupBindings.xml#resizerbase"> -->
<binding id="titlebar" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
<content>
<xul:box class="titlebar-box" flex="1">
<xul:box class="titlebar-title-box" flex="1" tooltip="aTooltip" tooltiptext="Click and drag to float">
@ -399,7 +501,7 @@
</handlers>
</binding>
<binding id="floater-normal" extends="chrome://global/content/popupBindings.xml#floater-base">
<binding id="floater-normal" extends="chrome://global/content/bindings/popup.xml#floater-base">
<xbl:content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
<box class="floater-box" orient="vertical" flex="1">
<box class="floater-box-top">
@ -418,7 +520,7 @@
</xbl:content>
</binding>
<binding id="floater-dock-left" extends="chrome://global/content/popupBindings.xml#floater-base">
<binding id="floater-dock-left" extends="chrome://global/content/bindings/popup.xml#floater-base">
<xbl:content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
<box class="floater-box" orient="vertical" flex="1">
<box class="floater-box-top">
@ -434,10 +536,11 @@
</xbl:content>
</binding>
<binding id="close-button" extends="xul:button">
<binding id="close-button" extends="chrome://global/content/bindings/button.xml#button-base">
<content autostretch="never">
<xul:image class="close-button-x"/>
</content>
</binding>
</bindings>
</bindings>

Просмотреть файл

@ -0,0 +1,57 @@
<?xml version="1.0"?>
<bindings id="progressmeterBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="progressmeter" extends="xul:box">
<resources>
<stylesheet src="chrome://global/skin/progressmeter.css"/>
</resources>
<content>
<xul:box class="progressmeter-internal-box" flex="1">
<xul:stack class="progressmeter-stack" flex="1">
<xul:progressbar class="progressmeter-progressbar" inherits="value,statusbar">
<xul:box class="progress-bar"/>
<xul:box class="progress-remainder"/>
</xul:progressbar>
<xul:box>
<xul:spring flex="1"/>
<xul:text class="progress-text" inherits="value=label"/>
<xul:spring flex="1"/>
</xul:box>
</xul:stack>
</xul:box>
</content>
<implementation>
<constructor>
this.setAttribute("empty", "true");
</constructor>
<property name="label" onset="if (this.label != val) this.setAttribute('label',val); return val;"
onget="return this.getAttribute('label');"/>
<property name="mode" onset="if (this.mode != val) this.setAttribute('mode', val); return val;"
onget="return this.getAttribute('mode');"/>
<property name="value" onget="return this.getAttribute('value');">
<setter><![CDATA[
var p = Math.round(val);
var c = this.value;
if (p != c) {
var delta = p - c;
if (delta < 0)
delta = -delta;
if (delta > 3 || p == 0 || p == 100)
this.setAttribute("value", p);
}
return p;
]]></setter>
</property>
</implementation>
</binding>
</bindings>

Просмотреть файл

@ -1,20 +1,13 @@
<?xml version="1.0"?>
<bindings id="xulBindings"
<bindings id="radioBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="radio" extends="chrome://global/content/xulBindings.xml#checkbox">
<implementation>
<property name="value" onset="this.setAttribute('value',val); return val;"
onget="return this.getAttribute('value');"/>
<property name="group" onset="this.setAttribute('group',val); return val;"
onget="return this.getAttribute('group');"/>
</implementation>
</binding>
<binding id="radiogroup" extends="xul:box">
<binding id="radiogroup">
<resources>
<stylesheet src="chrome://global/skin/radio.css"/>
</resources>
<implementation>
<property name="value" onset="this.setAttribute('value',val); return val;"
@ -42,9 +35,11 @@
]]>
</setter>
</property>
<property name="selectedItem">
<getter>
<![CDATA[
this.disabled = this.disabled; // this strange line is to fire the setter for the disabled property
var groupElements = this.getElementsByAttribute( "group", this.id );
for( var i = 0; i < groupElements.length; i++ ) {
if( groupElements[i].checked ||
@ -75,6 +70,7 @@
]]>
</setter>
</property>
<property name="focusedItem">
<getter>
<![CDATA[
@ -102,6 +98,7 @@
]]>
</setter>
</property>
<method name="checkAdjacentElement">
<parameter name="aNextFlag"/>
<body>
@ -127,6 +124,7 @@
</body>
</method>
</implementation>
<handlers>
<handler event="click" button="0">
<![CDATA[
@ -135,6 +133,7 @@
]]>
</handler>
<handler event="mousedown" button="0">
<![CDATA[
if (event.target.localName == "radio" && !event.target.disabled)
@ -180,5 +179,19 @@
</handler>
</handlers>
</binding>
<binding id="radio" extends="chrome://global/content/bindings/checkbox.xml#checkbox-baseline">
<resources>
<stylesheet src="chrome://global/skin/radio.css"/>
</resources>
<implementation>
<property name="value" onset="this.setAttribute('value',val); return val;"
onget="return this.getAttribute('value');"/>
<property name="group" onset="this.setAttribute('group',val); return val;"
onget="return this.getAttribute('group');"/>
</implementation>
</binding>
</bindings>
</bindings>

Просмотреть файл

@ -0,0 +1,210 @@
<?xml version="1.0"?>
<bindings id="scrollbarBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="scrollbar">
<content>
<xul:scrollbarbutton sbattr="scrollbar-up-top" type="decrement" inherits="sborient=align"/>
<xul:scrollbarbutton sbattr="scrollbar-down-top" type="increment" collapsed="true" inherits="sborient=align"/>
<xul:slider flex="1" inherits="curpos,maxpos,pageincrement,increment,align">
<xul:thumb sbattr="scrollbar-thumb" inherits="align,src" flex="1"/>
</xul:slider>
<xul:scrollbarbutton sbattr="scrollbar-up-bottom" type="decrement" collapsed="true" inherits="sborient=align"/>
<xul:scrollbarbutton sbattr="scrollbar-down-bottom" type="increment" inherits="sborient=align"/>
</content>
<implementation implements="nsIAccessible">
<constructor>
this.initScrollbar();
</constructor>
<method name="initScrollbar">
<body>
<![CDATA[
try {
var scrollbarStyle = this.boxObject.getLookAndFeelMetric("scrollbarStyle");
var thumbStyle = this.boxObject.getLookAndFeelMetric("thumbStyle");
var downTop;
var upBottom;
if ( scrollbarStyle == "double" ) {
downTop = this.findNodeByAttribute("sbattr", "scrollbar-down-top");
upBottom = this.findNodeByAttribute("sbattr", "scrollbar-up-bottom");
downTop.removeAttribute("collapsed");
upBottom.removeAttribute("collapsed");
}
else if ( scrollbarStyle == "doubletop" ) {
downTop = this.findNodeByAttribute("sbattr", "scrollbar-down-top");
var downBottom = this.findNodeByAttribute("sbattr", "scrollbar-down-bottom");
downTop.removeAttribute("collapsed");
downBottom.setAttribute("collapsed","true");
}
else if ( scrollbarStyle == "doublebottom" ) {
var upTop = this.findNodeByAttribute("sbattr", "scrollbar-up-top");
upBottom = this.findNodeByAttribute("sbattr", "scrollbar-up-bottom");
upTop.setAttribute("collapsed","true");
upBottom.removeAttribute("collapsed");
}
if ( thumbStyle == "fixed" ) {
var thumb = this.findNodeByAttribute("sbattr","scrollbar-thumb");
if ( thumb )
thumb.removeAttribute("flex");
}
}
catch ( x ) {
//throw "Scrollbars in this skin are not properly supporting mac smart-scrolling prefs!";
}
]]>
</body>
</method>
<method name="findNodeByAttribute">
<parameter name="aAttribute"/>
<parameter name="aValue"/>
<body>
<![CDATA[
var nodes = document.getAnonymousNodes(this);
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].getAttribute(aAttribute) == aValue)
return nodes[i];
else {
var subnodes = nodes[i].getElementsByAttribute(aAttribute, aValue);
if (!subnodes.length) continue;
return subnodes[0];
}
}
return null;
]]>
</body>
</method>
<method name="getAccDescription">
<body><![CDATA[
return 'This is a scrollbar';
]]></body>
</method>
<method name="getAccValue">
<body><![CDATA[
return this.getAttribute('curpos');
]]></body>
</method>
<method name="getAccName">
<body><![CDATA[
return 'Scroll Bar';
]]></body>
</method>
<method name="getAccRole">
<body><![CDATA[
return 'scrollbar';
]]></body>
</method>
</implementation>
</binding>
<binding id="slider">
<content>
<xul:thumb inherits="align,src" flex="1"/>
</content>
</binding>
<binding id="thumb" extends="xul:box">
<content>
<xul:spring flex="1"/>
<xul:image inherits="src"/>
<xul:spring flex="1"/>
</content>
<implementation implements="nsIAccessible">
<method name="getAccDescription">
<body><![CDATA[
return 'This is a scrollbars thumb';
]]></body>
</method>
<method name="getAccValue">
<body><![CDATA[
return this.getAttribute('curpos');
]]></body>
</method>
<method name="getAccName">
<body><![CDATA[
return 'Thumb';
]]></body>
</method>
<method name="getAccRole">
<body><![CDATA[
return 'indicator';
]]></body>
</method>
<method name="getAccChildCount">
<body><![CDATA[
return 0;
]]></body>
</method>
<method name="getAccFirstChild">
<body><![CDATA[
return null;
]]></body>
</method>
<method name="getAccLastChild">
<body><![CDATA[
return null;
]]></body>
</method>
</implementation>
</binding>
<binding id="scrollbarbutton">
<content>
<xul:box class="scrollbarbutton-box" flex="1">
<xul:image class="scrollbarbutton-icon" inherits="src"/>
</xul:box>
</content>
<implementation implements="nsIAccessible">
<method name="getAccDefaultAction">
<body><![CDATA[
return 'Click';
]]></body>
</method>
<method name="getAccDescription">
<body><![CDATA[
return 'Adjusts scrollbar';
]]></body>
</method>
<method name="getAccName">
<body><![CDATA[
return 'scrollbar button';
]]></body>
</method>
<method name="getAccRole">
<body><![CDATA[
return 'push button';
]]></body>
</method>
<method name="accDoDefaultAction">
<body><![CDATA[
this.click();
dump("We just clicked!!!\n");
]]></body>
</method>
<method name="getAccChildCount">
<body><![CDATA[
return 0;
]]></body>
</method>
<method name="getAccFirstChild">
<body><![CDATA[
return null;
]]></body>
</method>
<method name="getAccLastChild">
<body><![CDATA[
return null;
]]></body>
</method>
</implementation>
</binding>
</bindings>

Просмотреть файл

@ -0,0 +1,62 @@
<?xml version="1.0"?>
<bindings id="arrowscrollboxBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="scrollbox-base">
<resources>
<stylesheet src="chrome://global/skin/scrollbox.css"/>
</resources>
</binding>
<binding id="scrollbox" extends="chrome://global/content/bindings/scrollbox.xml#scrollbox-base">
<content>
<xul:box class="scrollbox-innerbox" inherits="orient,autostretch,align,valign">
<children/>
</xul:box>
</content>
</binding>
<binding id="arrowscrollbox" extends="chrome://global/content/bindings/scrollbox.xml#scrollbox-base">
<content>
<xul:vbox
onunderflow="
var button1 = this.firstChild;
var button2 = this.childNodes[2];
button1.setAttribute('collapsed', 'true');
button2.setAttribute('collapsed', 'true');
"
onoverflow="
var button1 = this.firstChild;
var button2 = this.childNodes[2];
button1.removeAttribute('collapsed');
button2.removeAttribute('collapsed');
"
>
<xul:autorepeatbutton autostretch="never" class="up" collapsed="true"
oncommand="parentNode.childNodes[1].boxObject.QueryInterface(
Components.interfaces.nsIScrollBoxObject).scrollByIndex(-1);"/>
<xul:scrollbox orient="vertical" flex="1">
<children/>
</xul:scrollbox>
<xul:autorepeatbutton autostretch="never" class="down" collapsed="true"
oncommand="parentNode.childNodes[1].boxObject.QueryInterface(
Components.interfaces.nsIScrollBoxObject).scrollByIndex(1);"/>
</xul:vbox>
</content>
</binding>
<binding id="autorepeatbutton-up" extends="chrome://global/content/bindings/scrollbox.xml#scrollbox-base">
<content>
<xul:image class="autorepeatbutton-up"/>
</content>
</binding>
<binding id="autorepeatbutton-down" extends="chrome://global/content/bindings/scrollbox.xml#scrollbox-base">
<content>
<xul:image class="autorepeatbutton-down"/>
</content>
</binding>
</bindings>

Просмотреть файл

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<bindings id="splitterBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="splitter" extends="xul:splitter">
<resources>
<stylesheet src="chrome://global/skin/splitter.css"/>
</resources>
</binding>
<binding id="grippy">
<resources>
<stylesheet src="chrome://global/skin/splitter.css"/>
</resources>
</binding>
</bindings>

Просмотреть файл

@ -4,9 +4,16 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="tabbox" extends="xul:box">
<binding id="tab-base">
<resources>
<stylesheet src="chrome://global/skin/tabcontrol.css"/>
</resources>
</binding>
<binding id="tabcontrol" display="xul:box"
extends="chrome://global/content/bindings/tabcontrol.xml#tab-base">
<content orient="vertical"/>
<!-- pass-through implementation -->
<implementation>
<property name="selectedTab">
<setter>
@ -22,6 +29,7 @@
return val;
]]>
</setter>
<getter>
<![CDATA[
var tabs = this.getElementsByTagNameNS(
@ -33,32 +41,57 @@
</getter>
</property>
</implementation>
<handlers>
<handler event="keypress" keycode="vk_tab" modifiers="control">
<![CDATA[
var tabs = this.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tabs");
tabs = tabs.length ? tabs[0] : null;
if (tabs)
tabs.advanceSelectedTab(1);
]]>
</handler>
<handler event="keypress" keycode="vk_tab" modifiers="control,shift">
<![CDATA[
var tabs = this.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tabs");
tabs = tabs.length ? tabs[0] : null;
if (tabs)
tabs.advanceSelectedTab(-1);
]]>
</handler>
<handler event="keypress" keycode="vk_tab" modifiers="control">
<![CDATA[
var tabs = this.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tabs");
tabs = tabs.length ? tabs[0] : null;
if (tabs)
tabs.advanceSelectedTab(1);
]]>
</handler>
<handler event="keypress" keycode="vk_tab" modifiers="control,shift">
<![CDATA[
var tabs = this.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tabs");
tabs = tabs.length ? tabs[0] : null;
if (tabs)
tabs.advanceSelectedTab(-1);
]]>
</handler>
</handlers>
</binding>
<binding id="tabs" extends="xul:box">
<binding id="tabs" display="xul:box"
extends="chrome://global/content/bindings/tabcontrol.xml#tab-base">
<implementation>
<constructor>
<![CDATA[
// first and last tabs need to be able to have unique styles
// and also need to select first tab on startup.
var tabs = this.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tab");
if (tabs.length) {
if (tabs.length > 1) {
tabs[0].setAttribute("first-tab", "true");
tabs[tabs.length - 1].setAttribute("last-tab", "true");
}
else if (tabs.length == 1)
tabs[0].setAttribute("first-tab", "true");
}
this.selectedTab = tabs[0];
var o = this.getAttribute("orient");
if (!o)
this.setAttribute("orient", "horizontal");
]]>
</constructor>
<property name="selectedTab">
<getter>
<![CDATA[
@ -96,43 +129,23 @@
</setter>
</property>
<method name="advanceSelectedTab">
<parameter name="aDir"/>
<body>
<![CDATA[
var next = this.selectedTab[aDir == -1 ? "previousSibling" : "nextSibling"];
if (next && !next.getAttribute("hidden")) {
this.selectedTab = next;
next.focus();
}
]]>
</body>
<method name="advanceSelectedTab">
<parameter name="aDir"/>
<body>
<![CDATA[
var next = this.selectedTab[aDir == -1 ? "previousSibling" : "nextSibling"];
if (next && !next.getAttribute("hidden")) {
this.selectedTab = next;
next.focus();
}
]]>
</body>
</method>
<constructor>
<![CDATA[
// first and last tabs need to be able to have unique styles
// and also need to select first tab on startup.
var tabs = this.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tab");
if (tabs.length) {
if (tabs.length > 1) {
tabs[0].setAttribute("first-tab", "true");
tabs[tabs.length - 1].setAttribute("last-tab", "true");
}
else if (tabs.length == 1)
tabs[0].setAttribute("first-tab", "true");
}
this.selectedTab = tabs[0];
var o = this.getAttribute("orient");
if (!o)
this.setAttribute("orient", "horizontal");
]]>
</constructor>
</implementation>
</binding>
<binding id="tabpanels" extends="xul:deck">
<binding id="tabpanels" display="xul:deck"
extends="chrome://global/content/bindings/tabcontrol.xml#tab-base">
<implementation>
<!-- should be defined on deck! -->
<property name="index"
@ -141,13 +154,15 @@
</implementation>
</binding>
<binding id="tab" extends="xul:button">
<binding id="tab" display="xul:button"
extends="chrome://global/content/bindings/tabcontrol.xml#tab-base">
<content>
<xul:box class="tab-box" flex="1" autostretch="never" orient="horizontal">
<xul:image class="tab-image" inherits="src"/>
<xul:text class="tab-text" inherits="value=label,accesskey,crop,disabled"/>
</xul:box>
</content>
<implementation>
<property name="label">
<getter>
@ -158,9 +173,11 @@
return val;
</setter>
</property>
<property name="tabs"
onget="return this.getAttribute('tabs');"
onset="this.setAttribute('tabs', val); return val;"/>
<!-- XXX -->
<property name="selected">
<getter>
@ -176,6 +193,7 @@
</setter>
</property>
</implementation>
<handlers>
<handler event="click" button="0">
<![CDATA[
@ -184,31 +202,35 @@
if (tabs.localName == "tabs")
break;
tabs = tabs.parentNode;
} while(tabs.localName != "tabbox");
} while(tabs.localName != "tabcontrol");
tabs.selectedTab = this;
if (!this.selected) this.selected = true;
]]>
</handler>
<handler event="keypress" keycode="vk_left">
<![CDATA[
this.parentNode.advanceSelectedTab(-1);
]]>
</handler>
<handler event="keypress" keycode="vk_right">
<![CDATA[
this.parentNode.advanceSelectedTab(1);
]]>
</handler>
<handler event="keypress" keycode="vk_up">
<![CDATA[
this.parentNode.advanceSelectedTab(-1);
]]>
</handler>
<handler event="keypress" keycode="vk_down">
<![CDATA[
this.parentNode.advanceSelectedTab(1);
]]>
</handler>
<handler event="keypress" keycode="vk_left">
<![CDATA[
this.parentNode.advanceSelectedTab(-1);
]]>
</handler>
<handler event="keypress" keycode="vk_right">
<![CDATA[
this.parentNode.advanceSelectedTab(1);
]]>
</handler>
<handler event="keypress" keycode="vk_up">
<![CDATA[
this.parentNode.advanceSelectedTab(-1);
]]>
</handler>
<handler event="keypress" keycode="vk_down">
<![CDATA[
this.parentNode.advanceSelectedTab(1);
]]>
</handler>
</handlers>
</binding>

Просмотреть файл

@ -0,0 +1,33 @@
<?xml version="1.0"?>
<bindings id="textBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="text-label">
<handlers>
<handler event="click" action="var forElementID = this.getAttribute('for');
if (forElementID)
var forElement = document.getElementById(forElementID);
if(forElement)
forElement.focus();
"/>
</handlers>
</binding>
<binding id="text-editable-display" extends="chrome://global/content/bindings/text.xml#text"/>
<binding id="text-editable-edit" extends="xul:box">
<content>
<xul:box flex="1">
<html:input type="text" inherits="value,type,maxlength,disabled,size,readonly"/>
</xul:box>
</content>
<handlers>
<handler event="blur" action="this.setAttribute('mode','display');"/>
</handlers>
</binding>
</bindings>

Просмотреть файл

@ -0,0 +1,206 @@
<?xml version="1.0"?>
<!DOCTYPE window [
<!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd" >
%textcontextDTD;
]>
<bindings id="textboxBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="textbox" extends="xul:box">
<resources>
<stylesheet src="chrome://global/skin/textbox.css"/>
</resources>
<content context="_child">
<xul:box class="textbox-internal-box" flex="1">
<html:input class="textbox-input" flex="1" inherits="onfocus,onblur,value,type,maxlength,disabled,size,readonly"/>
</xul:box>
<xul:popupset>
<xul:popup oncreate="this.parentNode.parentNode.doPopupItemEnabling(this); this.focus();">
<xul:menuitem label="&undoCmd.label;" accesskey="&undoCmd.accesskey;" cmd="cmd_undo" oncommand="
var controller = document.commandDispatcher.getControllerForCommand('cmd_undo');
controller.doCommand('cmd_undo');"/>
<xul:menuseparator/>
<xul:menuitem label="&cutCmd.label;" accesskey="&cutCmd.accesskey;" cmd="cmd_cut" oncommand="
var controller = document.commandDispatcher.getControllerForCommand('cmd_cut');
controller.doCommand('cmd_cut');"/>
<xul:menuitem label="&copyCmd.label;" accesskey="&copyCmd.accesskey;" cmd="cmd_copy" oncommand="
var controller = document.commandDispatcher.getControllerForCommand('cmd_copy');
controller.doCommand('cmd_copy');"/>
<xul:menuitem label="&pasteCmd.label;" accesskey="&pasteCmd.accesskey;" cmd="cmd_paste" oncommand="
var controller = document.commandDispatcher.getControllerForCommand('cmd_paste');
controller.doCommand('cmd_paste');"/>
<xul:menuitem label="&deleteCmd.label;" accesskey="&deleteCmd.accesskey;" cmd="cmd_delete" oncommand="
var controller = document.commandDispatcher.getControllerForCommand('cmd_delete');
controller.doCommand('cmd_delete');"/>
<xul:menuseparator/>
<xul:menuitem label="&selectAllCmd.label;" accesskey="&selectAllCmd.accesskey;" cmd="cmd_selectAll" oncommand="
var controller = document.commandDispatcher.getControllerForCommand('cmd_selectAll');
controller.doCommand('cmd_selectAll');"/>
</xul:popup>
</xul:popupset>
</content>
<implementation>
<property name="inputField" readonly="true">
<![CDATA[
var v = document.getAnonymousNodes(this);
var input = null;
for (var i = 0; i < v.length; i++) {
try {
var l = v[i].getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "input");
if (l.length > 0) {
input = l[0];
break;
}
} catch (e) {}
}
input;
]]>
</property>
<property name="value" onset="this.inputField.value = val; return val;"
onget="return this.inputField.value;"/>
<property name="type" onset="this.inputField.type = val; return val;"
onget="return this.inputField.type;"/>
<property name="maxlength" onset="this.inputField.maxlength = val; return val;"
onget="return this.inputField.maxlength;"/>
<property name="disabled" onset="this.inputField.disabled = val; return val;"
onget="return this.inputField.disabled;"/>
<property name="size" onset="this.inputField.size = val; return val;"
onget="return this.inputField.size;"/>
<property name="readonly" onset="this.inputField.readonly = val; return val;"
onget="return this.inputField.readonly;"/>
<method name="select">
<body>
this.inputField.select();
</body>
</method>
<method name="doPopupItemEnabling">
<parameter name="popupNode"/>
<body>
<![CDATA[
var children = popupNode.childNodes;
for (var i = 0; i < children.length; i++) {
var command = children[i].getAttribute("cmd");
if (command) {
var controller = document.commandDispatcher.getControllerForCommand(command);
var enabled = controller.isCommandEnabled(command);
if (enabled)
children[i].removeAttribute('disabled');
else
children[i].setAttribute('disabled','true');
}
}
]]>
</body>
</method>
<property name="controllers" readonly="true" onget="return this.inputField.controllers"/>
<property name="textLength" readonly="true" onget="return this.inputField.textLength;"/>
<property name="selectionStart" onset="this.inputField.selectionStart = val; return val;"
onget="return this.inputField.selectionStart;"/>
<property name="selectionEnd" onset="this.inputField.selectionEnd = val; return val;"
onget="return this.inputField.selectionEnd;"/>
<property name="suppressFocusBlur">
false
</property>
<method name="setSelectionRange">
<parameter name="aSelectionStart"/>
<parameter name="aSelectionEnd"/>
<body>
this.inputField.setSelectionRange( aSelectionStart, aSelectionEnd );
</body>
</method>
<constructor action="var str = this.boxObject.getProperty('value');
if (str) {
this.inputField.value=str;
this.boxObject.removeProperty('value');
}"/>
<destructor action="if (this.inputField.value) this.boxObject.setProperty('value', this.inputField.value);"/>
</implementation>
<handlers>
<handler event="focus" phase="capturing">
<![CDATA[
if (this.getAttribute('focused') != 'true') {
this.setAttribute('focused','true');
this.suppressFocusBlur = true;
if (document.commandDispatcher.focusedElement != this.inputField)
this.inputField.focus();
this.suppressFocusBlur = false;
}
]]>
</handler>
<handler event="blur" phase="capturing">
<![CDATA[
if (!this.suppressFocusBlur && this.getAttribute('focused') == 'true') {
this.removeAttribute('focused');
}
]]>
</handler>
</handlers>
</binding>
<binding id="textarea" extends="chrome://global/content/bindings/textbox.xml#textbox">
<content context="_child">
<xul:box class="textarea-internal-box" flex="1">
<html:textarea class="textbox-textarea" flex="1" inherits="onfocus,onblur,value,disabled,rows,cols,readonly"/>
</xul:box>
<xul:popupset>
<xul:popup oncreate="this.parentNode.parentNode.doPopupItemEnabling(this); this.focus();">
<xul:menuitem label="&undoCmd.label;" accesskey="&undoCmd.accesskey;" cmd="cmd_undo" oncommand="
var controller = document.commandDispatcher.getControllerForCommand('cmd_undo');
controller.doCommand('cmd_undo');"/>
<xul:menuseparator/>
<xul:menuitem label="&cutCmd.label;" accesskey="&cutCmd.accesskey;" cmd="cmd_cut" oncommand="
var controller = document.commandDispatcher.getControllerForCommand('cmd_cut');
controller.doCommand('cmd_cut');"/>
<xul:menuitem label="&copyCmd.label;" accesskey="&copyCmd.accesskey;" cmd="cmd_copy" oncommand="
var controller = document.commandDispatcher.getControllerForCommand('cmd_copy');
controller.doCommand('cmd_copy');"/>
<xul:menuitem label="&pasteCmd.label;" accesskey="&pasteCmd.accesskey;" cmd="cmd_paste" oncommand="
var controller = document.commandDispatcher.getControllerForCommand('cmd_paste');
controller.doCommand('cmd_paste');"/>
<xul:menuitem label="&deleteCmd.label;" accesskey="&deleteCmd.accesskey;" cmd="cmd_delete" oncommand="
var controller = document.commandDispatcher.getControllerForCommand('cmd_delete');
controller.doCommand('cmd_delete');"/>
<xul:menuseparator/>
<xul:menuitem label="&selectAllCmd.label;" accesskey="&selectAllCmd.accesskey;" cmd="cmd_selectAll" oncommand="
var controller = document.commandDispatcher.getControllerForCommand('cmd_selectAll');
controller.doCommand('cmd_selectAll');"/>
</xul:popup>
</xul:popupset>
</content>
<implementation>
<property name="inputField" readonly="true">
<![CDATA[
var v = document.getAnonymousNodes(this);
var input = null;
for (var i = 0; i < v.length; i++) {
try {
var l = v[i].getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "textarea");
if (l.length > 0) {
input = l[0];
break;
}
} catch (e) {}
}
input;
]]>
</property>
</implementation>
</binding>
</bindings>

Просмотреть файл

@ -0,0 +1,30 @@
<?xml version="1.0"?>
<bindings id="titledboxBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="titledbox-base">
<resources>
<stylesheet src="chrome://global/skin/titledbox.css"/>
</resources>
</binding>
<binding id="titledbox" extends="chrome://global/content/bindings/titledbox.xml#titledbox-base">
<content>
<xul:box class="titledbox-title" autostretch="never" orient="vertical">
<children includes="label"/>
</xul:box>
<xul:box flex="1" class="titledbox-body" inherits="orient,autostretch,align,valign">
<children/>
</xul:box>
</content>
</binding>
<binding id="label" extends="chrome://global/content/bindings/titledbox.xml#titledbox-base">
<content>
<xul:text inherits="value"/>
</content>
</binding>
</bindings>

Просмотреть файл

@ -1,85 +1,16 @@
<?xml version="1.0"?>
<!-- -*- Mode: HTML -*- -->
<!-- The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-2000 Netscape Communications Corporation. All
Rights Reserved.
Original Author:
Ben Goodger <ben@netscape.com>
Contributor(s):
-->
<bindings id="toolbarBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="toolbargrippy" extends="xul:button">
<implementation>
<property name="collapsed">
<getter>
return this.getAttribute("moz_grippy_collapsed");
</getter>
<setter>
this.setAttribute("moz_grippy_collapsed", val);
return val;
</setter>
</property>
<method name="returnNode">
<parameter name="aNodeA"/>
<parameter name="aNodeB"/>
<body>
<![CDATA[
var node = this.parentNode;
while (node && node.localName != "window" &&
(node.localName != aNodeA && (node.localName != aNodeB))) {
node = node.parentNode;
}
return node;
]]>
</body>
</method>
<method name="grippyTriggered">
<body>
<![CDATA[
var toolbox = this.returnNode("toolbox");
var toolbar = this.returnNode("toolbar", "menubar");
if (this.collapsed)
toolbox.expandToolbar(this.id);
else
toolbox.collapseToolbar(toolbar);
]]>
</body>
</method>
</implementation>
<handlers>
<handler event="command">
<![CDATA[
this.grippyTriggered();
]]>
</handler>
</handlers>
</binding>
<binding id="toolbar-base">
<resources>
<stylesheet src="chrome://global/skin/toolbar.css"/>
</resources>
</binding>
<binding id="toolbox" extends="xul:box">
<binding id="toolbox" extends="chrome://global/content/bindings/toolbar.xml#toolbar-base">
<content orient="vertical">
<xul:box orient="vertical" flex="1" class="toolbar-internal-box">
<children/>
@ -89,7 +20,12 @@ Contributor(s):
<xul:spring flex="1" class="collapsed-tray-spring"/>
</xul:box>
</content>
<implementation>
<constructor>
this.init(event);
</constructor>
<method name="collapseToolbar">
<parameter name="toolbar"/>
<body>
@ -105,6 +41,7 @@ Contributor(s):
]]>
</body>
</method>
<method name="expandToolbar">
<parameter name="aGrippyID"/>
<body>
@ -121,6 +58,7 @@ Contributor(s):
]]>
</body>
</method>
<method name="findNodeByAttribute">
<parameter name="aAttribute"/>
<parameter name="aValue"/>
@ -140,6 +78,7 @@ Contributor(s):
]]>
</body>
</method>
<method name="createCollapsedGrippy">
<parameter name="aToolbar"/>
<body>
@ -172,6 +111,7 @@ Contributor(s):
]]>
</body>
</method>
<method name="init">
<parameter name="aEvent"/>
<body>
@ -183,6 +123,7 @@ Contributor(s):
]]>
</body>
</method>
<property name="deferAttached">
<getter>
return this.getAttribute("deferattached");
@ -192,23 +133,22 @@ Contributor(s):
return val;
</setter>
</property>
<constructor>
this.init(event);
</constructor>
</implementation>
</binding>
<binding id="toolbar" extends="xul:box">
<binding id="toolbar" extends="chrome://global/content/bindings/toolbar.xml#toolbar-base">
<content>
<xul:toolbargrippy inherits="tooltiptext=grippytooltiptext,tooltip=grippytooltip,last-toolbar,hidden=grippyhidden"
tbattr="toolbar-grippy"
class="toolbar-grippy"/>
<xul:box flex="1" class="toolbar-holder" inherits="collapsed,last-toolbar,orient=tborient,autostretch=tbautostretch" autostretch="never">
<xul:box flex="1" class="toolbar-holder" autostretch="never"
inherits="collapsed,last-toolbar,orient=tborient,autostretch=tbautostretch">
<children/>
</xul:box>
</content>
<implementation>
<property name="grippy" readonly="true" onget="return document.getAnonymousNodes(this)[0];"/>
<method name="findNodeByAttribute">
<parameter name="aAttribute"/>
<parameter name="aValue"/>
@ -231,6 +171,10 @@ Contributor(s):
</binding>
<binding id="menubar" extends="xul:menubar">
<resources>
<stylesheet src="chrome://global/skin/toolbar.css"/>
</resources>
<content>
<xul:toolbargrippy inherits="tooltiptext=grippytooltiptext,tooltip=grippytooltip,last-toolbar,hidden=grippyhidden"
tbattr="toolbar-grippy" class="toolbar-grippy"/>
@ -238,6 +182,7 @@ Contributor(s):
<children/>
</xul:box>
</content>
<implementation>
<method name="findNodeByAttribute">
<parameter name="aAttribute"/>
@ -259,5 +204,61 @@ Contributor(s):
</method>
</implementation>
</binding>
<binding id="toolbargrippy" extends="xul:button">
<resources>
<stylesheet src="chrome://global/skin/toolbar.css"/>
</resources>
<implementation>
<property name="collapsed">
<getter>
return this.getAttribute("moz_grippy_collapsed");
</getter>
<setter>
this.setAttribute("moz_grippy_collapsed", val);
return val;
</setter>
</property>
<method name="returnNode">
<parameter name="aNodeA"/>
<parameter name="aNodeB"/>
<body>
<![CDATA[
var node = this.parentNode;
while (node && node.localName != "window" &&
(node.localName != aNodeA && (node.localName != aNodeB))) {
node = node.parentNode;
}
return node;
]]>
</body>
</method>
<method name="grippyClicked">
<body>
<![CDATA[
var toolbox = this.returnNode("toolbox");
var toolbar = this.returnNode("toolbar", "menubar");
if (this.collapsed)
toolbox.expandToolbar(this.id);
else
toolbox.collapseToolbar(toolbar);
]]>
</body>
</method>
</implementation>
<handlers>
<handler event="click">
<![CDATA[
this.grippyClicked();
]]>
</handler>
</handlers>
</binding>
<binding id="toolbarseparator" extends="chrome://global/content/bindings/toolbar.xml#toolbar-base"/>
</bindings>

Просмотреть файл

@ -0,0 +1,67 @@
tree {
-moz-user-focus: normal;
display: -moz-xul-grid;
min-width: 0px;
min-height: 0px;
width: 200px;
height: 200px;
}
tree[rows] {
height: auto;
}
treehead, treerows, treechildren, treeitem, treecolgroup {
display: -moz-xul-grid-group;
}
treehead, treerows, treechildren, treeitem {
-moz-xul-box-orient: vertical;
}
treechildren, treehead, treerows {
-moz-user-focus: none;
}
treecol, treerow {
display: -moz-xul-grid-line;
}
treecol {
min-width: 16px;
width: 16px;
-moz-xul-box-orient: vertical;
}
treecol[hidden="true"] {
display: -moz-xul-grid-line;
visibility: collapse;
}
treechildren {
display: -moz-xul-grid-group;
}
tree > treechildren {
overflow: auto;
min-height: 0px;
}
treeitem > treechildren {
display: none;
}
treeitem[open="true"] > treechildren {
display: -moz-xul-grid-group;
}
treecell {
vertical-align: middle;
}
treecell[hidden="true"] {
display: -moz-xul-box;
visibility: collapse;
}

Просмотреть файл

@ -2,149 +2,17 @@
<bindings id="treeBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="treeitem">
<implementation>
<method name="toggleOpenState">
<body>
<![CDATA[
if ((this.getAttribute('container') == 'true') &&
(this.getAttribute('empty') != 'true')) {
if (this.getAttribute('open') == 'true')
this.removeAttribute('open');
else this.setAttribute('open', 'true');
}
]]>
</body>
</method>
<method name="open">
<body>
<![CDATA[
if ((this.getAttribute('container') == 'true') &&
(this.getAttribute('empty') != 'true')) {
if (this.getAttribute('open') != 'true')
this.setAttribute('open', 'true');
}
]]>
</body>
</method>
<method name="close">
<body>
<![CDATA[
if ((this.getAttribute('container') == 'true') &&
(this.getAttribute('empty') != 'true')) {
if (this.getAttribute('open') == 'true')
this.removeAttribute('open');
}
]]>
</body>
</method>
</implementation>
</binding>
<binding id="treecell-indented-folder">
<content autostretch="never">
<xul:treeindentation/>
<xul:image class="tree-cell-twisty" twisty="true" inherits="hidden=notwisty" allowevents="true"/>
<xul:image class="tree-cell-primary-icon" inherits="src"/>
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-indented-folder-inline-edit"
extends="chrome://global/content/xulBindings.xml#inline-edit-base">
<content autostretch="never">
<xul:treeindentation/>
<xul:image class="tree-cell-twisty" twisty="true" inherits="hidden=notwisty" allowevents="true"/>
<xul:image class="tree-cell-primary-icon-inline-edit-folder" inherits="src"/>
<xul:box class="inline-edit-cell-box" flex="1" ileattr="text-container">
<xul:text class="inline-edit-cell-text" ileattr="text" rootcontent="treecell"
inherits="crop,value=label,align,mode" flex="1" crop="right"/>
</xul:box>
</content>
<binding id="tree-base">
<resources>
<stylesheet src="chrome://global/content/bindings/tree.css"/>
<stylesheet src="chrome://global/skin/tree.css"/>
</resources>
</binding>
<binding id="treecell-indented-leaf-inline-edit"
extends="chrome://global/content/xulBindings.xml#inline-edit-base">
<content autostretch="never">
<xul:treeindentation/>
<xul:image class="tree-cell-primary-icon" inherits="src"/>
<xul:box class="inline-edit-cell-box" flex="1" ileattr="text-container">
<xul:text class="tree-cell-text" ileattr="text" rootcontent="treecell"
inherits="crop,value=label,align,mode" flex="1" crop="right"/>
</xul:box>
</content>
</binding>
<binding id="treecell-inline-edit"
extends="chrome://global/content/xulBindings.xml#inline-edit-base">
<content autostretch="never">
<xul:box class="inline-edit-cell-box" flex="1" ileattr="text-container">
<xul:text class="tree-cell-text" ileattr="text" rootcontent="treecell"
inherits="crop,value=label,align,mode" flex="1" crop="right"/>
</xul:box>
</content>
</binding>
<binding id="treecell-indented-leaf">
<content autostretch="never">
<xul:treeindentation/>
<xul:image class="tree-cell-primary-icon" inherits="src"/>
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-text" extends="xul:text">
<content crop="right"/>
</binding>
<binding id="treecell">
<content autostretch="never">
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-align-right">
<content autostretch="never">
<xul:spring flex="5"/>
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-iconic">
<content autostretch="never">
<xul:image class="tree-cell-icon" inherits="src"/>
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-image">
<content autostretch="never">
<xul:image class="tree-cell-image" inherits="src"/>
</content>
</binding>
<binding id="treecell-header">
<content>
<xul:box class="treecell-header-box" flex="1" autostretch="never">
<xul:image class="tree-header-image" inherits="src"/>
<xul:text class="tree-header-text" inherits="crop,value=label,disabled" flex="1" crop="right"/>
<xul:image class="tree-header-sortdirection"/>
</xul:box>
</content>
</binding>
<binding id="treecell-header-image">
<content>
<xul:box class="treecell-header-image-box" flex="1" autostretch="never">
<xul:image class="tree-header-image" inherits="src"/>
</xul:box>
</content>
</binding>
<binding id="tree">
<binding id="tree"
extends="chrome://global/content/bindings/tree.xml#tree-base">
<content>
<children>
<xul:treecolgroup>
@ -413,7 +281,8 @@
</handlers>
</binding>
<binding id="treerows">
<binding id="treerows"
extends="chrome://global/content/bindings/tree.xml#tree-base">
<content outer="true"/>
<handlers>
<!-- If there is no modifier key, we select on mousedown, not
@ -500,6 +369,169 @@
</handlers>
</binding>
<binding id="treeitem"
extends="chrome://global/content/bindings/tree.xml#tree-base">
<implementation>
<method name="toggleOpenState">
<body>
<![CDATA[
if ((this.getAttribute('container') == 'true') &&
(this.getAttribute('empty') != 'true')) {
if (this.getAttribute('open') == 'true')
this.removeAttribute('open');
else this.setAttribute('open', 'true');
}
]]>
</body>
</method>
<method name="open">
<body>
<![CDATA[
if ((this.getAttribute('container') == 'true') &&
(this.getAttribute('empty') != 'true')) {
if (this.getAttribute('open') != 'true')
this.setAttribute('open', 'true');
}
]]>
</body>
</method>
<method name="close">
<body>
<![CDATA[
if ((this.getAttribute('container') == 'true') &&
(this.getAttribute('empty') != 'true')) {
if (this.getAttribute('open') == 'true')
this.removeAttribute('open');
}
]]>
</body>
</method>
</implementation>
</binding>
<binding id="treecell"
extends="chrome://global/content/bindings/tree.xml#tree-base">
<content autostretch="never">
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-align-right"
extends="chrome://global/content/bindings/tree.xml#tree-base">
<content autostretch="never">
<xul:spring flex="5"/>
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-iconic"
extends="chrome://global/content/bindings/tree.xml#tree-base">
<content autostretch="never">
<xul:image class="tree-cell-icon" inherits="src"/>
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-image"
extends="chrome://global/content/bindings/tree.xml#tree-base">
<content autostretch="never">
<xul:image class="tree-cell-image" inherits="src"/>
</content>
</binding>
<binding id="treecell-indented-folder"
extends="chrome://global/content/bindings/tree.xml#tree-base">
<content autostretch="never">
<xul:treeindentation/>
<xul:image class="tree-cell-twisty" twisty="true" inherits="hidden=notwisty" allowevents="true"/>
<xul:image class="tree-cell-primary-icon" inherits="src"/>
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-indented-folder-inline-edit"
extends="chrome://global/content/bindings/general.xml#inline-edit-base">
<resources>
<stylesheet src="chrome://global/content/bindings/tree.css"/>
<stylesheet src="chrome://global/skin/tree.css"/>
</resources>
<content autostretch="never">
<xul:treeindentation/>
<xul:image class="tree-cell-twisty" twisty="true" inherits="hidden=notwisty" allowevents="true"/>
<xul:image class="tree-cell-primary-icon-inline-edit-folder" inherits="src"/>
<xul:box class="inline-edit-cell-box" flex="1" ileattr="text-container">
<xul:text class="inline-edit-cell-text" ileattr="text" rootcontent="treecell"
inherits="crop,value=label,align,mode" flex="1" crop="right"/>
</xul:box>
</content>
</binding>
<binding id="treecell-indented-leaf-inline-edit"
extends="chrome://global/content/bindings/general.xml#inline-edit-base">
<resources>
<stylesheet src="chrome://global/content/bindings/tree.css"/>
<stylesheet src="chrome://global/skin/tree.css"/>
</resources>
<content autostretch="never">
<xul:treeindentation/>
<xul:image class="tree-cell-primary-icon" inherits="src"/>
<xul:box class="inline-edit-cell-box" flex="1" ileattr="text-container">
<xul:text class="tree-cell-text" ileattr="text" rootcontent="treecell"
inherits="crop,value=label,align,mode" flex="1" crop="right"/>
</xul:box>
</content>
</binding>
<binding id="treecell-inline-edit"
extends="chrome://global/content/bindings/general.xml#inline-edit-base">
<resources>
<stylesheet src="chrome://global/content/bindings/tree.css"/>
<stylesheet src="chrome://global/skin/tree.css"/>
</resources>
<content autostretch="never">
<xul:box class="inline-edit-cell-box" flex="1" ileattr="text-container">
<xul:text class="tree-cell-text" ileattr="text" rootcontent="treecell"
inherits="crop,value=label,align,mode" flex="1" crop="right"/>
</xul:box>
</content>
</binding>
<binding id="treecell-indented-leaf"
extends="chrome://global/content/bindings/tree.xml#tree-base">
<content autostretch="never">
<xul:treeindentation/>
<xul:image class="tree-cell-primary-icon" inherits="src"/>
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-text" extends="xul:text">
<content crop="right"/>
</binding>
<binding id="treecell-header"
extends="chrome://global/content/bindings/tree.xml#tree-base">
<content>
<xul:box class="treecell-header-box" flex="1" autostretch="never">
<xul:image class="tree-header-image" inherits="src"/>
<xul:text class="tree-header-text" inherits="crop,value=label,disabled" flex="1" crop="right"/>
<xul:image class="tree-header-sortdirection"/>
</xul:box>
</content>
</binding>
<binding id="treecell-header-image"
extends="chrome://global/content/bindings/tree.xml#tree-base">
<content>
<xul:box class="treecell-header-image-box" flex="1" autostretch="never">
<xul:image class="tree-header-image" inherits="src"/>
</xul:box>
</content>
</binding>
<binding id="listbox" extends="xul:tree">
<content>
<xul:cols>

Просмотреть файл

@ -0,0 +1,449 @@
<?xml version="1.0"?>
<bindings id="wizardBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="wizard-base">
<resources>
<stylesheet src="chrome://global/skin/wizard.css"/>
</resources>
</binding>
<binding id="wizard" extends="chrome://global/content/bindings/wizard.xml#wizard-base">
<content width="500" height="380" persist="x y width height">
<xul:box class="wizard-header" anonid="Header"/>
<xul:deck class="wizard-page-box" deck="true" flex="1" anonid="Deck">
<children includes="wizardpage"/>
</xul:deck>
<children/>
<xul:box class="wizard-buttons" anonid="Buttons" inherits="pagestep,firstpage,lastpage"/>
</content>
<implementation>
<property name="title" onget="return this.getAttribute('title')"
onset="this.setAttribute('title', val);"/>
<property name="canAdvance" onget="return this._canAdvance;"
onset="this._canAdvance=val; this._nextButton.disabled=!val;"/>
<property name="canRewind" onget="return this._canRewind;"
onset="this._canRewind=val; this._backButton.disabled=!val;"/>
<property name="canCancel"/>
<property name="accessMethod" onget="return this._accessMethod"/>
<property name="pageCount">0</property>
<property name="pageStack">null</property>
<property name="pageStep" onget="return this.pageStack.length"/>
<property name="currentPage" onget="return this._currentPage">
<setter>
<![CDATA[
this._currentPage = val;
if (this.onFirstPage) {
this.canRewind = false;
this.setAttribute("firstpage", "true");
} else {
this.canRewind = true;
this.setAttribute("firstpage", "false");
}
if (this.onLastPage) {
this.canAdvance = true;
this.setAttribute("lastpage", "true");
} else {
this.setAttribute("lastpage", "false");
}
this._deck.setAttribute("index", val.pageIndex);
document.commandDispatcher.advanceFocusIntoSubtree(val);
this.adjustWizardHeader();
this._wizardButtons.onPageChange();
val.fireShow();
return val;
]]>
</setter>
</property>
<property name="pageIndex" onget="return this._pageIndex;">
<setter>
<![CDATA[
if (val < 0 || val >= this.pageCount)
return this._pageIndex;
this.currentPage = this.childNodes[val];
]]>
</setter>
</property>
<property name="onFirstPage"
onget="return this.pageStack.length == 1;"/>
<property name="onLastPage">
<getter><![CDATA[
var cp = this.currentPage;
return cp && ((this._accessMethod == "sequential" && cp.pageIndex == this.pageCount-1) ||
(this._accessMethod == "random" && cp.next == ""));
]]></getter>
</property>
<property name="_canAdvance"/>
<property name="_canRewind"/>
<property name="_onBack"/>
<property name="_onNext"/>
<property name="_onCancel"/>
<property name="_wizardHeader"/>
<property name="_wizardButtons"/>
<property name="_deck"/>
<property name="_backButton"/>
<property name="_nextButton"/>
<property name="_cancelButton"/>
<property name="_backFunc">(function() { this._wizard.rewind(); })</property>
<property name="_nextFunc">(function() { this._wizard.advance(); })</property>
<property name="_finishFunc">(function() { this._wizard.advance(); })</property>
<property name="_cancelFunc">(function() { this._wizard.cancel(); })</property>
<constructor><![CDATA[
this._canAdvance = true;
this._canRewind = false;
this.canCancel = true;
this.pageStack = [];
// need to create string bundle manually instead of using <xul:stringbundle/>
// see bug 63370 for details
var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"]
.getService(Components.interfaces.nsILocaleService);
var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);
var bundleURL = "chrome://global-platform/locale/wizard.properties";
this._bundle = stringBundleService.createBundle(bundleURL, localeService.GetApplicationLocale());
// get anonymous content references
this._wizardHeader = document.getAnonymousElementByAttribute(this, "anonid", "Header");
this._wizardButtons = document.getAnonymousElementByAttribute(this, "anonid", "Buttons");
this._deck = document.getAnonymousElementByAttribute(this, "anonid", "Deck");
this.initWizardButton("back");
this.initWizardButton("next");
this.initWizardButton("finish");
this.initWizardButton("cancel");
this.initPages();
// get wizard event handlers
var back = this.getAttribute("onwizardback");
if (back)
this._onBack = new Function("wizard", back);
var next = this.getAttribute("onwizardnext");
if (next)
this._onNext = new Function("wizard", next);
var cancel = this.getAttribute("onwizardcancel");
if (cancel)
this._onCancel = new Function("wizard", cancel);
var finish = this.getAttribute("onwizardfinish");
if (finish)
this._onFinish = new Function("wizard", finish);
window.addEventListener("close", this._cancelFunc, false);
this.pageCount = this.childNodes.length;
this.advance(this.childNodes[0].pageid);
]]></constructor>
<method name="initPages">
<body><![CDATA[
var meth = "sequential";
for (var i = 0; i < this.childNodes.length; ++i) {
var page = this.childNodes[i];
page._pageIndex = i;
if (page.next != "")
meth = "random";
}
this._accessMethod = meth;
]]></body>
</method>
<method name="initWizardButton">
<parameter name="aName"/>
<body><![CDATA[
var btn = document.getAnonymousElementByAttribute(this._wizardButtons, "wizardbutton", aName);
if (btn) {
btn.addEventListener("command", this["_"+aName+"Func"], false);
btn.setAttribute("label", this._bundle.GetStringFromName("button-"+aName));
btn._wizard = this;
this["_"+aName+"Button"] = btn;
}
return btn;
]]></body>
</method>
<method name="adjustWizardHeader">
<body><![CDATA[
var label = this.currentPage.getAttribute("label");
if (!label && this.onFirstPage)
label = this._bundle.formatStringFromName("default-first-title", [this.title], 1);
else if (!label && this.onLastPage)
label = this._bundle.formatStringFromName("default-last-title", [this.title], 1);
this._wizardHeader.setAttribute("label", label);
this._wizardHeader.setAttribute("description", this.currentPage.getAttribute("description"));
]]></body>
</method>
<method name="getPageById">
<parameter name="aPageId"/>
<body><![CDATA[
var els = this.getElementsByAttribute("pageid", aPageId);
return els.length > 0 ? els[0] : null;
]]></body>
</method>
<method name="isPageLoaded">
<parameter name="aPageId"/>
<body><![CDATA[
]]></body>
</method>
<method name="rewind">
<body><![CDATA[
if (!this.canRewind)
return;
if (this.currentPage && !this.currentPage.fireHide())
return;
if (this._onBack && !this._onBack(this))
return;
this.pageStack.pop();
this.currentPage = this.pageStack[this.pageStack.length-1];
this.setAttribute("pagestep", this.pageStack.length);
]]></body>
</method>
<method name="advance">
<parameter name="aPageId"/>
<body><![CDATA[
if (!this.canAdvance)
return;
if (this.currentPage && !this.currentPage.fireHide())
return;
if (this.onLastPage) {
if (!this._onFinish || this._onFinish(this))
window.close();
} else {
if (this._onNext && !this._onNext(this))
return;
var page;
if (aPageId)
page = this.getPageById(aPageId);
else {
if (this._accessMethod == "random")
page = this.getPageById(this.currentPage.next);
else
page = this.childNodes[this.currentPage.pageIndex+1];
}
this.pageStack.push(page);
this.setAttribute("pagestep", this.pageStack.length);
this.currentPage = page;
}
]]></body>
</method>
<method name="goTo">
<parameter name="aPageId"/>
<body><![CDATA[
var page = this.getPageById(aPageId);
if (page) {
this.pageStack[this.pageStack.length-1] = page;
this.currentPage = page;
}
]]></body>
</method>
<method name="cancel">
<body><![CDATA[
if (this._onCancel && !this._onCancel(this))
return;
window.close();
]]></body>
</method>
</implementation>
<handlers>
<handler event="keypress" keycode="VK_ENTER"
action="var c = document.commandDispatcher.focusedElement;
if (c == this._cancelButton)
this.cancel();
else if (c == this._backButton)
this.rewind();
else
this.advance();"/>
<handler event="keypress" keycode="VK_RETURN"
action="var c = document.commandDispatcher.focusedElement;
if (c == this._cancelButton)
this.cancel();
else if (c == this._backButton)
this.rewind();
else
this.advance();"/>
<handler event="keypress" keycode="VK_ESCAPE" action="document.firstChild.cancel();"/>
</handlers>
</binding>
<binding id="wizardpage" extends="chrome://global/content/bindings/wizard.xml#wizard-base">
<implementation>
<property name="pageid" onget="return this.getAttribute('pageid');"
onset="this.setAttribute('pageid', val);"/>
<property name="pageIndex" onget="return this._pageIndex;"/>
<property name="next" onget="return this.getAttribute('next');"
onset="this.setAttribute('next', val);
this.parentNode._accessType = 'random';"/>
<constructor><![CDATA[
var onpageshow = this.getAttribute("onpageshow");
var onpagehide = this.getAttribute("onpagehide");
try {
if (onpageshow)
this.onpageshow = new Function(onpageshow);
if (onpagehide)
this.onpagehide = new Function(onpagehide);
} catch (ex) {}
]]></constructor>
<method name="fireShow">
<body><![CDATA[
if (this.onpageshow) {
var result = this.onpageshow();
return result == undefined ? true : result;
}
return true;
]]></body>
</method>
<method name="fireHide">
<body><![CDATA[
if (this.onpagehide) {
var result = this.onpagehide();
return result == undefined ? true : result;
}
return true;
]]></body>
</method>
</implementation>
</binding>
<binding id="wizard-header" extends="chrome://global/content/bindings/wizard.xml#wizard-base">
<content>
<xul:hbox class="wizard-header-box-1" flex="1">
<xul:vbox class="wizard-header-box-text" flex="1">
<xul:text class="wizard-header-label" inherits="value=label"/>
<xul:text class="wizard-header-description" inherits="value=description"/>
</xul:vbox>
<xul:image class="wizard-header-icon" inherits="src=iconsrc"/>
</xul:hbox>
</content>
</binding>
<binding id="wizard-buttons" extends="chrome://global/content/bindings/wizard.xml#wizard-base">
<content>
<xul:vbox class="wizard-buttons-box-1" flex="1">
<xul:separator class="wizard-buttons-separator groove"/>
<xul:hbox class="wizard-buttons-box-2">
<xul:spring flex="1"/>
<xul:button class="wizard-button" wizardbutton="back"/>
<xul:deck class="wizard-next-deck" anonid="WizardButtonDeck">
<xul:button class="wizard-button" wizardbutton="finish" default="true"/>
<xul:button class="wizard-button" wizardbutton="next" default="true"/>
</xul:deck>
<xul:button class="wizard-button" wizardbutton="cancel"/>
</xul:hbox>
</xul:vbox>
</content>
<implementation>
<constructor>
this._wizardButtonDeck = document.getAnonymousElementByAttribute(this, "anonid", "WizardButtonDeck");
</constructor>
<method name="onPageChange">
<body><![CDATA[
if (this.getAttribute("lastpage") == "true") {
this._wizardButtonDeck.setAttribute("index", 0);
} else {
this._wizardButtonDeck.setAttribute("index", 1);
}
]]></body>
</method>
</implementation>
</binding>
<binding id="wizard-header-mac" extends="chrome://global/content/bindings/wizard.xml#wizard-base">
<content>
<xul:stack class="wizard-header-stack" flex="1">
<xul:vbox class="wizard-header-box-1">
<xul:vbox class="wizard-header-box-2">
<xul:vbox class="wizard-header-box-text">
<xul:text class="wizard-header-label" inherits="value=label"/>
</xul:vbox>
</xul:vbox>
</xul:vbox>
<xul:hbox class="wizard-header-box-icon">
<xul:spring flex="1"/>
<xul:image class="wizard-header-icon" inherits="src=iconsrc"/>
</xul:hbox>
</xul:stack>
</content>
</binding>
<binding id="wizard-buttons-mac" extends="chrome://global/content/bindings/wizard.xml#wizard-base">
<content>
<xul:vbox flex="1">
<xul:hbox class="wizard-buttons-top" inherits="hidden=hidetoprow">
<xul:spring flex="1"/>
<xul:button class="wizard-button" wizardbutton="cancel"/>
<xul:button class="wizard-button" wizardbutton="finish" default="true"/>
</xul:hbox>
<xul:separator class="wizard-buttons-separator groove"/>
<xul:hbox class="wizard-buttons-btm">
<xul:spring flex="1"/>
<xul:button class="wizard-button wizard-nav-button" wizardbutton="back"/>
<xul:box class="wizard-label-box" autostretch="never">
<xul:text class="wizard-page-label" inherits="value=pagestep"/>
</xul:box>
<xul:button class="wizard-button wizard-nav-button" wizardbutton="next" default="true" inherits="disabled=lastpage"/>
</xul:hbox>
</xul:vbox>
</content>
<implementation>
<method name="onPageChange">
<body><![CDATA[
this.setAttribute("hidetoprow", !(this.getAttribute("lastpage") == "true"));
]]></body>
</method>
</implementation>
</binding>
</bindings>

Просмотреть файл

@ -1,407 +0,0 @@
<?xml version="1.0"?>
<bindings id="menulistBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!--
BINDING : menulist
XUL REPRESENTATION : <menulist>
-->
<binding id="menulist" extends="xul:menu">
<content>
<xul:image class="menu-icon" inherits="src"/>
<xul:text class="menu-text" flex="1" inherits="value=label,accesskey,crop" crop="right"/>
<xul:image class="menu-dropmarker"/>
<children includes="menupopup"/>
</content>
<handlers>
<handler event="command" phase="capturing" action="if (event.originalTarget.localName == 'menuitem') this.selectedItem = event.originalTarget;"/>
<handler event="create">
<![CDATA[
if (event.target.parentNode == this && this.selectedItem) {
// Not ready for auto-setting the active child in hierarchies yet.
// For now, only do this when the outermost menupopup opens.
var menuBox = this.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject);
menuBox.activeChild = this.selectedItem;
}
]]>
</handler>
</handlers>
<implementation>
<constructor>
this.setInitialSelection()
</constructor>
<method name="setInitialSelection">
<body>
<![CDATA[
this.setAttribute('sizetopopup', 'true');
if (!this.label && this.childNodes.length) {
var arr = this.firstChild.getElementsByAttribute('selected', 'true');
if (!arr.length && this.value)
arr = this.firstChild.getElementsByAttribute('value', this.value);
if (arr.length)
this.selectedItem = arr[0];
else
this.selectedIndex = 0;
}
]]>
</body>
</method>
<property name="value" onget="return this.getAttribute('value');">
<setter>
<![CDATA[
var arr;
if (this.childNodes.length)
arr = this.firstChild.getElementsByAttribute('value', val);
if (arr && arr.length)
this.selectedItem = arr[0];
else
this.setAttribute('value', val);
return val;
]]>
</setter>
</property>
<property name="crop" onset="this.setAttribute('crop',val); return val;"
onget="return this.getAttribute('crop');"/>
<property name="src" onset="this.setAttribute('src',val); return val;"
onget="return this.getAttribute('src');"/>
<property name="label" onset="this.setAttribute('label',val); return val;"
onget="return this.getAttribute('label');"/>
<property name="disabled" onset="if (val) this.setAttribute('disabled',true);
else this.removeAttribute('disabled');
return val;"
onget="return (this.getAttribute('disabled')=='true');"/>
<property name="selectedInternal">
null
</property>
<property name="selectedIndex">
<getter>
<![CDATA[
// Quick and dirty. We won't deal with hierarchical menulists yet.
if (!this.selectedItem)
return -1;
var children = this.selectedItem.parentNode.childNodes;
for (var i = 0; i < children.length; i++) {
if (children[i] == this.selectedItem)
return i;
}
return -1;
]]>
</getter>
<setter>
<![CDATA[
if (val < 0)
this.selectedItem = null;
else {
var curr = this.firstChild;
while (curr && curr.localName != 'menupopup')
curr = curr.nextSibling;
if (curr && val < curr.childNodes.length)
this.selectedItem = curr.childNodes[val];
}
return val;
]]>
</setter>
</property>
<property name="selectedItem">
<getter>
<![CDATA[
return this.selectedInternal;
]]>
</getter>
<setter>
<![CDATA[
if (this.selectedInternal == val)
return val;
if (this.selectedInternal)
this.selectedInternal.removeAttribute('selected');
this.selectedInternal = val;
if (!this.selectedInternal) {
this.removeAttribute('value');
this.removeAttribute('src');
this.removeAttribute('label');
return val;
}
val.setAttribute('selected', 'true');
this.setAttribute('value', val.getAttribute('value'));
this.setAttribute('src', val.getAttribute('src'));
this.setAttribute('label', val.getAttribute('label'));
return val;
]]>
</setter>
</property>
</implementation>
</binding>
<!--
BINDING : menulist-editable
XUL REPRESENTATION : <menulist editable="true">
-->
<binding id="menulist-editable" extends="chrome://global/content/menulistBindings.xml#menulist">
<content>
<xul:box flex="1" class="menulist-editable-box">
<xul:image class="menu-icon" inherits="src"/>
<html:input type="text" flex="1" class="menulist-editable-text" allowevents="true" inherits="value=label,disabled"/>
<xul:image class="menu-dropmarker"/>
</xul:box>
<children includes="menupopup"/>
</content>
<implementation>
<property name="inputField" readonly="true">
<![CDATA[
var v = document.getAnonymousNodes(this);
var input = null;
for (var i = 0; i < v.length; i++) {
try {
var l = v[i].getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "input");
if (l.length > 0) {
input = l[0];
break;
}
} catch (e) {}
}
input;
]]>
</property>
<property name="label" onset="this.inputField.value = val; return val;"
onget="return this.inputField.value;"/>
</implementation>
</binding>
<!--
BINDING : menubutton-single
XUL REPRESENTATION : <menubutton>
-->
<binding id="menubutton-single-right" extends="xul:menu">
<content>
<xul:box class="menubutton-internal-box" autostretch="never">
<xul:text class="menubutton-single-text" inherits="value=label,crop,accesskey"/>
<xul:image class="menubutton-single-icon"/>
</xul:box>
<children includes="menupopup|template"/>
</content>
</binding>
<binding id="menubutton-single-left" extends="xul:menu">
<content>
<xul:box class="menubutton-internal-box" autostretch="never">
<xul:image class="menubutton-single-icon"/>
<xul:text class="menubutton-single-text" inherits="value=label,crop,accesskey"/>
</xul:box>
<children includes="menupopup|template"/>
</content>
</binding>
<binding id="menubutton-single-top" extends="xul:menu">
<content>
<xul:box class="button-internal-box" autostretch="never" orient="vertical" flex="1">
<xul:image class="menubutton-single-icon"/>
<xul:text class="menubutton-single-text" inherits="value=label,crop,accesskey"/>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-single-bottom" extends="xul:menu">
<content>
<xul:box class="button-internal-box" autostretch="never" orient="vertical" flex="1">
<xul:text class="menubutton-single-text" inherits="value=label,crop,accesskey"/>
<xul:image class="menubutton-single-icon"/>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<!--
BINDING : menubutton-icon
XUL REPRESENTATION : <menubutton class="menubutton-icon" extends="xul:menu">
-->
<binding id="menubutton-icon">
<content>
<xul:box class="menubutton-icon-internal-box" autostretch="never">
<xul:image class="menubutton-icon-icon" inherits="src"/>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<!--
BINDING : menubutton-dual
XUL REPRESENTATION : <menubutton class="menubutton-dual">
-->
<binding id="menubutton-dual-top" extends="xul:menu">
<content>
<xul:box class="menubutton-internal-box">
<xul:button class="menubutton-dual-button top" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
<xul:image class="menubutton-dropmarker"/>
</xul:box>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-dual-left" extends="xul:menu">
<content>
<xul:box class="menubutton-internal-box">
<xul:button class="menubutton-dual-button left" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
<xul:image class="menubutton-dropmarker"/>
</xul:box>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-dual-right" extends="xul:menu">
<content>
<xul:box class="menubutton-internal-box">
<xul:button class="menubutton-dual-button right" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
<xul:image class="menubutton-dropmarker"/>
</xul:box>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-dual-bottom" extends="xul:menu">
<content>
<xul:box class="menubutton-internal-box">
<xul:button class="menubutton-dual-button bottom" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
<xul:image class="menubutton-dropmarker"/>
</xul:box>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-dual-ex" extends="chrome://global/content/menulistBindings.xml#menubutton-dual-top">
<content>
<xul:button class="menubutton-dual-ex-button top" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey,disabled"
onmouseover="this.parentNode.buttonover = true;"
onmouseout="this.parentNode.buttonover = false;"
onmousedown="this.parentNode.buttondown = true; this.parentNode.captureMouseUp();"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle" inherits="disabled">
<xul:image class="menubutton-dropmarker" inherits="disabled"/>
</xul:box>
<children includes="menupopup"/>
</content>
<implementation>
<property name="buttonover">
<getter>
return this.getAttribute("buttonover");
</getter>
<setter>
<![CDATA[
if (!val && this.getAttribute("buttondown") == "true") {
this.removeAttribute("buttondown");
this._pendingActive = true;
}
else {
if (this._pendingActive) {
this.setAttribute("buttondown", "true");
this._pendingActive = false;
}
}
this.setAttribute("buttonover", val);
return val;
]]>
</setter>
</property>
<property name="buttondown">
<getter>
return this.getAttribute("buttondown");
</getter>
<setter>
this.setAttribute("buttondown", val);
return val;
</setter>
</property>
<property name="_pendingActive">false</property>
<property name="_buttonIsDown">false</property>
<property name="_globalMouseUpHandler" readonly="true">
<![CDATA[
var fn = function(aEvent)
{
var btn = document.__MenubuttonDualExMouseDown__;
btn.onMouseReallyUp();
document.removeEventListener("mouseup", btn._globalMouseUpHandler, true);
document.__MenubuttonDualExMouseDown__ = null;
};
fn;
]]>
</property>
<method name="captureMouseUp">
<body>
<![CDATA[
document.__MenubuttonDualExMouseDown__ = this;
document.addEventListener("mouseup", this._globalMouseUpHandler, true);
]]>
</body>
</method>
<method name="onMouseReallyUp">
<body>
<![CDATA[
this._pendingActive = false;
this.buttondown = false;
]]>
</body>
</method>
</implementation>
</binding>
<binding id="menubutton-dual-ex-left" extends="chrome://global/content/menulistBindings.xml#menubutton-dual-ex">
<content>
<xul:button class="menubutton-dual-ex-button left" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey,disabled"
onmouseover="this.parentNode.buttonover = true;"
onmouseout="this.parentNode.buttonover = false;"
onmousedown="this.parentNode.buttondown = true;"
onmouseup="this.parentNode.buttondown = false;"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle" inherits="disabled">
<xul:image class="menubutton-dropmarker" inherits="disabled"/>
</xul:box>
<children includes="menupopup"/>
</content>
</binding>
<!--
BINDING : menubutton-item
XUL REPRESENTATION : menuitem
-->
<binding id="menubutton-item">
<content autostretch="never">
<xul:text class="menubutton-text" flex="1" inherits="value=label,accesskey,crop" crop="right"/>
<children includes="menupopup"/>
</content>
</binding>
</bindings>

Просмотреть файл

@ -1,239 +0,0 @@
<?xml version="1.0"?>
<bindings id="scrollbarBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="thumb" extends="xul:box">
<content>
<xul:spring flex="1"/>
<xul:image inherits="src"/>
<xul:spring flex="1"/>
</content>
<implementation implements="nsIAccessible">
<method name="getAccDescription">
<body>
<![CDATA[
return 'This is a scrollbars thumb';
]]>
</body>
</method>
<method name="getAccValue">
<body>
<![CDATA[
return this.getAttribute('curpos');
]]>
</body>
</method>
<method name="getAccName">
<body>
<![CDATA[
return 'Thumb';
]]>
</body>
</method>
<method name="getAccRole">
<body>
<![CDATA[
return 'indicator';
]]>
</body>
</method>
<method name="getAccChildCount">
<body>
<![CDATA[
return 0;
]]>
</body>
</method>
<method name="getAccFirstChild">
<body>
<![CDATA[
return null;
]]>
</body>
</method>
<method name="getAccLastChild">
<body>
<![CDATA[
return null;
]]>
</body>
</method>
</implementation>
</binding>
<binding id="scrollbarbutton">
<content>
<xul:box class="scrollbarbutton-box" flex="1">
<xul:image class="scrollbarbutton-icon" inherits="src"/>
</xul:box>
</content>
<implementation implements="nsIAccessible">
<method name="getAccDefaultAction">
<body>
<![CDATA[
return 'Click';
]]>
</body>
</method>
<method name="getAccDescription">
<body>
<![CDATA[
return 'Adjusts scrollbar';
]]>
</body>
</method>
<method name="getAccName">
<body>
<![CDATA[
return 'scrollbar button';
]]>
</body>
</method>
<method name="getAccRole">
<body>
<![CDATA[
return 'push button';
]]>
</body>
</method>
<method name="accDoDefaultAction">
<body>
<![CDATA[
this.click();
dump("We just clicked!!!\n");
]]>
</body>
</method>
<method name="getAccChildCount">
<body>
<![CDATA[
return 0;
]]>
</body>
</method>
<method name="getAccFirstChild">
<body>
<![CDATA[
return null;
]]>
</body>
</method>
<method name="getAccLastChild">
<body>
<![CDATA[
return null;
]]>
</body>
</method>
</implementation>
</binding>
<binding id="scrollbar">
<implementation implements="nsIAccessible">
<method name="initScrollbar">
<body>
<![CDATA[
try {
var scrollbarStyle = this.boxObject.getLookAndFeelMetric("scrollbarStyle");
var thumbStyle = this.boxObject.getLookAndFeelMetric("thumbStyle");
var downTop;
var upBottom;
if ( scrollbarStyle == "double" ) {
downTop = this.findNodeByAttribute("sbattr", "scrollbar-down-top");
upBottom = this.findNodeByAttribute("sbattr", "scrollbar-up-bottom");
downTop.removeAttribute("collapsed");
upBottom.removeAttribute("collapsed");
}
else if ( scrollbarStyle == "doubletop" ) {
downTop = this.findNodeByAttribute("sbattr", "scrollbar-down-top");
var downBottom = this.findNodeByAttribute("sbattr", "scrollbar-down-bottom");
downTop.removeAttribute("collapsed");
downBottom.setAttribute("collapsed","true");
}
else if ( scrollbarStyle == "doublebottom" ) {
var upTop = this.findNodeByAttribute("sbattr", "scrollbar-up-top");
upBottom = this.findNodeByAttribute("sbattr", "scrollbar-up-bottom");
upTop.setAttribute("collapsed","true");
upBottom.removeAttribute("collapsed");
}
if ( thumbStyle == "fixed" ) {
var thumb = this.findNodeByAttribute("sbattr","scrollbar-thumb");
if ( thumb )
thumb.removeAttribute("flex");
}
}
catch ( x ) {
}
]]>
</body>
</method>
<method name="findNodeByAttribute">
<parameter name="aAttribute"/>
<parameter name="aValue"/>
<body>
<![CDATA[
var nodes = document.getAnonymousNodes(this);
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].getAttribute(aAttribute) == aValue)
return nodes[i];
else {
var subnodes = nodes[i].getElementsByAttribute(aAttribute, aValue);
if (!subnodes.length) continue;
return subnodes[0];
}
}
return null;
]]>
</body>
</method>
<constructor>
this.initScrollbar();
</constructor>
<method name="getAccDescription">
<body>
<![CDATA[
return 'This is a scrollbar';
]]>
</body>
</method>
<method name="getAccValue">
<body>
<![CDATA[
return this.getAttribute('curpos');
]]>
</body>
</method>
<method name="getAccName">
<body>
<![CDATA[
return 'Scroll Bar';
]]>
</body>
</method>
<method name="getAccRole">
<body>
<![CDATA[
return 'scrollbar';
]]>
</body>
</method>
</implementation>
<handlers>
<handler event="contextmenu" action="event.preventDefault();"/>
</handlers>
</binding>
</bindings>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу