From 29127934217e9e4b68100ff79d981baf207d22f6 Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Fri, 1 Sep 2000 01:38:04 +0000 Subject: [PATCH] XBL syntax changes. r,a=brendan --- content/xbl/src/nsXBLBinding.cpp | 34 +++-- content/xbl/src/nsXBLBinding.h | 7 +- content/xbl/src/nsXBLEventHandler.cpp | 14 +- content/xbl/src/nsXBLEventHandler.h | 2 +- layout/xbl/src/nsXBLBinding.cpp | 34 +++-- layout/xbl/src/nsXBLBinding.h | 7 +- layout/xbl/src/nsXBLEventHandler.cpp | 14 +- layout/xbl/src/nsXBLEventHandler.h | 2 +- layout/xul/base/src/nsBoxFrame.cpp | 11 ++ layout/xul/base/src/nsBoxLayoutState.cpp | 2 +- .../base/resources/content/mailWidgets.xml | 136 ++++++++++++++++-- .../resources/content/autocomplete.xml | 16 +-- .../resources/content/dialogBindings.xml | 4 +- .../global/resources/content/htmlBindings.xml | 60 ++++---- .../content/mac/platformHTMLBindings.xml | 76 +++++----- .../resources/content/menulistBindings.xml | 14 +- .../content/os2/platformHTMLBindings.xml | 104 +++++++------- .../resources/content/radioBindings.xml | 12 +- xpfe/global/resources/content/tabBindings.xml | 22 +-- .../resources/content/toolbarBindings.xml | 18 +-- .../global/resources/content/treeBindings.xml | 42 +++--- .../content/unix/platformHTMLBindings.xml | 104 +++++++------- .../content/win/platformHTMLBindings.xml | 56 ++++---- xpfe/global/resources/content/xulBindings.xml | 77 +++++----- 24 files changed, 500 insertions(+), 368 deletions(-) diff --git a/content/xbl/src/nsXBLBinding.cpp b/content/xbl/src/nsXBLBinding.cpp index 0b2928237ba..aa2b793fbec 100644 --- a/content/xbl/src/nsXBLBinding.cpp +++ b/content/xbl/src/nsXBLBinding.cpp @@ -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 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 interfaceElement; - GetImmediateChild(kInterfaceAtom, getter_AddRefs(interfaceElement)); + GetImmediateChild(kImplementationAtom, getter_AddRefs(interfaceElement)); if (interfaceElement) { nsCOMPtr global; diff --git a/content/xbl/src/nsXBLBinding.h b/content/xbl/src/nsXBLBinding.h index 513946cc2bd..ddec933e0bf 100644 --- a/content/xbl/src/nsXBLBinding.h +++ b/content/xbl/src/nsXBLBinding.h @@ -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; diff --git a/content/xbl/src/nsXBLEventHandler.cpp b/content/xbl/src/nsXBLEventHandler.cpp index 1a5b96d56ef..429d5ea514d 100644 --- a/content/xbl/src/nsXBLEventHandler.cpp +++ b/content/xbl/src/nsXBLEventHandler.cpp @@ -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); diff --git a/content/xbl/src/nsXBLEventHandler.h b/content/xbl/src/nsXBLEventHandler.h index 58f0e6ccf0f..2eda5fffd0a 100644 --- a/content/xbl/src/nsXBLEventHandler.h +++ b/content/xbl/src/nsXBLEventHandler.h @@ -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; diff --git a/layout/xbl/src/nsXBLBinding.cpp b/layout/xbl/src/nsXBLBinding.cpp index 0b2928237ba..aa2b793fbec 100644 --- a/layout/xbl/src/nsXBLBinding.cpp +++ b/layout/xbl/src/nsXBLBinding.cpp @@ -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 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 interfaceElement; - GetImmediateChild(kInterfaceAtom, getter_AddRefs(interfaceElement)); + GetImmediateChild(kImplementationAtom, getter_AddRefs(interfaceElement)); if (interfaceElement) { nsCOMPtr global; diff --git a/layout/xbl/src/nsXBLBinding.h b/layout/xbl/src/nsXBLBinding.h index 513946cc2bd..ddec933e0bf 100644 --- a/layout/xbl/src/nsXBLBinding.h +++ b/layout/xbl/src/nsXBLBinding.h @@ -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; diff --git a/layout/xbl/src/nsXBLEventHandler.cpp b/layout/xbl/src/nsXBLEventHandler.cpp index 1a5b96d56ef..429d5ea514d 100644 --- a/layout/xbl/src/nsXBLEventHandler.cpp +++ b/layout/xbl/src/nsXBLEventHandler.cpp @@ -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); diff --git a/layout/xbl/src/nsXBLEventHandler.h b/layout/xbl/src/nsXBLEventHandler.h index 58f0e6ccf0f..2eda5fffd0a 100644 --- a/layout/xbl/src/nsXBLEventHandler.h +++ b/layout/xbl/src/nsXBLEventHandler.h @@ -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; diff --git a/layout/xul/base/src/nsBoxFrame.cpp b/layout/xul/base/src/nsBoxFrame.cpp index f999e9d876a..235cc532c78 100644 --- a/layout/xul/base/src/nsBoxFrame.cpp +++ b/layout/xul/base/src/nsBoxFrame.cpp @@ -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 bindingManager; document->GetBindingManager(getter_AddRefs(bindingManager)); if (!bindingManager) @@ -1863,6 +1866,14 @@ nsBoxFrame::GetInsertionPoint(nsIPresShell* aShell, nsIFrame* aParent, nsIFrame* if (aChild) { nsCOMPtr currContent; aChild->GetContent(getter_AddRefs(currContent)); + + // Check to see if the content is anonymous. + nsCOMPtr 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); diff --git a/layout/xul/base/src/nsBoxLayoutState.cpp b/layout/xul/base/src/nsBoxLayoutState.cpp index b2c67eee6a1..c67cf12d56a 100644 --- a/layout/xul/base/src/nsBoxLayoutState.cpp +++ b/layout/xul/base/src/nsBoxLayoutState.cpp @@ -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 diff --git a/mailnews/base/resources/content/mailWidgets.xml b/mailnews/base/resources/content/mailWidgets.xml index ad3e1076ec0..3e5aa8aaaad 100644 --- a/mailnews/base/resources/content/mailWidgets.xml +++ b/mailnews/base/resources/content/mailWidgets.xml @@ -15,7 +15,7 @@ - + - + @@ -57,7 +57,7 @@ - + - + - + - + - + - + @@ -361,6 +361,122 @@ ]]> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0) + booleanNodes[i].setAttribute("value", staticString); + } catch (ex) { /* no error, means string not found */} + } + ]]> + + + + + + + + + + + + + + + diff --git a/xpfe/components/autocomplete/resources/content/autocomplete.xml b/xpfe/components/autocomplete/resources/content/autocomplete.xml index 75be5029eb9..219c144c174 100644 --- a/xpfe/components/autocomplete/resources/content/autocomplete.xml +++ b/xpfe/components/autocomplete/resources/content/autocomplete.xml @@ -18,7 +18,7 @@ - + - - - - - + + + + + - + - + diff --git a/xpfe/global/resources/content/htmlBindings.xml b/xpfe/global/resources/content/htmlBindings.xml index 67441a13195..28d3006aaa4 100644 --- a/xpfe/global/resources/content/htmlBindings.xml +++ b/xpfe/global/resources/content/htmlBindings.xml @@ -7,38 +7,38 @@ - - - - - - - - - - - - - - - @@ -47,37 +47,37 @@ - - - - - - - - - - - - - - - diff --git a/xpfe/global/resources/content/mac/platformHTMLBindings.xml b/xpfe/global/resources/content/mac/platformHTMLBindings.xml index 932242098f5..7a53e54f94c 100644 --- a/xpfe/global/resources/content/mac/platformHTMLBindings.xml +++ b/xpfe/global/resources/content/mac/platformHTMLBindings.xml @@ -7,52 +7,52 @@ - - - - - - - - - - - - - - - - - - - - - @@ -61,45 +61,45 @@ - - - - - - - - - - - - - - - - - diff --git a/xpfe/global/resources/content/menulistBindings.xml b/xpfe/global/resources/content/menulistBindings.xml index b5695e921f4..e90ef349d61 100644 --- a/xpfe/global/resources/content/menulistBindings.xml +++ b/xpfe/global/resources/content/menulistBindings.xml @@ -16,12 +16,12 @@ - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - @@ -69,65 +69,65 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xpfe/global/resources/content/radioBindings.xml b/xpfe/global/resources/content/radioBindings.xml index 2d19bbb86af..be680967055 100644 --- a/xpfe/global/resources/content/radioBindings.xml +++ b/xpfe/global/resources/content/radioBindings.xml @@ -6,17 +6,17 @@ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - + - + - + @@ -52,9 +52,9 @@ ]]> - + - + - + - - + + - + - + - + - + - + - + @@ -102,7 +102,7 @@ - + return this.getAttribute("value"); @@ -129,9 +129,9 @@ return val; - + - + - + return this.getAttribute("moz_grippy_collapsed"); @@ -69,7 +69,7 @@ Contributor(s): ]]> - + @@ -82,7 +82,7 @@ Contributor(s): - + @@ -186,9 +186,9 @@ Contributor(s): return val; - + - + this.init(event); @@ -203,7 +203,7 @@ Contributor(s): - + @@ -221,7 +221,7 @@ Contributor(s): ]]> - + @@ -233,7 +233,7 @@ Contributor(s): - + @@ -251,7 +251,7 @@ Contributor(s): ]]> - + \ No newline at end of file diff --git a/xpfe/global/resources/content/treeBindings.xml b/xpfe/global/resources/content/treeBindings.xml index e585198f733..dd40ba12dee 100644 --- a/xpfe/global/resources/content/treeBindings.xml +++ b/xpfe/global/resources/content/treeBindings.xml @@ -6,7 +6,7 @@ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - + - + @@ -106,7 +106,7 @@ - + - + - + - + - + - + - + - + - + - + - + - + - - - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - @@ -69,65 +69,65 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xpfe/global/resources/content/win/platformHTMLBindings.xml b/xpfe/global/resources/content/win/platformHTMLBindings.xml index d8bb3b4bec0..c37ec7f313f 100644 --- a/xpfe/global/resources/content/win/platformHTMLBindings.xml +++ b/xpfe/global/resources/content/win/platformHTMLBindings.xml @@ -6,69 +6,69 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xpfe/global/resources/content/xulBindings.xml b/xpfe/global/resources/content/xulBindings.xml index b5127446c7e..f3563110013 100644 --- a/xpfe/global/resources/content/xulBindings.xml +++ b/xpfe/global/resources/content/xulBindings.xml @@ -62,10 +62,10 @@ - + - + @@ -73,10 +73,10 @@ - + - + @@ -87,10 +87,10 @@ - + - + @@ -104,15 +104,15 @@ - + - + - - + + - + @@ -143,21 +143,21 @@ - - + + - + - + - + @@ -225,14 +225,14 @@ - + - + @@ -241,7 +241,7 @@ - + - + - - + + @@ -304,7 +304,7 @@ - + @@ -317,7 +317,7 @@ - + @@ -342,7 +342,7 @@ - + @@ -403,20 +403,15 @@ ]]> - + - + - - - - - - + - + - + - + - + - + - + - + - +