XBL syntax changes. r,a=brendan

This commit is contained in:
hyatt%netscape.com 2000-09-01 01:38:04 +00:00
Родитель 66dd081533
Коммит 2912793421
24 изменённых файлов: 500 добавлений и 368 удалений

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

@ -171,16 +171,17 @@ nsXBLJSClass::Destroy()
PRUint32 nsXBLBinding::gRefCnt = 0;
nsIAtom* nsXBLBinding::kContentAtom = nsnull;
nsIAtom* nsXBLBinding::kInterfaceAtom = nsnull;
nsIAtom* nsXBLBinding::kImplementationAtom = nsnull;
nsIAtom* nsXBLBinding::kHandlersAtom = nsnull;
nsIAtom* nsXBLBinding::kExcludesAtom = nsnull;
nsIAtom* nsXBLBinding::kIncludesAtom = nsnull;
nsIAtom* nsXBLBinding::kInheritsAtom = nsnull;
nsIAtom* nsXBLBinding::kTypeAtom = nsnull;
nsIAtom* nsXBLBinding::kCapturerAtom = nsnull;
nsIAtom* nsXBLBinding::kEventAtom = nsnull;
nsIAtom* nsXBLBinding::kPhaseAtom = nsnull;
nsIAtom* nsXBLBinding::kExtendsAtom = nsnull;
nsIAtom* nsXBLBinding::kChildrenAtom = nsnull;
nsIAtom* nsXBLBinding::kValueAtom = nsnull;
nsIAtom* nsXBLBinding::kActionAtom = nsnull;
nsIAtom* nsXBLBinding::kHTMLAtom = nsnull;
nsIAtom* nsXBLBinding::kMethodAtom = nsnull;
nsIAtom* nsXBLBinding::kArgumentAtom = nsnull;
@ -282,17 +283,18 @@ nsXBLBinding::nsXBLBinding(const nsCString& aDocURI, const nsCString& aID)
kPool.Init("XBL Attribute Entries", kBucketSizes, kNumBuckets, kInitialSize);
kContentAtom = NS_NewAtom("content");
kInterfaceAtom = NS_NewAtom("interface");
kImplementationAtom = NS_NewAtom("implementation");
kHandlersAtom = NS_NewAtom("handlers");
kExcludesAtom = NS_NewAtom("excludes");
kIncludesAtom = NS_NewAtom("includes");
kInheritsAtom = NS_NewAtom("inherits");
kTypeAtom = NS_NewAtom("type");
kCapturerAtom = NS_NewAtom("capturer");
kEventAtom = NS_NewAtom("event");
kPhaseAtom = NS_NewAtom("phase");
kExtendsAtom = NS_NewAtom("extends");
kChildrenAtom = NS_NewAtom("children");
kHTMLAtom = NS_NewAtom("html");
kValueAtom = NS_NewAtom("value");
kActionAtom = NS_NewAtom("action");
kMethodAtom = NS_NewAtom("method");
kArgumentAtom = NS_NewAtom("argument");
kBodyAtom = NS_NewAtom("body");
@ -330,17 +332,18 @@ nsXBLBinding::~nsXBLBinding(void)
if (gRefCnt == 0) {
NS_RELEASE(kContentAtom);
NS_RELEASE(kInterfaceAtom);
NS_RELEASE(kImplementationAtom);
NS_RELEASE(kHandlersAtom);
NS_RELEASE(kExcludesAtom);
NS_RELEASE(kIncludesAtom);
NS_RELEASE(kInheritsAtom);
NS_RELEASE(kTypeAtom);
NS_RELEASE(kCapturerAtom);
NS_RELEASE(kEventAtom);
NS_RELEASE(kPhaseAtom);
NS_RELEASE(kExtendsAtom);
NS_RELEASE(kChildrenAtom);
NS_RELEASE(kHTMLAtom);
NS_RELEASE(kValueAtom);
NS_RELEASE(kActionAtom);
NS_RELEASE(kMethodAtom);
NS_RELEASE(kArgumentAtom);
NS_RELEASE(kBodyAtom);
@ -587,7 +590,7 @@ nsXBLBinding::InstallEventHandlers(nsIContent* aBoundElement, nsIXBLBinding** aB
// Fetch the type attribute.
// XXX Deal with a comma-separated list of types
nsAutoString type;
child->GetAttribute(kNameSpaceID_None, kTypeAtom, type);
child->GetAttribute(kNameSpaceID_None, kEventAtom, type);
if (!type.IsEmpty()) {
nsIID iid;
@ -643,8 +646,8 @@ nsXBLBinding::InstallEventHandlers(nsIContent* aBoundElement, nsIXBLBinding** aB
// Figure out if we're using capturing or not.
PRBool useCapture = PR_FALSE;
nsAutoString capturer;
child->GetAttribute(kNameSpaceID_None, kCapturerAtom, capturer);
if (capturer == NS_LITERAL_STRING("true"))
child->GetAttribute(kNameSpaceID_None, kPhaseAtom, capturer);
if (capturer == NS_LITERAL_STRING("capturing"))
useCapture = PR_TRUE;
// Add the event listener.
@ -665,8 +668,9 @@ nsXBLBinding::InstallEventHandlers(nsIContent* aBoundElement, nsIXBLBinding** aB
else {
// Call AddScriptEventListener for other IID types
// XXX Want this to all go away!
NS_WARNING("***** Non-compliant XBL event listener attached! *****");
nsAutoString value;
child->GetAttribute(kNameSpaceID_None, kValueAtom, value);
child->GetAttribute(kNameSpaceID_None, kActionAtom, value);
if (value.IsEmpty())
GetTextData(child, value);
@ -701,7 +705,7 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
// Fetch the interface element for this binding.
nsCOMPtr<nsIContent> interfaceElement;
GetImmediateChild(kInterfaceAtom, getter_AddRefs(interfaceElement));
GetImmediateChild(kImplementationAtom, getter_AddRefs(interfaceElement));
if (interfaceElement && AllowScripts()) {
// Get our bound element's script context.
@ -1123,7 +1127,7 @@ nsXBLBinding::ChangeDocument(nsIDocument* aOldDocument, nsIDocument* aNewDocumen
if (mIsStyleBinding) {
// Now the binding dies. Unhook our prototypes.
nsCOMPtr<nsIContent> interfaceElement;
GetImmediateChild(kInterfaceAtom, getter_AddRefs(interfaceElement));
GetImmediateChild(kImplementationAtom, getter_AddRefs(interfaceElement));
if (interfaceElement) {
nsCOMPtr<nsIScriptGlobalObject> global;

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

@ -103,13 +103,13 @@ public:
static PRUint32 gRefCnt;
static nsIAtom* kContentAtom;
static nsIAtom* kInterfaceAtom;
static nsIAtom* kImplementationAtom;
static nsIAtom* kHandlersAtom;
static nsIAtom* kExcludesAtom;
static nsIAtom* kIncludesAtom;
static nsIAtom* kInheritsAtom;
static nsIAtom* kTypeAtom;
static nsIAtom* kCapturerAtom;
static nsIAtom* kEventAtom;
static nsIAtom* kPhaseAtom;
static nsIAtom* kExtendsAtom;
static nsIAtom* kChildrenAtom;
static nsIAtom* kMethodAtom;
@ -122,6 +122,7 @@ public:
static nsIAtom* kSetterAtom;
static nsIAtom* kHTMLAtom;
static nsIAtom* kValueAtom;
static nsIAtom* kActionAtom;
static nsIAtom* kNameAtom;
static nsIAtom* kReadOnlyAtom;
static nsIAtom* kAttachToAtom;

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

@ -59,7 +59,7 @@ nsIAtom* nsXBLEventHandler::kShiftAtom = nsnull;
nsIAtom* nsXBLEventHandler::kControlAtom = nsnull;
nsIAtom* nsXBLEventHandler::kMetaAtom = nsnull;
nsIAtom* nsXBLEventHandler::kAltAtom = nsnull;
nsIAtom* nsXBLEventHandler::kValueAtom = nsnull;
nsIAtom* nsXBLEventHandler::kActionAtom = nsnull;
nsIAtom* nsXBLEventHandler::kCommandAtom = nsnull;
nsIAtom* nsXBLEventHandler::kClickCountAtom = nsnull;
nsIAtom* nsXBLEventHandler::kButtonAtom = nsnull;
@ -85,7 +85,7 @@ nsXBLEventHandler::nsXBLEventHandler(nsIContent* aBoundElement, nsIContent* aHan
kControlAtom = NS_NewAtom("control");
kAltAtom = NS_NewAtom("alt");
kMetaAtom = NS_NewAtom("meta");
kValueAtom = NS_NewAtom("value");
kActionAtom = NS_NewAtom("action");
kCommandAtom = NS_NewAtom("command");
kClickCountAtom = NS_NewAtom("clickcount");
kButtonAtom = NS_NewAtom("button");
@ -106,7 +106,7 @@ nsXBLEventHandler::~nsXBLEventHandler()
NS_RELEASE(kControlAtom);
NS_RELEASE(kAltAtom);
NS_RELEASE(kMetaAtom);
NS_RELEASE(kValueAtom);
NS_RELEASE(kActionAtom);
NS_RELEASE(kCommandAtom);
NS_RELEASE(kButtonAtom);
NS_RELEASE(kClickCountAtom);
@ -690,7 +690,7 @@ nsXBLEventHandler::ExecuteHandler(const nsAReadableString & aEventName, nsIDOMEv
// Compile the event handler.
nsAutoString handlerText;
mHandlerElement->GetAttribute(kNameSpaceID_None, kValueAtom, handlerText);
mHandlerElement->GetAttribute(kNameSpaceID_None, kActionAtom, handlerText);
if (handlerText.IsEmpty()) {
// look to see if action content is contained by the handler element
GetTextData(mHandlerElement, handlerText);
@ -785,13 +785,13 @@ nsXBLEventHandler::RemoveEventHandlers()
// Figure out if we're using capturing or not.
PRBool useCapture = PR_FALSE;
nsAutoString capturer;
mHandlerElement->GetAttribute(kNameSpaceID_None, nsXBLBinding::kCapturerAtom, capturer);
if (capturer == NS_LITERAL_STRING("true"))
mHandlerElement->GetAttribute(kNameSpaceID_None, nsXBLBinding::kPhaseAtom, capturer);
if (capturer == NS_LITERAL_STRING("capturing"))
useCapture = PR_TRUE;
// XXX Will potentially be comma-separated
nsAutoString type;
mHandlerElement->GetAttribute(kNameSpaceID_None, nsXBLBinding::kTypeAtom, type);
mHandlerElement->GetAttribute(kNameSpaceID_None, nsXBLBinding::kEventAtom, type);
// Figure out our type.
PRBool mouse = nsXBLBinding::IsMouseHandler(type);

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

@ -116,7 +116,7 @@ protected:
static nsIAtom* kControlAtom;
static nsIAtom* kAltAtom;
static nsIAtom* kMetaAtom;
static nsIAtom* kValueAtom;
static nsIAtom* kActionAtom;
static nsIAtom* kCommandAtom;
static nsIAtom* kClickCountAtom;
static nsIAtom* kButtonAtom;

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

@ -171,16 +171,17 @@ nsXBLJSClass::Destroy()
PRUint32 nsXBLBinding::gRefCnt = 0;
nsIAtom* nsXBLBinding::kContentAtom = nsnull;
nsIAtom* nsXBLBinding::kInterfaceAtom = nsnull;
nsIAtom* nsXBLBinding::kImplementationAtom = nsnull;
nsIAtom* nsXBLBinding::kHandlersAtom = nsnull;
nsIAtom* nsXBLBinding::kExcludesAtom = nsnull;
nsIAtom* nsXBLBinding::kIncludesAtom = nsnull;
nsIAtom* nsXBLBinding::kInheritsAtom = nsnull;
nsIAtom* nsXBLBinding::kTypeAtom = nsnull;
nsIAtom* nsXBLBinding::kCapturerAtom = nsnull;
nsIAtom* nsXBLBinding::kEventAtom = nsnull;
nsIAtom* nsXBLBinding::kPhaseAtom = nsnull;
nsIAtom* nsXBLBinding::kExtendsAtom = nsnull;
nsIAtom* nsXBLBinding::kChildrenAtom = nsnull;
nsIAtom* nsXBLBinding::kValueAtom = nsnull;
nsIAtom* nsXBLBinding::kActionAtom = nsnull;
nsIAtom* nsXBLBinding::kHTMLAtom = nsnull;
nsIAtom* nsXBLBinding::kMethodAtom = nsnull;
nsIAtom* nsXBLBinding::kArgumentAtom = nsnull;
@ -282,17 +283,18 @@ nsXBLBinding::nsXBLBinding(const nsCString& aDocURI, const nsCString& aID)
kPool.Init("XBL Attribute Entries", kBucketSizes, kNumBuckets, kInitialSize);
kContentAtom = NS_NewAtom("content");
kInterfaceAtom = NS_NewAtom("interface");
kImplementationAtom = NS_NewAtom("implementation");
kHandlersAtom = NS_NewAtom("handlers");
kExcludesAtom = NS_NewAtom("excludes");
kIncludesAtom = NS_NewAtom("includes");
kInheritsAtom = NS_NewAtom("inherits");
kTypeAtom = NS_NewAtom("type");
kCapturerAtom = NS_NewAtom("capturer");
kEventAtom = NS_NewAtom("event");
kPhaseAtom = NS_NewAtom("phase");
kExtendsAtom = NS_NewAtom("extends");
kChildrenAtom = NS_NewAtom("children");
kHTMLAtom = NS_NewAtom("html");
kValueAtom = NS_NewAtom("value");
kActionAtom = NS_NewAtom("action");
kMethodAtom = NS_NewAtom("method");
kArgumentAtom = NS_NewAtom("argument");
kBodyAtom = NS_NewAtom("body");
@ -330,17 +332,18 @@ nsXBLBinding::~nsXBLBinding(void)
if (gRefCnt == 0) {
NS_RELEASE(kContentAtom);
NS_RELEASE(kInterfaceAtom);
NS_RELEASE(kImplementationAtom);
NS_RELEASE(kHandlersAtom);
NS_RELEASE(kExcludesAtom);
NS_RELEASE(kIncludesAtom);
NS_RELEASE(kInheritsAtom);
NS_RELEASE(kTypeAtom);
NS_RELEASE(kCapturerAtom);
NS_RELEASE(kEventAtom);
NS_RELEASE(kPhaseAtom);
NS_RELEASE(kExtendsAtom);
NS_RELEASE(kChildrenAtom);
NS_RELEASE(kHTMLAtom);
NS_RELEASE(kValueAtom);
NS_RELEASE(kActionAtom);
NS_RELEASE(kMethodAtom);
NS_RELEASE(kArgumentAtom);
NS_RELEASE(kBodyAtom);
@ -587,7 +590,7 @@ nsXBLBinding::InstallEventHandlers(nsIContent* aBoundElement, nsIXBLBinding** aB
// Fetch the type attribute.
// XXX Deal with a comma-separated list of types
nsAutoString type;
child->GetAttribute(kNameSpaceID_None, kTypeAtom, type);
child->GetAttribute(kNameSpaceID_None, kEventAtom, type);
if (!type.IsEmpty()) {
nsIID iid;
@ -643,8 +646,8 @@ nsXBLBinding::InstallEventHandlers(nsIContent* aBoundElement, nsIXBLBinding** aB
// Figure out if we're using capturing or not.
PRBool useCapture = PR_FALSE;
nsAutoString capturer;
child->GetAttribute(kNameSpaceID_None, kCapturerAtom, capturer);
if (capturer == NS_LITERAL_STRING("true"))
child->GetAttribute(kNameSpaceID_None, kPhaseAtom, capturer);
if (capturer == NS_LITERAL_STRING("capturing"))
useCapture = PR_TRUE;
// Add the event listener.
@ -665,8 +668,9 @@ nsXBLBinding::InstallEventHandlers(nsIContent* aBoundElement, nsIXBLBinding** aB
else {
// Call AddScriptEventListener for other IID types
// XXX Want this to all go away!
NS_WARNING("***** Non-compliant XBL event listener attached! *****");
nsAutoString value;
child->GetAttribute(kNameSpaceID_None, kValueAtom, value);
child->GetAttribute(kNameSpaceID_None, kActionAtom, value);
if (value.IsEmpty())
GetTextData(child, value);
@ -701,7 +705,7 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
// Fetch the interface element for this binding.
nsCOMPtr<nsIContent> interfaceElement;
GetImmediateChild(kInterfaceAtom, getter_AddRefs(interfaceElement));
GetImmediateChild(kImplementationAtom, getter_AddRefs(interfaceElement));
if (interfaceElement && AllowScripts()) {
// Get our bound element's script context.
@ -1123,7 +1127,7 @@ nsXBLBinding::ChangeDocument(nsIDocument* aOldDocument, nsIDocument* aNewDocumen
if (mIsStyleBinding) {
// Now the binding dies. Unhook our prototypes.
nsCOMPtr<nsIContent> interfaceElement;
GetImmediateChild(kInterfaceAtom, getter_AddRefs(interfaceElement));
GetImmediateChild(kImplementationAtom, getter_AddRefs(interfaceElement));
if (interfaceElement) {
nsCOMPtr<nsIScriptGlobalObject> global;

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

@ -103,13 +103,13 @@ public:
static PRUint32 gRefCnt;
static nsIAtom* kContentAtom;
static nsIAtom* kInterfaceAtom;
static nsIAtom* kImplementationAtom;
static nsIAtom* kHandlersAtom;
static nsIAtom* kExcludesAtom;
static nsIAtom* kIncludesAtom;
static nsIAtom* kInheritsAtom;
static nsIAtom* kTypeAtom;
static nsIAtom* kCapturerAtom;
static nsIAtom* kEventAtom;
static nsIAtom* kPhaseAtom;
static nsIAtom* kExtendsAtom;
static nsIAtom* kChildrenAtom;
static nsIAtom* kMethodAtom;
@ -122,6 +122,7 @@ public:
static nsIAtom* kSetterAtom;
static nsIAtom* kHTMLAtom;
static nsIAtom* kValueAtom;
static nsIAtom* kActionAtom;
static nsIAtom* kNameAtom;
static nsIAtom* kReadOnlyAtom;
static nsIAtom* kAttachToAtom;

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

@ -59,7 +59,7 @@ nsIAtom* nsXBLEventHandler::kShiftAtom = nsnull;
nsIAtom* nsXBLEventHandler::kControlAtom = nsnull;
nsIAtom* nsXBLEventHandler::kMetaAtom = nsnull;
nsIAtom* nsXBLEventHandler::kAltAtom = nsnull;
nsIAtom* nsXBLEventHandler::kValueAtom = nsnull;
nsIAtom* nsXBLEventHandler::kActionAtom = nsnull;
nsIAtom* nsXBLEventHandler::kCommandAtom = nsnull;
nsIAtom* nsXBLEventHandler::kClickCountAtom = nsnull;
nsIAtom* nsXBLEventHandler::kButtonAtom = nsnull;
@ -85,7 +85,7 @@ nsXBLEventHandler::nsXBLEventHandler(nsIContent* aBoundElement, nsIContent* aHan
kControlAtom = NS_NewAtom("control");
kAltAtom = NS_NewAtom("alt");
kMetaAtom = NS_NewAtom("meta");
kValueAtom = NS_NewAtom("value");
kActionAtom = NS_NewAtom("action");
kCommandAtom = NS_NewAtom("command");
kClickCountAtom = NS_NewAtom("clickcount");
kButtonAtom = NS_NewAtom("button");
@ -106,7 +106,7 @@ nsXBLEventHandler::~nsXBLEventHandler()
NS_RELEASE(kControlAtom);
NS_RELEASE(kAltAtom);
NS_RELEASE(kMetaAtom);
NS_RELEASE(kValueAtom);
NS_RELEASE(kActionAtom);
NS_RELEASE(kCommandAtom);
NS_RELEASE(kButtonAtom);
NS_RELEASE(kClickCountAtom);
@ -690,7 +690,7 @@ nsXBLEventHandler::ExecuteHandler(const nsAReadableString & aEventName, nsIDOMEv
// Compile the event handler.
nsAutoString handlerText;
mHandlerElement->GetAttribute(kNameSpaceID_None, kValueAtom, handlerText);
mHandlerElement->GetAttribute(kNameSpaceID_None, kActionAtom, handlerText);
if (handlerText.IsEmpty()) {
// look to see if action content is contained by the handler element
GetTextData(mHandlerElement, handlerText);
@ -785,13 +785,13 @@ nsXBLEventHandler::RemoveEventHandlers()
// Figure out if we're using capturing or not.
PRBool useCapture = PR_FALSE;
nsAutoString capturer;
mHandlerElement->GetAttribute(kNameSpaceID_None, nsXBLBinding::kCapturerAtom, capturer);
if (capturer == NS_LITERAL_STRING("true"))
mHandlerElement->GetAttribute(kNameSpaceID_None, nsXBLBinding::kPhaseAtom, capturer);
if (capturer == NS_LITERAL_STRING("capturing"))
useCapture = PR_TRUE;
// XXX Will potentially be comma-separated
nsAutoString type;
mHandlerElement->GetAttribute(kNameSpaceID_None, nsXBLBinding::kTypeAtom, type);
mHandlerElement->GetAttribute(kNameSpaceID_None, nsXBLBinding::kEventAtom, type);
// Figure out our type.
PRBool mouse = nsXBLBinding::IsMouseHandler(type);

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

@ -116,7 +116,7 @@ protected:
static nsIAtom* kControlAtom;
static nsIAtom* kAltAtom;
static nsIAtom* kMetaAtom;
static nsIAtom* kValueAtom;
static nsIAtom* kActionAtom;
static nsIAtom* kCommandAtom;
static nsIAtom* kClickCountAtom;
static nsIAtom* kButtonAtom;

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

@ -1178,6 +1178,8 @@ nsBoxFrame::AttributeChanged(nsIPresContext* aPresContext,
aAttribute == nsHTMLAtoms::height ||
aAttribute == nsHTMLAtoms::align ||
aAttribute == nsHTMLAtoms::valign ||
aAttribute == nsHTMLAtoms::left ||
aAttribute == nsHTMLAtoms::top ||
aAttribute == nsXULAtoms::flex ||
aAttribute == nsXULAtoms::orient ||
aAttribute == nsXULAtoms::equalsize ||
@ -1854,6 +1856,7 @@ nsBoxFrame::GetInsertionPoint(nsIPresShell* aShell, nsIFrame* aParent, nsIFrame*
content->GetDocument(*getter_AddRefs(document));
if (!document)
return;
nsCOMPtr<nsIBindingManager> bindingManager;
document->GetBindingManager(getter_AddRefs(bindingManager));
if (!bindingManager)
@ -1863,6 +1866,14 @@ nsBoxFrame::GetInsertionPoint(nsIPresShell* aShell, nsIFrame* aParent, nsIFrame*
if (aChild) {
nsCOMPtr<nsIContent> currContent;
aChild->GetContent(getter_AddRefs(currContent));
// Check to see if the content is anonymous.
nsCOMPtr<nsIContent> bindingParent;
currContent->GetBindingParent(getter_AddRefs(bindingParent));
if (bindingParent == content)
return; // It is anonymous. Don't use the insertion point, since that's only
// for the explicit kids.
bindingManager->GetInsertionPoint(content, currContent, getter_AddRefs(insertionElement));
if (insertionElement) {
aShell->GetPrimaryFrameFor(insertionElement, &frame);

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

@ -156,7 +156,7 @@ nsBoxLayoutState::HandleReflow(nsIBox* aRootBox)
break;
case eReflowReason_StyleChange:
printf("STYLE CHANGE REFLOW. Blowing away all box caches!!\n");
// printf("STYLE CHANGE REFLOW. Blowing away all box caches!!\n");
aRootBox->MarkChildrenStyleChange();
// fall through to dirty

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

@ -15,7 +15,7 @@
</xul:box>
</content>
<interface>
<implementation>
<property name="value" onset="return document.getAnonymousNodes(this)[0].firstChild.setAttribute('value',val);"
onget="return document.getAnonymousNodes(this)[0].firstChild.getAttribute('value');"/>
<property name="crop" onset="return document.getAnonymousNodes(this)[0].firstChild.setAttribute('crop',val);"
@ -47,7 +47,7 @@
]]>
</body>
</method>
</interface>
</implementation>
</binding>
<binding id="search-menulist-abstract" name="searchMenulistAbstract" extends="xul:box">
@ -57,7 +57,7 @@
</xul:menulist>
</content>
<interface>
<implementation>
<property readonly="true" name="validityManager">
<![CDATA[
Components.classes['mozilla.mail.search.validityManager.1'].getService(Components.interfaces.nsIMsgSearchValidityManager);
@ -192,13 +192,13 @@
]]>
</body>
</method>
</interface>
</implementation>
</binding>
<!-- searchattribute - Subject, Sender, To, CC, etc. -->
<binding id="searchattribute" name="searchAttribute"
extends="chrome://messenger/content/mailWidgets.xml#search-menulist-abstract">
<interface>
<implementation>
<property name="stringBundle">
<![CDATA[
srGetStrBundle("chrome://messenger/locale/search-attributes.properties");
@ -212,13 +212,13 @@
]]>
</getter>
</property>
</interface>
</implementation>
</binding>
<!-- searchoperator - Contains, Is Less than, etc -->
<binding id="searchoperator" name="searchOperator"
extends="chrome://messenger/content/mailWidgets.xml#search-menulist-abstract">
<interface>
<implementation>
<property name="stringBundle">
<![CDATA[
srGetStrBundle("chrome://messenger/locale/search-operators.properties");
@ -248,7 +248,7 @@
]]>
</getter>
</property>
</interface>
</implementation>
</binding>
<!-- searchvalue - a widget which dynamically changes it's user interface
@ -276,7 +276,7 @@
</xul:menupopup>
</xul:menulist>
</content>
<interface>
<implementation>
<!-- parentValue forwards to the attribute -->
<property name="parentValue" onset="return this.searchAttribute=val;"
onget="return this.searchAttribute;"/>
@ -361,6 +361,122 @@
]]>
</body>
</method>
</interface>
</implementation>
</binding>
<binding id="searchterm" name="searchTerm" extends="xul:box">
<implementation>
<!-- the actual nsIMsgSearchTerm object -->
<property name="searchTerm" onget="return this.internalSearchTerm">
<setter>
<![CDATA[
this.internalSearchTerm = val;
var term = val;
// val is a nsIMsgSearchTerm
var searchAttribute=this.searchattribute;
var searchOperator=this.searchoperator;
var searchValue=this.searchvalue;
// now reflect all attributes of the searchterm into the widgets
if (searchAttribute) searchAttribute.value = term.attrib;
if (searchOperator) searchOperator.value = val.op;
if (searchValue) searchValue.value = term.value;
this.booleanAnd = val.booleanAnd;
]]>
</setter>
</property>
<property name="searchScope">
<getter>
<![CDATA[
var searchAttribute = this.searchattribute;
if (searchAttribute)
return searchAttribute.searchScope;
return undefined;
]]>
</getter>
<setter>
<![CDATA[
var searchAttribute = this.searchattribute;
if (searchAttribute) searchAttribute.searchScope=val;
]]>
</setter>
</property>
<!-- the three tags that make up a term - to use, set the
attribute in the XUL to the ID of the term.
-->
<property name="searchattribute"
onget="return document.getElementById(this.getAttribute('searchattribute'));"
onset="this.setAttribute('searchattribute',val.id)"/>
<property name="searchoperator"
onget="return document.getElementById(this.getAttribute('searchoperator'));"
onset="this.setAttribute('searchoperator',val.id)"/>
<property name="searchvalue"
onget="return document.getElementById(this.getAttribute('searchvalue'));"
onset="this.setAttribute('searchvalue',val.id)"/>
<property name="booleanNodes">
<![CDATA[
null;
]]>
</property>
<property name="stringBundle">
<![CDATA[
srGetStrBundle("chrome://messenger/locale/search.properties");
]]>
</property>
<property name="booleanAnd" onget="return this.internalBooleanAnd">
<setter>
<![CDATA[
// whenever you set this, all nodes in booleanNodes
// are updated to reflect the string
if (this.internalBooleanAnd == val) return;
this.internalBooleanAnd = val;
var booleanNodes = this.booleanNodes;
if (!booleanNodes) return;
var stringBundle = this.stringBundle;
var andString = val ? "And" : "Or";
for (var i=0; i<booleanNodes.length; i++) {
try {
var staticString =
stringBundle.GetStringFromName("search" + andString + i);
if (staticString && staticString.length>0)
booleanNodes[i].setAttribute("value", staticString);
} catch (ex) { /* no error, means string not found */}
}
]]>
</setter>
</property>
<method name="save">
<body>
<![CDATA[
var searchTerm = this.searchTerm;
searchTerm.attrib = this.searchattribute.value;
searchTerm.op = this.searchoperator.value;
if (this.searchvalue.value)
this.searchvalue.save();
else
this.searchvalue.saveTo(searchTerm.value);
searchTerm.value = this.searchvalue.value;
searchTerm.booleanAnd = this.booleanAnd;
]]>
</body>
</method>
<!-- if you have a search term element with no search term -->
<method name="saveTo">
<argument name="searchTerm"/>
<body>
<![CDATA[
this.internalSearchTerm = searchTerm;
this.save();
]]>
</body>
</method>
</implementation>
</binding>
</bindings>

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

@ -18,7 +18,7 @@
</xul:box>
</content>
<interface>
<implementation>
<property name="value"
onset="
if (this.ignoreInputEventTimer)
@ -418,15 +418,15 @@
]]>
</property>
</interface>
</implementation>
<handlers>
<handler type="click" value="this.privatefunc.cleanupInputField(this);"/>
<handler type="dblclick" value="this.privatefunc.cleanupInputField(this);"/>
<handler type="input" value="this.privatefunc.processInput(this);"/>
<handler type="keypress" value="this.privatefunc.processKeyPress(this, event);"/>
<handler type="focus" value="this.needToAutocomplete = false; this.lastResults.searchString=''; this.ignoreInputEvent = false"/>
<handler type="blur" value="
<handler event="click" action="this.privatefunc.cleanupInputField(this);"/>
<handler event="dblclick" action="this.privatefunc.cleanupInputField(this);"/>
<handler event="input" action="this.privatefunc.processInput(this);"/>
<handler event="keypress" action="this.privatefunc.processKeyPress(this, event);"/>
<handler event="focus" action="this.needToAutocomplete = false; this.lastResults.searchString=''; this.ignoreInputEvent = false"/>
<handler event="blur" action="
this.privatefunc.closePopupMenu(this);
if (this.needToAutocomplete)
this.privatefunc.finishAutoComplete(this, event);

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

@ -13,12 +13,12 @@
<xul:text class="box-smallheader-right" inherits="description:value"/>
</xul:box>
</content>
<interface>
<implementation>
<property name="title" onset="this.setAttribute('title',val); return val;"
onget="return this.getAttribute('title');"/>
<property name="description" onset="this.setAttribute('description',val); return val;"
onget="return this.getAttribute('description');"/>
</interface>
</implementation>
</binding>
<binding id="largeheader">

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

@ -7,38 +7,38 @@
<binding id="inputFieldsBase">
<handlers>
<handler type="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
<handler event="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
command="cmd_beginLine"/>
<handler type="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
<handler event="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
command="cmd_endLine"/>
<handler type="keypress" id="key_left" keycode="VK_LEFT" alt="false" shift="false" control="false"
<handler event="keypress" id="key_left" keycode="VK_LEFT" alt="false" shift="false" control="false"
command="cmd_charPrevious"/>
<handler type="keypress" id="key_right" keycode="VK_RIGHT" alt="false" shift="false" control="false"
<handler event="keypress" id="key_right" keycode="VK_RIGHT" alt="false" shift="false" control="false"
command="cmd_charNext"/>
<handler type="keypress" id="key_pageup" keycode="VK_PAGE_UP" alt="false" shift="false" control="false"
<handler event="keypress" id="key_pageup" keycode="VK_PAGE_UP" alt="false" shift="false" control="false"
command="cmd_scrollPageUp"/>
<handler type="keypress" id="key_pagedown" keycode="VK_PAGE_DOWN" alt="false" shift="false" control="false"
<handler event="keypress" id="key_pagedown" keycode="VK_PAGE_DOWN" alt="false" shift="false" control="false"
command="cmd_scrollPageDown"/>
<handler type="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
<handler event="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
command="cmd_selectBeginLine"/>
<handler type="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
<handler event="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
command="cmd_selectEndLine"/>
<handler type="keypress" id="key_leftshift" keycode="VK_LEFT" shift="true" alt="false" control="false"
<handler event="keypress" id="key_leftshift" keycode="VK_LEFT" shift="true" alt="false" control="false"
command="cmd_selectCharPrevious"/>
<handler type="keypress" id="key_rightshift" keycode="VK_RIGHT" shift="true" alt="false" control="false"
<handler event="keypress" id="key_rightshift" keycode="VK_RIGHT" shift="true" alt="false" control="false"
command="cmd_selectCharNext"/>
<handler type="keypress" id="key_undo" key="z" primary="true"
<handler event="keypress" id="key_undo" key="z" primary="true"
command="cmd_undo"/>
<!-- Cut/copy/paste/undo -->
<handler type="keypress" id="key_copy" key="c" primary="true"
<handler event="keypress" id="key_copy" key="c" primary="true"
command="cmd_copy"/>
<handler type="keypress" id="key_cut" key="x" primary="true"
<handler event="keypress" id="key_cut" key="x" primary="true"
command="cmd_cut"/>
<handler type="keypress" id="key_paste" key="v" primary="true"
<handler event="keypress" id="key_paste" key="v" primary="true"
command="cmd_paste"/>
<handler type="keypress" id="key_undo" key="z" primary="true"
<handler event="keypress" id="key_undo" key="z" primary="true"
command="cmd_undo"/>
</handlers>
@ -47,37 +47,37 @@
<binding id="textAreasBase">
<handlers>
<handler type="keypress" id="key_left" keycode="VK_LEFT" alt="false" shift="false" control="false"
<handler event="keypress" id="key_left" keycode="VK_LEFT" alt="false" shift="false" control="false"
command="cmd_charPrevious"/>
<handler type="keypress" id="key_right" keycode="VK_RIGHT" alt="false" shift="false" control="false"
<handler event="keypress" id="key_right" keycode="VK_RIGHT" alt="false" shift="false" control="false"
command="cmd_charNext"/>
<handler type="keypress" id="key_leftshift" keycode="VK_LEFT" shift="true" alt="false" control="false"
<handler event="keypress" id="key_leftshift" keycode="VK_LEFT" shift="true" alt="false" control="false"
command="cmd_selectCharPrevious"/>
<handler type="keypress" id="key_rightshift" keycode="VK_RIGHT" shift="true" alt="false" control="false"
<handler event="keypress" id="key_rightshift" keycode="VK_RIGHT" shift="true" alt="false" control="false"
command="cmd_selectCharNext"/>
<handler type="keypress" id="key_up" keycode="VK_UP" alt="false" shift="false" control="false"
<handler event="keypress" id="key_up" keycode="VK_UP" alt="false" shift="false" control="false"
command="cmd_linePrevious"/>
<handler type="keypress" id="key_down" keycode="VK_DOWN" alt="false" shift="false" control="false"
<handler event="keypress" id="key_down" keycode="VK_DOWN" alt="false" shift="false" control="false"
command="cmd_lineNext"/>
<handler type="keypress" id="key_up_shift" keycode="VK_UP" shift="true" alt="false" control="false"
<handler event="keypress" id="key_up_shift" keycode="VK_UP" shift="true" alt="false" control="false"
command="cmd_selectLinePrevious"/>
<handler type="keypress" id="key_down_shift" keycode="VK_DOWN" shift="true" alt="false" control="false"
<handler event="keypress" id="key_down_shift" keycode="VK_DOWN" shift="true" alt="false" control="false"
command="cmd_selectLineNext"/>
<handler type="keypress" id="key_pageup" keycode="VK_PAGE_UP" alt="false" shift="false" control="false"
<handler event="keypress" id="key_pageup" keycode="VK_PAGE_UP" alt="false" shift="false" control="false"
command="cmd_scrollPageUp"/>
<handler type="keypress" id="key_pagedown" keycode="VK_PAGE_DOWN" alt="false" shift="false" control="false"
<handler event="keypress" id="key_pagedown" keycode="VK_PAGE_DOWN" alt="false" shift="false" control="false"
command="cmd_scrollPageDown"/>
<handler type="keypress" id="key_undo" key="z" primary="true"
<handler event="keypress" id="key_undo" key="z" primary="true"
command="cmd_undo"/>
<!-- Cut/copy/paste/undo -->
<handler type="keypress" id="key_copy" key="c" primary="true"
<handler event="keypress" id="key_copy" key="c" primary="true"
command="cmd_copy"/>
<handler type="keypress" id="key_cut" key="x" primary="true"
<handler event="keypress" id="key_cut" key="x" primary="true"
command="cmd_cut"/>
<handler type="keypress" id="key_paste" key="v" primary="true"
<handler event="keypress" id="key_paste" key="v" primary="true"
command="cmd_paste"/>
<handler type="keypress" id="key_undo" key="z" primary="true"
<handler event="keypress" id="key_undo" key="z" primary="true"
command="cmd_undo"/>
</handlers>

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

@ -7,52 +7,52 @@
<binding id="inputFields" extends="chrome://global/content/htmlBindings.xml#inputFieldsBase">
<handlers>
<handler type="keypress" id="key_redo" key="z" primary="true" shift="true" alt="false" control="false"
<handler event="keypress" id="key_redo" key="z" primary="true" shift="true" alt="false" control="false"
command="cmd_redo"/>
<handler type="keypress" id="key_up" keycode="VK_UP" alt="false" shift="false" control="false"
<handler event="keypress" id="key_up" keycode="VK_UP" alt="false" shift="false" control="false"
command="cmd_linePrevious"/>
<handler type="keypress" id="key_down" keycode="VK_DOWN" alt="false" shift="false" control="false"
<handler event="keypress" id="key_down" keycode="VK_DOWN" alt="false" shift="false" control="false"
command="cmd_lineNext"/>
<handler type="keypress" id="key_up_shift" keycode="VK_UP" alt="false" shift="true" control="false"
<handler event="keypress" id="key_up_shift" keycode="VK_UP" alt="false" shift="true" control="false"
command="cmd_selectBeginLine"/>
<handler type="keypress" id="key_down_shift" keycode="VK_DOWN" alt="false" shift="true" control="false"
<handler event="keypress" id="key_down_shift" keycode="VK_DOWN" alt="false" shift="true" control="false"
command="cmd_selectEndLine"/>
<handler type="keypress" id="key_up_meta" keycode="VK_UP" meta="true" alt="false" shift="false" control="false"
<handler event="keypress" id="key_up_meta" keycode="VK_UP" meta="true" alt="false" shift="false" control="false"
command="cmd_scrollPageUp"/>
<handler type="keypress" id="key_down_meta" keycode="VK_DOWN" meta="true" alt="false" shift="false" control="false"
<handler event="keypress" id="key_down_meta" keycode="VK_DOWN" meta="true" alt="false" shift="false" control="false"
command="cmd_scrollPageDown"/>
<handler type="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false" meta="false"
<handler event="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false" meta="false"
command="cmd_beginLine"/>
<handler type="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false" meta="false"
<handler event="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false" meta="false"
command="cmd_endLine"/>
<handler type="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false" meta="false"
<handler event="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false" meta="false"
command="cmd_selectBeginLine"/>
<handler type="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false" meta="false"
<handler event="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false" meta="false"
command="cmd_selectEndLine"/>
<handler type="keypress" id="key_leftalt" keycode="VK_LEFT" alt="true" shift="false" control="false"
<handler event="keypress" id="key_leftalt" keycode="VK_LEFT" alt="true" shift="false" control="false"
command="cmd_wordPrevious"/>
<handler type="keypress" id="key_rightalt" keycode="VK_RIGHT" alt="true" shift="false" control="false"
<handler event="keypress" id="key_rightalt" keycode="VK_RIGHT" alt="true" shift="false" control="false"
command="cmd_wordNext"/>
<handler type="keypress" id="key_leftshiftalt" keycode="VK_LEFT" alt="true" shift="true" control="false"
<handler event="keypress" id="key_leftshiftalt" keycode="VK_LEFT" alt="true" shift="true" control="false"
command="cmd_selectWordPrevious"/>
<handler type="keypress" id="key_rightshiftalt" keycode="VK_RIGHT" alt="true" shift="true" control="false"
<handler event="keypress" id="key_rightshiftalt" keycode="VK_RIGHT" alt="true" shift="true" control="false"
command="cmd_selectWordNext"/>
<handler type="keypress" id="key_leftmeta" keycode="VK_LEFT" meta="true" alt="false" shift="false" control="false"
<handler event="keypress" id="key_leftmeta" keycode="VK_LEFT" meta="true" alt="false" shift="false" control="false"
command="cmd_linePrevious"/>
<handler type="keypress" id="key_rightmeta" keycode="VK_RIGHT" meta="true" alt="false" shift="false" control="false"
<handler event="keypress" id="key_rightmeta" keycode="VK_RIGHT" meta="true" alt="false" shift="false" control="false"
command="cmd_lineNext"/>
<handler type="keypress" id="key_leftshiftmeta" keycode="VK_LEFT" meta="true" alt="false" shift="true" control="false"
<handler event="keypress" id="key_leftshiftmeta" keycode="VK_LEFT" meta="true" alt="false" shift="true" control="false"
command="cmd_selectBeginLine"/>
<handler type="keypress" id="key_rightshiftmeta" keycode="VK_RIGHT" meta="true" alt="false" shift="true" control="false"
<handler event="keypress" id="key_rightshiftmeta" keycode="VK_RIGHT" meta="true" alt="false" shift="true" control="false"
command="cmd_selectEndLine"/>
<!-- Emacsish single-line motion and delete keys -->
<handler type="keypress" id="key_delback" key="h" control="true"
<handler event="keypress" id="key_delback" key="h" control="true"
command="cmd_deleteCharBackward"/>
<handler type="keypress" id="key_delforw" key="d" control="true"
<handler event="keypress" id="key_delforw" key="d" control="true"
command="cmd_deleteCharForward"/>
</handlers>
@ -61,45 +61,45 @@
<binding id="textAreas" extends="chrome://global/content/htmlBindings.xml#textAreasBase">
<handlers>
<handler type="keypress" id="key_redo" key="z" primary="true" shift="true" alt="false" control="false"
<handler event="keypress" id="key_redo" key="z" primary="true" shift="true" alt="false" control="false"
command="cmd_redo"/>
<handler type="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
<handler event="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
command="cmd_scrollPageUp"/>
<handler type="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
<handler event="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
command="cmd_scrollPageDown"/>
<handler type="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
<handler event="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
command="cmd_selectBeginLine"/>
<handler type="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
<handler event="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
command="cmd_selectEndLine"/>
<handler type="keypress" id="key_up_meta" keycode="VK_UP" meta="true" alt="false" shift="false" control="false"
<handler event="keypress" id="key_up_meta" keycode="VK_UP" meta="true" alt="false" shift="false" control="false"
command="cmd_scrollPageUp"/>
<handler type="keypress" id="key_down_meta" keycode="VK_DOWN" meta="true" alt="false" shift="false" control="false"
<handler event="keypress" id="key_down_meta" keycode="VK_DOWN" meta="true" alt="false" shift="false" control="false"
command="cmd_scrollPageDown"/>
<handler type="keypress" id="key_leftalt" keycode="VK_LEFT" alt="true" shift="false" control="false"
<handler event="keypress" id="key_leftalt" keycode="VK_LEFT" alt="true" shift="false" control="false"
command="cmd_wordPrevious"/>
<handler type="keypress" id="key_rightalt" keycode="VK_RIGHT" alt="true" shift="false" control="false"
<handler event="keypress" id="key_rightalt" keycode="VK_RIGHT" alt="true" shift="false" control="false"
command="cmd_wordNext"/>
<handler type="keypress" id="key_leftshiftalt" keycode="VK_LEFT" alt="true" shift="true" control="false"
<handler event="keypress" id="key_leftshiftalt" keycode="VK_LEFT" alt="true" shift="true" control="false"
command="cmd_selectWordPrevious"/>
<handler type="keypress" id="key_rightshiftalt" keycode="VK_RIGHT" alt="true" shift="true" control="false"
<handler event="keypress" id="key_rightshiftalt" keycode="VK_RIGHT" alt="true" shift="true" control="false"
command="cmd_selectWordNext"/>
<handler type="keypress" id="key_leftmeta" keycode="VK_LEFT" meta="true" alt="false" shift="false" control="false"
<handler event="keypress" id="key_leftmeta" keycode="VK_LEFT" meta="true" alt="false" shift="false" control="false"
command="cmd_linePrevious"/>
<handler type="keypress" id="key_rightmeta" keycode="VK_RIGHT" meta="true" alt="false" shift="false" control="false"
<handler event="keypress" id="key_rightmeta" keycode="VK_RIGHT" meta="true" alt="false" shift="false" control="false"
command="cmd_lineNext"/>
<handler type="keypress" id="key_leftshiftmeta" keycode="VK_LEFT" meta="true" alt="false" shift="true" control="false"
<handler event="keypress" id="key_leftshiftmeta" keycode="VK_LEFT" meta="true" alt="false" shift="true" control="false"
command="cmd_selectBeginLine"/>
<handler type="keypress" id="key_rightshiftmeta" keycode="VK_RIGHT" meta="true" alt="false" shift="true" control="false"
<handler event="keypress" id="key_rightshiftmeta" keycode="VK_RIGHT" meta="true" alt="false" shift="true" control="false"
command="cmd_selectEndLine"/>
<!-- Emacsish single-line motion and delete keys -->
<handler type="keypress" id="key_delback" key="h" control="true"
<handler event="keypress" id="key_delback" key="h" control="true"
command="cmd_deleteCharBackward"/>
<handler type="keypress" id="key_delforw" key="d" control="true"
<handler event="keypress" id="key_delforw" key="d" control="true"
command="cmd_deleteCharForward"/>
</handlers>

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

@ -16,12 +16,12 @@
<xul:image class="menu-dropmarker"/>
</content>
<handlers>
<handler type="command" capturer="true" value="if (event.target.localName == 'menuitem') { this.selectedItem = event.target; this.data = this.selectedItem.data; }"/>
<handler event="command" phase="capturing" action="if (event.target.localName == 'menuitem') { this.selectedItem = event.target; this.data = this.selectedItem.data; }"/>
</handlers>
<interface>
<implementation>
<property name="data" onset="this.setAttribute('data',val); return val;"
onget="return this.getAttribute('data');"/>
</interface>
</implementation>
</binding>
<!--
@ -31,11 +31,11 @@
<binding id="menulist-editable">
<content excludes="template,observes,menupopup">
<xul:image class="menu-icon" inherits="src"/>
<html:input type="text" flex="1" class="menu-text" allowevents="true" inherits="value,disabled"/>
<html:input event="text" flex="1" class="menu-text" allowevents="true" inherits="value,disabled"/>
<xul:image class="menu-dropmarker"/>
</content>
<handlers>
<handler type="command" capturer="true" value="if (event.target.localName == 'menuitem') { this.selectedItem = event.target; this.data = this.selectedItem.data; }"/>
<handler event="command" phase="capturing" action="if (event.target.localName == 'menuitem') { this.selectedItem = event.target; this.data = this.selectedItem.data; }"/>
</handlers>
</binding>
@ -137,7 +137,7 @@
<xul:image class="menubutton-dropmarker" inherits="disabled"/>
</xul:box>
</content>
<interface>
<implementation>
<property name="buttonover">
<getter>
return this.getAttribute("buttonover");
@ -172,7 +172,7 @@
</property>
<property name="_pendingActive">false</property>
<property name="_buttonIsDown">false</property>
</interface>
</implementation>
</binding>
<!--

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

@ -8,59 +8,59 @@
<handlers>
<!-- Emacsish single-line motion and delete keys -->
<handler type="keypress" id="key_home" key="a" control="true"
<handler event="keypress" id="key_home" key="a" control="true"
command="cmd_beginLine"/>
<handler type="keypress" id="key_end" key="e" control="true"
<handler event="keypress" id="key_end" key="e" control="true"
command="cmd_endLine"/>
<handler type="keypress" id="key_left" key="b" control="true"
<handler event="keypress" id="key_left" key="b" control="true"
command="cmd_charPrevious"/>
<handler type="keypress" id="key_right" key="f" control="true"
<handler event="keypress" id="key_right" key="f" control="true"
command="cmd_charNext"/>
<handler type="keypress" id="key_delback" key="h" control="true"
<handler event="keypress" id="key_delback" key="h" control="true"
command="cmd_deleteCharBackward"/>
<handler type="keypress" id="key_delforw" key="d" control="true"
<handler event="keypress" id="key_delforw" key="d" control="true"
command="cmd_deleteCharForward"/>
<handler type="keypress" id="key_delwback" key="w" control="true"
<handler event="keypress" id="key_delwback" key="w" control="true"
command="cmd_deleteWordBackward"/>
<handler type="keypress" id="key_del_bol" key="u" control="true"
<handler event="keypress" id="key_del_bol" key="u" control="true"
command="cmd_deleteToBeginningOfLine"/>
<handler type="keypress" id="key_del_eol" key="k" control="true"
<handler event="keypress" id="key_del_eol" key="k" control="true"
command="cmd_deleteToEndOfLine"/>
<!-- Windows copy/paste/undo/redo keys -->
<handler type="keypress" id="key_wincopy" key="c" control="true"
<handler event="keypress" id="key_wincopy" key="c" control="true"
command="cmd_copy"/>
<handler type="keypress" id="key_wincut" key="x" control="true"
<handler event="keypress" id="key_wincut" key="x" control="true"
command="cmd_cut"/>
<handler type="keypress" id="key_winundo" key="z" control="true"
<handler event="keypress" id="key_winundo" key="z" control="true"
command="cmd_undo"/>
<handler type="keypress" id="key_winredo" key="r" control="true"
<handler event="keypress" id="key_winredo" key="r" control="true"
command="cmd_redo"/>
<handler type="keypress" id="key_altwincut" keycode="VK_DELETE" shift="true" control="false" alt="false"
<handler event="keypress" id="key_altwincut" keycode="VK_DELETE" shift="true" control="false" alt="false"
command="cmd_cut"/>
<handler type="keypress" id="key_altwincopy" keycode="VK_INSERT" control="true" shift="false" alt="false"
<handler event="keypress" id="key_altwincopy" keycode="VK_INSERT" control="true" shift="false" alt="false"
command="cmd_copy"/>
<handler type="keypress" id="key_altwinpaste" keycode="VK_INSERT" shift="true" control="false" alt="false"
<handler event="keypress" id="key_altwinpaste" keycode="VK_INSERT" shift="true" control="false" alt="false"
command="cmd_paste"/>
<!-- navigating by word keys -->
<handler type="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
<handler event="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
command="cmd_beginLine"/>
<handler type="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
<handler event="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
command="cmd_endLine"/>
<handler type="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
<handler event="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
command="cmd_selectBeginLine"/>
<handler type="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
<handler event="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
command="cmd_selectEndLine"/>
<handler type="keypress" id="key_leftcontrol" keycode="VK_LEFT" control="true" alt="false" shift="false"
<handler event="keypress" id="key_leftcontrol" keycode="VK_LEFT" control="true" alt="false" shift="false"
command="cmd_wordPrevious"/>
<handler type="keypress" id="key_rightcontrol" keycode="VK_RIGHT" control="true" alt="false" shift="false"
<handler event="keypress" id="key_rightcontrol" keycode="VK_RIGHT" control="true" alt="false" shift="false"
command="cmd_wordNext"/>
<handler type="keypress" id="key_leftshiftcontrol" keycode="VK_LEFT" shift="true" control="true" alt="false"
<handler event="keypress" id="key_leftshiftcontrol" keycode="VK_LEFT" shift="true" control="true" alt="false"
command="cmd_selectWordPrevious"/>
<handler type="keypress" id="key_rightshiftcontrol" keycode="VK_RIGHT" shift="true" control="true" alt="false"
<handler event="keypress" id="key_rightshiftcontrol" keycode="VK_RIGHT" shift="true" control="true" alt="false"
command="cmd_selectWordNext"/>
<handler type="keypress" id="key_redo" key="y" primary="true"
<handler event="keypress" id="key_redo" key="y" primary="true"
command="cmd_redo"/>
</handlers>
</binding>
@ -69,65 +69,65 @@
<handlers>
<!-- Emacsish single-line motion and delete keys -->
<handler type="keypress" id="key_home" key="a" control="true"
<handler event="keypress" id="key_home" key="a" control="true"
command="cmd_beginLine"/>
<handler type="keypress" id="key_end" key="e" control="true"
<handler event="keypress" id="key_end" key="e" control="true"
command="cmd_endLine"/>
<handler type="keypress" id="key_left" key="b" control="true"
<handler event="keypress" id="key_left" key="b" control="true"
command="cmd_charPrevious"/>
<handler type="keypress" id="key_right" key="f" control="true"
<handler event="keypress" id="key_right" key="f" control="true"
command="cmd_charNext"/>
<handler type="keypress" id="key_delback" key="h" control="true"
<handler event="keypress" id="key_delback" key="h" control="true"
command="cmd_deleteCharBackward"/>
<handler type="keypress" id="key_delforw" key="d" control="true"
<handler event="keypress" id="key_delforw" key="d" control="true"
command="cmd_deleteCharForward"/>
<handler type="keypress" id="key_delwback" key="w" control="true"
<handler event="keypress" id="key_delwback" key="w" control="true"
command="cmd_deleteWordBackward"/>
<handler type="keypress" id="key_del_bol" key="u" control="true"
<handler event="keypress" id="key_del_bol" key="u" control="true"
command="cmd_deleteToBeginningOfLine"/>
<handler type="keypress" id="key_del_eol" key="k" control="true"
<handler event="keypress" id="key_del_eol" key="k" control="true"
command="cmd_deleteToEndOfLine"/>
<!-- Windows copy/paste/undo/redo keys -->
<handler type="keypress" id="key_wincopy" key="c" control="true"
<handler event="keypress" id="key_wincopy" key="c" control="true"
command="cmd_copy"/>
<handler type="keypress" id="key_wincut" key="x" control="true"
<handler event="keypress" id="key_wincut" key="x" control="true"
command="cmd_cut"/>
<handler type="keypress" id="key_winundo" key="z" control="true"
<handler event="keypress" id="key_winundo" key="z" control="true"
command="cmd_undo"/>
<handler type="keypress" id="key_winredo" key="r" control="true"
<handler event="keypress" id="key_winredo" key="r" control="true"
command="cmd_redo"/>
<handler type="keypress" id="key_altwincut" keycode="VK_DELETE" shift="true" control="false" alt="false"
<handler event="keypress" id="key_altwincut" keycode="VK_DELETE" shift="true" control="false" alt="false"
command="cmd_cut"/>
<handler type="keypress" id="key_altwincopy" keycode="VK_INSERT" control="true" shift="false" alt="false"
<handler event="keypress" id="key_altwincopy" keycode="VK_INSERT" control="true" shift="false" alt="false"
command="cmd_copy"/>
<handler type="keypress" id="key_altwinpaste" keycode="VK_INSERT" shift="true" control="false" alt="false"
<handler event="keypress" id="key_altwinpaste" keycode="VK_INSERT" shift="true" control="false" alt="false"
command="cmd_paste"/>
<!-- Emacsish multi-line motion and delete keys -->
<handler type="keypress" id="key_linedown" key="n" control="true"
<handler event="keypress" id="key_linedown" key="n" control="true"
command="cmd_lineNext"/>
<handler type="keypress" id="key_lineup" key="p" control="true"
<handler event="keypress" id="key_lineup" key="p" control="true"
command="cmd_linePrevious"/>
<!-- handle home/end/arrow keys and redo -->
<handler type="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
<handler event="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
command="cmd_beginLine"/>
<handler type="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
<handler event="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
command="cmd_endLine"/>
<handler type="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
<handler event="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
command="cmd_selectBeginLine"/>
<handler type="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
<handler event="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
command="cmd_selectEndLine"/>
<handler type="keypress" id="key_leftcontrol" keycode="VK_LEFT" control="true" alt="false" shift="false"
<handler event="keypress" id="key_leftcontrol" keycode="VK_LEFT" control="true" alt="false" shift="false"
command="cmd_wordPrevious"/>
<handler type="keypress" id="key_rightcontrol" keycode="VK_RIGHT" control="true" alt="false" shift="false"
<handler event="keypress" id="key_rightcontrol" keycode="VK_RIGHT" control="true" alt="false" shift="false"
command="cmd_wordNext"/>
<handler type="keypress" id="key_leftshiftcontrol" keycode="VK_LEFT" shift="true" control="true" alt="false"
<handler event="keypress" id="key_leftshiftcontrol" keycode="VK_LEFT" shift="true" control="true" alt="false"
command="cmd_selectWordPrevious"/>
<handler type="keypress" id="key_rightshiftcontrol" keycode="VK_RIGHT" shift="true" control="true" alt="false"
<handler event="keypress" id="key_rightshiftcontrol" keycode="VK_RIGHT" shift="true" control="true" alt="false"
command="cmd_selectWordNext"/>
<handler type="keypress" id="key_redo" key="y" primary="true"
<handler event="keypress" id="key_redo" key="y" primary="true"
command="cmd_redo"/>
</handlers>
</binding>

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

@ -6,17 +6,17 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="radio" extends="chrome://global/content/xulBindings.xml#checkbox">
<interface>
<implementation>
<property name="data" onset="this.setAttribute('data',val); return val;"
onget="return this.getAttribute('data');"/>
<property name="group" onset="this.setAttribute('group',val); return val;"
onget="return this.getAttribute('group');"/>
</interface>
</implementation>
</binding>
<binding id="radiogroup" extends="xul:box">
<interface>
<implementation>
<property name="data" onset="this.setAttribute('data',val); return val;"
onget="return this.getAttribute('data');"/>
<property name="selectedItem">
@ -52,9 +52,9 @@
]]>
</setter>
</property>
</interface>
</implementation>
<handlers>
<handler type="click">
<handler event="click">
<![CDATA[
try
{
@ -68,7 +68,7 @@
}
]]>
</handler>
<handler type="keypress" key=" ">
<handler event="keypress" key=" ">
<![CDATA[
try
{

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

@ -6,8 +6,8 @@
<binding id="tabcontrol" extends="xul:box">
<content orient="vertical" excludes="*"/>
<!-- pass-through interface -->
<interface>
<!-- pass-through implementation -->
<implementation>
<property name="selectedTab">
<setter>
<![CDATA[
@ -25,11 +25,11 @@
]]>
</getter>
</property>
</interface>
</implementation>
</binding>
<binding id="tabbox" extends="xul:box">
<interface>
<implementation>
<property name="selectedTab">
<getter>
<![CDATA[
@ -65,9 +65,9 @@
]]>
</setter>
</property>
</interface>
</implementation>
<handlers>
<handler name="bindingattached">
<handler event="bindingattached">
<![CDATA[
// first and last tabs need to be able to have unique styles
// and also need to select first tab on startup.
@ -87,12 +87,12 @@
</binding>
<binding id="tabpanel" extends="xul:deck">
<interface>
<implementation>
<!-- should be defined on deck! -->
<property name="index"
onget="return this.getAttribute('index');"
onset="this.setAttribute('index',val); return val;"/>
</interface>
</implementation>
</binding>
<binding id="tab" extends="xul:button">
@ -102,7 +102,7 @@
<xul:text class="tab-text" inherits="value,accesskey,crop"/>
</xul:box>
</content>
<interface>
<implementation>
<property name="value">
<getter>
return this.getAttribute("value");
@ -129,9 +129,9 @@
return val;
</setter>
</property>
</interface>
</implementation>
<handlers>
<handler type="click">
<handler event="click">
<![CDATA[
var tabbox = this.parentNode;
while (tabbox.localName != "tabcontrol") {

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

@ -33,7 +33,7 @@ Contributor(s):
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="toolbargrippy" extends="xul:button">
<interface>
<implementation>
<property name="collapsed">
<getter>
return this.getAttribute("moz_grippy_collapsed");
@ -69,7 +69,7 @@ Contributor(s):
]]>
</body>
</method>
</interface>
</implementation>
</binding>
<binding id="toolbox" extends="xul:box">
@ -82,7 +82,7 @@ Contributor(s):
<xul:spring flex="1" class="collapsed-tray-spring"/>
</xul:box>
</content>
<interface>
<implementation>
<method name="collapseToolbar">
<argument name="toolbar"/>
<body>
@ -186,9 +186,9 @@ Contributor(s):
return val;
</setter>
</property>
</interface>
</implementation>
<handlers>
<handler type="bindingattached">
<handler event="bindingattached">
this.init(event);
</handler>
</handlers>
@ -203,7 +203,7 @@ Contributor(s):
<children/>
</xul:box>
</content>
<interface>
<implementation>
<method name="findNodeByAttribute">
<argument name="aAttribute"/>
<argument name="aValue"/>
@ -221,7 +221,7 @@ Contributor(s):
]]>
</body>
</method>
</interface>
</implementation>
</binding>
<binding id="menubar" extends="xul:menubar">
@ -233,7 +233,7 @@ Contributor(s):
<children/>
</xul:box>
</content>
<interface>
<implementation>
<method name="findNodeByAttribute">
<argument name="aAttribute"/>
<argument name="aValue"/>
@ -251,7 +251,7 @@ Contributor(s):
]]>
</body>
</method>
</interface>
</implementation>
</binding>
</bindings>

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

@ -6,7 +6,7 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="treeitem">
<interface>
<implementation>
<method name="toggleOpenState">
<body>
<![CDATA[
@ -41,7 +41,7 @@
]]>
</body>
</method>
</interface>
</implementation>
</binding>
<binding id="treecell-indented-folder">
@ -106,7 +106,7 @@
<children includes="treehead,treechildren"/>
</xul:treerows>
</content>
<interface>
<implementation>
<property name="selectedIndex"
onget="return (this.selectedItems.length > 0 ? this.getIndexOfItem(this.selectedItems[0]) : -1)"
onset="if(val>=0){var item=this.getItemAtIndex(val); if(item) this.selectItem(item);} else this.clearItemSelection();"
@ -173,23 +173,23 @@
return this.treeBoxObject.getRowCount();
</body>
</method>
</interface>
</implementation>
<handlers>
<handler type="keypress" keycode="vk_enter">
<handler event="keypress" keycode="vk_enter">
<![CDATA[
if (event.target != this || selectedItems.length != 1)
return;
this.selectedItems[0].toggleOpenState();
]]>
</handler>
<handler type="keypress" keycode="vk_return">
<handler event="keypress" keycode="vk_return">
<![CDATA[
if (event.target != this || selectedItems.length != 1)
return;
this.selectedItems[0].toggleOpenState();
]]>
</handler>
<handler type="keypress" keycode="vk_left">
<handler event="keypress" keycode="vk_left">
<![CDATA[
if (event.target != this || this.selectedItems.length != 1)
return;
@ -203,14 +203,14 @@
}
]]>
</handler>
<handler type="keypress" keycode="vk_right">
<handler event="keypress" keycode="vk_right">
<![CDATA[
if (event.target != this || this.selectedItems.length != 1)
return;
this.selectedItems[0].open();
]]>
</handler>
<handler type="keypress" keycode="vk_up">
<handler event="keypress" keycode="vk_up">
<![CDATA[
if (event.target != this || this.selectedItems.length != 1)
return;
@ -221,7 +221,7 @@
}
]]>
</handler>
<handler type="keypress" keycode="vk_down">
<handler event="keypress" keycode="vk_down">
<![CDATA[
if (event.target != this || this.selectedItems.length != 1)
return;
@ -232,7 +232,7 @@
}
]]>
</handler>
<handler type="keypress" keycode="vk_page_up">
<handler event="keypress" keycode="vk_page_up">
<![CDATA[
if (event.target != this || this.selectedItems.length != 1)
return;
@ -257,7 +257,7 @@
}
]]>
</handler>
<handler type="keypress" keycode="vk_page_down">
<handler event="keypress" keycode="vk_page_down">
<![CDATA[
if (event.target != this || this.selectedItems.length != 1)
return;
@ -283,7 +283,7 @@
}
]]>
</handler>
<handler type="keypress" keycode="vk_home">
<handler event="keypress" keycode="vk_home">
<![CDATA[
if (event.target != this || this.selectedItems.length != 1)
return;
@ -291,7 +291,7 @@
this.selectItem(this.getItemAtIndex(0));
]]>
</handler>
<handler type="keypress" keycode="vk_end">
<handler event="keypress" keycode="vk_end">
<![CDATA[
if (event.target != this || this.selectedItems.length != 1)
return;
@ -308,7 +308,7 @@
<handlers>
<!-- If there is no modifier key, we select on mousedown, not
click, so that drags work correctly. -->
<handler type="mousedown" shift="false" control="false"
<handler event="mousedown" shift="false" control="false"
meta="false" alt="false">
<![CDATA[
if (event.target.localName == 'treecell') {
@ -323,7 +323,7 @@
<!-- On a click (up+down on the same item), deselect everything
except this item. -->
<handler type="click" shift="false" control="false" meta="false"
<handler event="click" shift="false" control="false" meta="false"
alt="false">
<![CDATA[
if (event.target.localName == 'treecell') {
@ -340,7 +340,7 @@
</handler>
<!-- For discontinuous selection of items -->
<handler type="click" shift="false" control="true" alt="false">
<handler event="click" shift="false" control="true" alt="false">
<![CDATA[
if (event.target.localName == 'treecell') {
parentNode.toggleItemSelection(event.target.parentNode.parentNode);
@ -350,7 +350,7 @@
</handler>
<!-- Same as above, but this one is for the Mac Command key -->
<handler type="click" shift="false" meta="true">
<handler event="click" shift="false" meta="true">
<![CDATA[
if (event.target.localName == 'treecell') {
parentNode.toggleItemSelection(event.target.parentNode.parentNode);
@ -360,7 +360,7 @@
</handler>
<!-- For continuous selection of items -->
<handler type="click" shift="true" control="false" meta="false">
<handler event="click" shift="true" control="false" meta="false">
<![CDATA[
if (event.target.localName == 'treecell') {
parentNode.selectItemRange(null, event.target.parentNode.parentNode);
@ -370,7 +370,7 @@
</handler>
<!-- double-click -->
<handler type="click" shift="false" control="false" meta="false" clickcount="2">
<handler event="click" shift="false" control="false" meta="false" clickcount="2">
<![CDATA[
if (event.target.localName == 'treecell') {
var n = event.target.parentNode.parentNode;
@ -380,7 +380,7 @@
</handler>
<!-- normal, single click -->
<handler type="click" shift="false" control="false" meta="false">
<handler event="click" shift="false" control="false" meta="false">
<![CDATA[
if (event.target.getAttribute('twisty') == 'true') {
var n = event.target.parentNode.parentNode.parentNode;

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

@ -8,59 +8,59 @@
<handlers>
<!-- Emacsish single-line motion and delete keys -->
<handler type="keypress" id="key_home" key="a" control="true"
<handler event="keypress" id="key_home" key="a" control="true"
command="cmd_beginLine"/>
<handler type="keypress" id="key_end" key="e" control="true"
<handler event="keypress" id="key_end" key="e" control="true"
command="cmd_endLine"/>
<handler type="keypress" id="key_left" key="b" control="true"
<handler event="keypress" id="key_left" key="b" control="true"
command="cmd_charPrevious"/>
<handler type="keypress" id="key_right" key="f" control="true"
<handler event="keypress" id="key_right" key="f" control="true"
command="cmd_charNext"/>
<handler type="keypress" id="key_delback" key="h" control="true"
<handler event="keypress" id="key_delback" key="h" control="true"
command="cmd_deleteCharBackward"/>
<handler type="keypress" id="key_delforw" key="d" control="true"
<handler event="keypress" id="key_delforw" key="d" control="true"
command="cmd_deleteCharForward"/>
<handler type="keypress" id="key_delwback" key="w" control="true"
<handler event="keypress" id="key_delwback" key="w" control="true"
command="cmd_deleteWordBackward"/>
<handler type="keypress" id="key_del_bol" key="u" control="true"
<handler event="keypress" id="key_del_bol" key="u" control="true"
command="cmd_deleteToBeginningOfLine"/>
<handler type="keypress" id="key_del_eol" key="k" control="true"
<handler event="keypress" id="key_del_eol" key="k" control="true"
command="cmd_deleteToEndOfLine"/>
<!-- Windows copy/paste/undo/redo keys -->
<handler type="keypress" id="key_wincopy" key="c" control="true"
<handler event="keypress" id="key_wincopy" key="c" control="true"
command="cmd_copy"/>
<handler type="keypress" id="key_wincut" key="x" control="true"
<handler event="keypress" id="key_wincut" key="x" control="true"
command="cmd_cut"/>
<handler type="keypress" id="key_winundo" key="z" control="true"
<handler event="keypress" id="key_winundo" key="z" control="true"
command="cmd_undo"/>
<handler type="keypress" id="key_winredo" key="r" control="true"
<handler event="keypress" id="key_winredo" key="r" control="true"
command="cmd_redo"/>
<handler type="keypress" id="key_altwincut" keycode="VK_DELETE" shift="true" control="false" alt="false"
<handler event="keypress" id="key_altwincut" keycode="VK_DELETE" shift="true" control="false" alt="false"
command="cmd_cut"/>
<handler type="keypress" id="key_altwincopy" keycode="VK_INSERT" control="true" shift="false" alt="false"
<handler event="keypress" id="key_altwincopy" keycode="VK_INSERT" control="true" shift="false" alt="false"
command="cmd_copy"/>
<handler type="keypress" id="key_altwinpaste" keycode="VK_INSERT" shift="true" control="false" alt="false"
<handler event="keypress" id="key_altwinpaste" keycode="VK_INSERT" shift="true" control="false" alt="false"
command="cmd_paste"/>
<!-- navigating by word keys -->
<handler type="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
<handler event="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
command="cmd_beginLine"/>
<handler type="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
<handler event="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
command="cmd_endLine"/>
<handler type="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
<handler event="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
command="cmd_selectBeginLine"/>
<handler type="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
<handler event="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
command="cmd_selectEndLine"/>
<handler type="keypress" id="key_leftcontrol" keycode="VK_LEFT" control="true" alt="false" shift="false"
<handler event="keypress" id="key_leftcontrol" keycode="VK_LEFT" control="true" alt="false" shift="false"
command="cmd_wordPrevious"/>
<handler type="keypress" id="key_rightcontrol" keycode="VK_RIGHT" control="true" alt="false" shift="false"
<handler event="keypress" id="key_rightcontrol" keycode="VK_RIGHT" control="true" alt="false" shift="false"
command="cmd_wordNext"/>
<handler type="keypress" id="key_leftshiftcontrol" keycode="VK_LEFT" shift="true" control="true" alt="false"
<handler event="keypress" id="key_leftshiftcontrol" keycode="VK_LEFT" shift="true" control="true" alt="false"
command="cmd_selectWordPrevious"/>
<handler type="keypress" id="key_rightshiftcontrol" keycode="VK_RIGHT" shift="true" control="true" alt="false"
<handler event="keypress" id="key_rightshiftcontrol" keycode="VK_RIGHT" shift="true" control="true" alt="false"
command="cmd_selectWordNext"/>
<handler type="keypress" id="key_redo" key="y" primary="true"
<handler event="keypress" id="key_redo" key="y" primary="true"
command="cmd_redo"/>
</handlers>
</binding>
@ -69,65 +69,65 @@
<handlers>
<!-- Emacsish single-line motion and delete keys -->
<handler type="keypress" id="key_home" key="a" control="true"
<handler event="keypress" id="key_home" key="a" control="true"
command="cmd_beginLine"/>
<handler type="keypress" id="key_end" key="e" control="true"
<handler event="keypress" id="key_end" key="e" control="true"
command="cmd_endLine"/>
<handler type="keypress" id="key_left" key="b" control="true"
<handler event="keypress" id="key_left" key="b" control="true"
command="cmd_charPrevious"/>
<handler type="keypress" id="key_right" key="f" control="true"
<handler event="keypress" id="key_right" key="f" control="true"
command="cmd_charNext"/>
<handler type="keypress" id="key_delback" key="h" control="true"
<handler event="keypress" id="key_delback" key="h" control="true"
command="cmd_deleteCharBackward"/>
<handler type="keypress" id="key_delforw" key="d" control="true"
<handler event="keypress" id="key_delforw" key="d" control="true"
command="cmd_deleteCharForward"/>
<handler type="keypress" id="key_delwback" key="w" control="true"
<handler event="keypress" id="key_delwback" key="w" control="true"
command="cmd_deleteWordBackward"/>
<handler type="keypress" id="key_del_bol" key="u" control="true"
<handler event="keypress" id="key_del_bol" key="u" control="true"
command="cmd_deleteToBeginningOfLine"/>
<handler type="keypress" id="key_del_eol" key="k" control="true"
<handler event="keypress" id="key_del_eol" key="k" control="true"
command="cmd_deleteToEndOfLine"/>
<!-- Windows copy/paste/undo/redo keys -->
<handler type="keypress" id="key_wincopy" key="c" control="true"
<handler event="keypress" id="key_wincopy" key="c" control="true"
command="cmd_copy"/>
<handler type="keypress" id="key_wincut" key="x" control="true"
<handler event="keypress" id="key_wincut" key="x" control="true"
command="cmd_cut"/>
<handler type="keypress" id="key_winundo" key="z" control="true"
<handler event="keypress" id="key_winundo" key="z" control="true"
command="cmd_undo"/>
<handler type="keypress" id="key_winredo" key="r" control="true"
<handler event="keypress" id="key_winredo" key="r" control="true"
command="cmd_redo"/>
<handler type="keypress" id="key_altwincut" keycode="VK_DELETE" shift="true" control="false" alt="false"
<handler event="keypress" id="key_altwincut" keycode="VK_DELETE" shift="true" control="false" alt="false"
command="cmd_cut"/>
<handler type="keypress" id="key_altwincopy" keycode="VK_INSERT" control="true" shift="false" alt="false"
<handler event="keypress" id="key_altwincopy" keycode="VK_INSERT" control="true" shift="false" alt="false"
command="cmd_copy"/>
<handler type="keypress" id="key_altwinpaste" keycode="VK_INSERT" shift="true" control="false" alt="false"
<handler event="keypress" id="key_altwinpaste" keycode="VK_INSERT" shift="true" control="false" alt="false"
command="cmd_paste"/>
<!-- Emacsish multi-line motion and delete keys -->
<handler type="keypress" id="key_linedown" key="n" control="true"
<handler event="keypress" id="key_linedown" key="n" control="true"
command="cmd_lineNext"/>
<handler type="keypress" id="key_lineup" key="p" control="true"
<handler event="keypress" id="key_lineup" key="p" control="true"
command="cmd_linePrevious"/>
<!-- handle home/end/arrow keys and redo -->
<handler type="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
<handler event="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
command="cmd_beginLine"/>
<handler type="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
<handler event="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
command="cmd_endLine"/>
<handler type="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
<handler event="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
command="cmd_selectBeginLine"/>
<handler type="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
<handler event="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
command="cmd_selectEndLine"/>
<handler type="keypress" id="key_leftcontrol" keycode="VK_LEFT" control="true" alt="false" shift="false"
<handler event="keypress" id="key_leftcontrol" keycode="VK_LEFT" control="true" alt="false" shift="false"
command="cmd_wordPrevious"/>
<handler type="keypress" id="key_rightcontrol" keycode="VK_RIGHT" control="true" alt="false" shift="false"
<handler event="keypress" id="key_rightcontrol" keycode="VK_RIGHT" control="true" alt="false" shift="false"
command="cmd_wordNext"/>
<handler type="keypress" id="key_leftshiftcontrol" keycode="VK_LEFT" shift="true" control="true" alt="false"
<handler event="keypress" id="key_leftshiftcontrol" keycode="VK_LEFT" shift="true" control="true" alt="false"
command="cmd_selectWordPrevious"/>
<handler type="keypress" id="key_rightshiftcontrol" keycode="VK_RIGHT" shift="true" control="true" alt="false"
<handler event="keypress" id="key_rightshiftcontrol" keycode="VK_RIGHT" shift="true" control="true" alt="false"
command="cmd_selectWordNext"/>
<handler type="keypress" id="key_redo" key="y" primary="true"
<handler event="keypress" id="key_redo" key="y" primary="true"
command="cmd_redo"/>
</handlers>
</binding>

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

@ -6,69 +6,69 @@
<binding id="inputFields" extends="chrome://global/content/htmlBindings.xml#inputFieldsBase">
<handlers>
<handler type="keypress" id="key_up" keycode="VK_UP" alt="false" shift="false" control="false"
<handler event="keypress" id="key_up" keycode="VK_UP" alt="false" shift="false" control="false"
command="cmd_charPrevious"/>
<handler type="keypress" id="key_down" keycode="VK_DOWN" alt="false" shift="false" control="false"
<handler event="keypress" id="key_down" keycode="VK_DOWN" alt="false" shift="false" control="false"
command="cmd_charNext"/>
<handler type="keypress" id="key_leftshift" keycode="VK_UP" shift="true" alt="false" control="false"
<handler event="keypress" id="key_leftshift" keycode="VK_UP" shift="true" alt="false" control="false"
command="cmd_selectCharPrevious"/>
<handler type="keypress" id="key_rightshift" keycode="VK_DOWN" shift="true" alt="false" control="false"
<handler event="keypress" id="key_rightshift" keycode="VK_DOWN" shift="true" alt="false" control="false"
command="cmd_selectCharNext"/>
<handler type="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
<handler event="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
command="cmd_beginLine"/>
<handler type="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
<handler event="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
command="cmd_endLine"/>
<handler type="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
<handler event="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
command="cmd_selectBeginLine"/>
<handler type="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
<handler event="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
command="cmd_selectEndLine"/>
<handler type="keypress" id="key_leftcontrol" keycode="VK_LEFT" control="true" alt="false" shift="false"
<handler event="keypress" id="key_leftcontrol" keycode="VK_LEFT" control="true" alt="false" shift="false"
command="cmd_wordPrevious"/>
<handler type="keypress" id="key_rightcontrol" keycode="VK_RIGHT" control="true" alt="false" shift="false"
<handler event="keypress" id="key_rightcontrol" keycode="VK_RIGHT" control="true" alt="false" shift="false"
command="cmd_wordNext"/>
<handler type="keypress" id="key_leftshiftcontrol" keycode="VK_LEFT" shift="true" control="true" alt="false"
<handler event="keypress" id="key_leftshiftcontrol" keycode="VK_LEFT" shift="true" control="true" alt="false"
command="cmd_selectWordPrevious"/>
<handler type="keypress" id="key_rightshiftcontrol" keycode="VK_RIGHT" shift="true" control="true" alt="false"
<handler event="keypress" id="key_rightshiftcontrol" keycode="VK_RIGHT" shift="true" control="true" alt="false"
command="cmd_selectWordNext"/>
<handler type="keypress" id="key_redo" key="y" primary="true"
<handler event="keypress" id="key_redo" key="y" primary="true"
command="cmd_redo"/>
<handler type="keypress" id="key_altwincut" keycode="VK_DELETE" shift="true" control="false" alt="false"
<handler event="keypress" id="key_altwincut" keycode="VK_DELETE" shift="true" control="false" alt="false"
command="cmd_cut"/>
<handler type="keypress" id="key_altwincopy" keycode="VK_INSERT" control="true" shift="false" alt="false"
<handler event="keypress" id="key_altwincopy" keycode="VK_INSERT" control="true" shift="false" alt="false"
command="cmd_copy"/>
<handler type="keypress" id="key_altwinpaste" keycode="VK_INSERT" shift="true" control="false" alt="false"
<handler event="keypress" id="key_altwinpaste" keycode="VK_INSERT" shift="true" control="false" alt="false"
command="cmd_paste"/>
</handlers>
</binding>
<binding id="textAreas" extends="chrome://global/content/htmlBindings.xml#textAreasBase">
<handlers>
<handler type="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
<handler event="keypress" id="key_home" keycode="VK_HOME" alt="false" shift="false" control="false"
command="cmd_beginLine"/>
<handler type="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
<handler event="keypress" id="key_end" keycode="VK_END" alt="false" shift="false" control="false"
command="cmd_endLine"/>
<handler type="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
<handler event="keypress" id="key_homeshift" keycode="VK_HOME" shift="true" alt="false" control="false"
command="cmd_selectBeginLine"/>
<handler type="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
<handler event="keypress" id="key_endshift" keycode="VK_END" shift="true" alt="false" control="false"
command="cmd_selectEndLine"/>
<handler type="keypress" id="key_leftcontrol" keycode="VK_LEFT" control="true" alt="false" shift="false"
<handler event="keypress" id="key_leftcontrol" keycode="VK_LEFT" control="true" alt="false" shift="false"
command="cmd_wordPrevious"/>
<handler type="keypress" id="key_rightcontrol" keycode="VK_RIGHT" control="true" alt="false" shift="false"
<handler event="keypress" id="key_rightcontrol" keycode="VK_RIGHT" control="true" alt="false" shift="false"
command="cmd_wordNext"/>
<handler type="keypress" id="key_leftshiftcontrol" keycode="VK_LEFT" shift="true" control="true" alt="false"
<handler event="keypress" id="key_leftshiftcontrol" keycode="VK_LEFT" shift="true" control="true" alt="false"
command="cmd_selectWordPrevious"/>
<handler type="keypress" id="key_rightshiftcontrol" keycode="VK_RIGHT" shift="true" control="true" alt="false"
<handler event="keypress" id="key_rightshiftcontrol" keycode="VK_RIGHT" shift="true" control="true" alt="false"
command="cmd_selectWordNext"/>
<handler type="keypress" id="key_redo" key="y" primary="true"
<handler event="keypress" id="key_redo" key="y" primary="true"
command="cmd_redo"/>
<handler type="keypress" id="key_altwincut" keycode="VK_DELETE" shift="true" control="false" alt="false"
<handler event="keypress" id="key_altwincut" keycode="VK_DELETE" shift="true" control="false" alt="false"
command="cmd_cut"/>
<handler type="keypress" id="key_altwincopy" keycode="VK_INSERT" control="true" shift="false" alt="false"
<handler event="keypress" id="key_altwincopy" keycode="VK_INSERT" control="true" shift="false" alt="false"
command="cmd_copy"/>
<handler type="keypress" id="key_altwinpaste" keycode="VK_INSERT" shift="true" control="false" alt="false"
<handler event="keypress" id="key_altwinpaste" keycode="VK_INSERT" shift="true" control="false" alt="false"
command="cmd_paste"/>
</handlers>
</binding>

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

@ -62,10 +62,10 @@
<xul:image/>
</xul:box>
</content>
<interface>
<implementation>
<property name="data" onset="this.setAttribute('data',val); return val;"
onget="return this.getAttribute('data');"/>
</interface>
</implementation>
</binding>
<binding id="menuitem">
@ -73,10 +73,10 @@
<xul:text class="menu-text" flex="1" align="left" inherits="value,accesskey,crop" crop="right"/>
<xul:text class="menu-accel" inherits="acceltext:value"/>
</content>
<interface>
<implementation>
<property name="data" onset="this.setAttribute('data',val); return val;"
onget="return this.getAttribute('data');"/>
</interface>
</implementation>
</binding>
<binding id="menuitem-iconic">
@ -87,10 +87,10 @@
<xul:text class="menu-iconic-text" flex="1" align="left" inherits="value,accesskey,crop" crop="right"/>
<xul:text class="menu-iconic-accel" inherits="acceltext:value"/>
</content>
<interface>
<implementation>
<property name="data" onset="this.setAttribute('data',val); return val;"
onget="return this.getAttribute('data');"/>
</interface>
</implementation>
</binding>
<binding id="menu-iconic">
@ -104,15 +104,15 @@
<xul:image/>
</xul:box>
</content>
<interface>
<implementation>
<property name="data" onset="this.setAttribute('data',val); return val;"
onget="return this.getAttribute('data');"/>
</interface>
</implementation>
</binding>
<binding id="basetext">
<interface>
<!-- public interface -->
<implementation>
<!-- public implementation -->
<property name="value" onset="return this.setAttribute('value',val);"
onget="return this.getAttribute('value');"/>
<property name="crop" onset="return this.setAttribute('crop',val);"
@ -128,7 +128,7 @@
onget="return this.getAttribute('accesskey');"/>
<property name="imgalign" onset="return this.setAttribute('imgalign',val);"
onget="return this.getAttribute('imgalign');"/>
</interface>
</implementation>
</binding>
<binding id="checkbox" extends="chrome://global/content/xulBindings.xml#basetext">
@ -143,21 +143,21 @@
</xul:html>
</xul:box>
</content>
<interface>
<!-- public interface -->
<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;"/>
</interface>
</implementation>
<handlers>
<handler type="click">
<handler event="click">
<![CDATA[
if (!this.disabled) this.checked = !this.checked;
]]>
</handler>
<handler type="keypress" key=" " value="if (!this.disabled) this.checked = !this.checked;"/>
<handler event="keypress" key=" " action="if (!this.disabled) this.checked = !this.checked;"/>
</handlers>
</binding>
@ -225,14 +225,14 @@
</xul:stack>
</xul:box>
</content>
<interface>
<implementation>
<property name="progresstext" onset="this.setAttribute('progresstext',val); return val;"
onget="return this.getAttribute('progresstext');"/>
<property name="value" onset="this.setAttribute('value',val); return val;"
onget="return this.getAttribute('value');"/>
<property name="mode" onset="this.setAttribute('mode', val); return val;"
onget="return this.getAttribute('mode');"/>
</interface>
</implementation>
</binding>
<binding id="textfield" extends="xul:box">
@ -241,7 +241,7 @@
<html:input class="textfield-input" flex="1" inherits="value,type,maxlength,disabled,size,readonly"/>
</xul:box>
</content>
<interface>
<implementation>
<property name="value" onset="document.getAnonymousNodes(this)[0].firstChild.value = val; return val;"
onget="return document.getAnonymousNodes(this)[0].firstChild.value;"/>
<property name="type" onset="document.getAnonymousNodes(this)[0].firstChild.type = val; return val;"
@ -287,10 +287,10 @@
document.getAnonymousNodes(this)[0].firstChild.setSelectionRange( aSelectionStart, aSelectionEnd );
</body>
</method>
</interface>
</implementation>
<handlers>
<handler type="focus" capturer="true" value="this.setAttribute('focused','true');"/>
<handler type="blur" capturer="true" value="this.removeAttribute('focused');"/>
<handler event="focus" phase="capturing" action="this.setAttribute('focused','true');"/>
<handler event="blur" phase="capturing" action="this.removeAttribute('focused');"/>
</handlers>
</binding>
@ -304,7 +304,7 @@
<binding id="text">
<handlers>
<handler type="click" value="var forElementID = this.getAttribute('for'); if(forElementID) var forElement = document.getElementById(forElementID); if(forElement) forElement.focus();"/>
<handler event="click" action="var forElementID = this.getAttribute('for'); if(forElementID) var forElement = document.getElementById(forElementID); if(forElement) forElement.focus();"/>
</handlers>
</binding>
@ -317,7 +317,7 @@
</xul:box>
</content>
<handlers>
<handler type="blur" value="this.setAttribute('mode','display');"/>
<handler event="blur" action="this.setAttribute('mode','display');"/>
</handlers>
</binding>
@ -342,7 +342,7 @@
</xul:arrowscrollbox>
</content>
<interface>
<implementation>
<method name="openPopup">
<argument name="element"/>
<argument name="xpos"/>
@ -403,20 +403,15 @@
]]>
</setter>
</property>
</interface>
</implementation>
</binding>
<binding id="colorpicker" extends="xul:box">
<interface>
<implementation>
<property name="color" onset="return this.setAttribute('color', val);"
onget="return this.getAttribute('color');"/>
<property name="selectedItem"/>
</interface>
<handlers>
<handler type="click" value="dump('handler fired\n');"/>
</handlers>
</implementation>
<content>
<xul:box flex="1" orient="vertical" onclick="parentNode.color = event.target.getAttribute('color');
@ -521,38 +516,38 @@
<xul:image class="statusbar-panel-icon" inherits="src"/>
<xul:text class="statusbar-panel-text" inherits="value,crop" crop="right" flex="1"/>
</content>
<interface>
<implementation>
<property name="value"
onget="return this.getAttribute('value');"
onset="this.setAttribute('value',val); return val;"/>
<property name="src"
onget="return this.getAttribute('src');"
onset="this.setAttribute('src',val); return val;"/>
</interface>
</implementation>
</binding>
<binding id="browser">
<interface>
<implementation>
<property name="webBrowser"
readonly="true"
onget="return this.boxObject.QueryInterface(Components.interfaces.nsIBrowserBoxObject).webBrowser"/>
</interface>
</implementation>
</binding>
<binding id="editor">
<interface>
<implementation>
<property name="editorShell"
readonly="true"
onget="return this.boxObject.QueryInterface(Components.interfaces.nsIEditorBoxObject).editorShell"/>
</interface>
</implementation>
</binding>
<binding id="iframe">
<interface>
<implementation>
<property name="docShell"
readonly="true"
onget="return this.boxObject.QueryInterface(Components.interfaces.nsIIFrameBoxObject).docShell"/>
</interface>
</implementation>
</binding>
<binding id="titledbox">