diff --git a/mozilla/content/base/src/nsDocument.cpp b/mozilla/content/base/src/nsDocument.cpp index 2d802a55332..a4d8d4946ea 100644 --- a/mozilla/content/base/src/nsDocument.cpp +++ b/mozilla/content/base/src/nsDocument.cpp @@ -886,6 +886,9 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext, } //Capturing stage + /*if (mEventCapturer) { + mEventCapturer->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, aFlags, aEventStatus); + }*/ //Local handling stage if (nsnull != mListenerManager) { @@ -906,7 +909,11 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext, if (DOM_EVENT_INIT == aFlags) { // We're leaving the DOM event loop so if we created a DOM event, release here. if (nsnull != *aDOMEvent) { - if (0 != (*aDOMEvent)->Release()) { + nsrefcnt rc; + nsIDOMEvent* DOMEvent = *aDOMEvent; + // Release the copy since the macro will null the pointer + NS_RELEASE2(DOMEvent, rc); + if (0 != rc) { //Okay, so someone in the DOM loop (a listener, JS object) still has a ref to the DOM Event but //the internal data hasn't been malloc'd. Force a copy of the data here so the DOM Event is still valid. nsIPrivateDOMEvent *mPrivateEvent; @@ -943,22 +950,22 @@ nsresult nsDocument::RemoveEventListener(nsIDOMEventListener *aListener, const n return NS_ERROR_FAILURE; } -nsresult nsDocument::CaptureEvent(nsIDOMEventListener *aListener) +nsresult nsDocument::CaptureEvent(const nsString& aType) { nsIEventListenerManager *mManager; if (NS_OK == GetListenerManager(&mManager)) { - mManager->CaptureEvent(aListener); + //mManager->CaptureEvent(aListener); NS_RELEASE(mManager); return NS_OK; } return NS_ERROR_FAILURE; } -nsresult nsDocument::ReleaseEvent(nsIDOMEventListener *aListener) +nsresult nsDocument::ReleaseEvent(const nsString& aType) { if (nsnull != mListenerManager) { - mListenerManager->ReleaseEvent(aListener); + //mListenerManager->ReleaseEvent(aListener); return NS_OK; } return NS_ERROR_FAILURE; @@ -1460,6 +1467,7 @@ nsIContent* nsDocument::GetNextContent(const nsIContent *aContent) const nsIContent * old = result; old->ChildAt(0, result); NS_RELEASE(old); + result->ChildCount(n); } } else { result = GetNextContent(parent); diff --git a/mozilla/content/base/src/nsDocument.h b/mozilla/content/base/src/nsDocument.h index 93cd09823c8..78c31e72722 100644 --- a/mozilla/content/base/src/nsDocument.h +++ b/mozilla/content/base/src/nsDocument.h @@ -229,8 +229,10 @@ public: NS_IMETHOD Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn); // nsIDOMEventCapturer interface - NS_IMETHOD CaptureEvent(nsIDOMEventListener *aListener); - NS_IMETHOD ReleaseEvent(nsIDOMEventListener *aListener); + NS_IMETHOD CaptureEvent(const nsString& aType); + NS_IMETHOD ReleaseEvent(const nsString& aType); + + // nsIDOMEventReceiver interface NS_IMETHOD AddEventListener(nsIDOMEventListener *aListener, const nsIID& aIID); NS_IMETHOD RemoveEventListener(nsIDOMEventListener *aListener, const nsIID& aIID); NS_IMETHOD GetListenerManager(nsIEventListenerManager** aInstancePtrResult); diff --git a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp index fec252a2ddc..1be157ae0c4 100644 --- a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp +++ b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp @@ -1055,44 +1055,7 @@ nsGenericHTMLElement::SetDocument(nsIDocument* aDocument) { mDocument = aDocument; - // Once the element is added to the doc tree we need to check if - // event handler were registered on it. Unfortunately, this means - // doing a GetAttribute for every type of handler. if ((nsnull != mDocument) && (nsnull != mAttributes)) { - nsHTMLValue val; - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onclick, val)) - AddScriptEventListener(nsHTMLAtoms::onclick, val, kIDOMMouseListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::ondblclick, val)) - AddScriptEventListener(nsHTMLAtoms::onclick, val, kIDOMMouseListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onmousedown, val)) - AddScriptEventListener(nsHTMLAtoms::onmousedown, val, kIDOMMouseListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onmouseup, val)) - AddScriptEventListener(nsHTMLAtoms::onmouseup, val, kIDOMMouseListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onmouseover, val)) - AddScriptEventListener(nsHTMLAtoms::onmouseover, val, kIDOMMouseListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onmouseout, val)) - AddScriptEventListener(nsHTMLAtoms::onmouseout, val, kIDOMMouseListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onkeydown, val)) - AddScriptEventListener(nsHTMLAtoms::onkeydown, val, kIDOMKeyListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onkeyup, val)) - AddScriptEventListener(nsHTMLAtoms::onkeyup, val, kIDOMKeyListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onkeypress, val)) - AddScriptEventListener(nsHTMLAtoms::onkeypress, val, kIDOMKeyListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onmousemove, val)) - AddScriptEventListener(nsHTMLAtoms::onmousemove, val, kIDOMMouseMotionListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onload, val)) - AddScriptEventListener(nsHTMLAtoms::onload, val, kIDOMLoadListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onunload, val)) - AddScriptEventListener(nsHTMLAtoms::onunload, val, kIDOMLoadListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onabort, val)) - AddScriptEventListener(nsHTMLAtoms::onabort, val, kIDOMLoadListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onerror, val)) - AddScriptEventListener(nsHTMLAtoms::onerror, val, kIDOMLoadListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onfocus, val)) - AddScriptEventListener(nsHTMLAtoms::onfocus, val, kIDOMFocusListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onblur, val)) - AddScriptEventListener(nsHTMLAtoms::onblur, val, kIDOMFocusListenerIID); - nsIHTMLStyleSheet* sheet = GetAttrStyleSheet(mDocument); if (nsnull != sheet) { sheet->SetAttributesFor(mContent, mAttributes); // sync attributes with sheet @@ -1257,6 +1220,40 @@ nsGenericHTMLElement::SetAttribute(nsIAtom* aAttribute, NS_RELEASE(css); } else { + // Check for event handlers + if (nsHTMLAtoms::onclick == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onclick, aValue, kIDOMMouseListenerIID); + else if (nsHTMLAtoms::ondblclick == aAttribute) + AddScriptEventListener(nsHTMLAtoms::ondblclick, aValue, kIDOMMouseListenerIID); + else if (nsHTMLAtoms::onmousedown == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onmousedown, aValue, kIDOMMouseListenerIID); + else if (nsHTMLAtoms::onmouseup == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onmouseup, aValue, kIDOMMouseListenerIID); + else if (nsHTMLAtoms::onmouseover == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onmouseover, aValue, kIDOMMouseListenerIID); + else if (nsHTMLAtoms::onmouseout == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onmouseout, aValue, kIDOMMouseListenerIID); + else if (nsHTMLAtoms::onkeydown == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onkeydown, aValue, kIDOMKeyListenerIID); + else if (nsHTMLAtoms::onkeyup == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onkeyup, aValue, kIDOMKeyListenerIID); + else if (nsHTMLAtoms::onkeypress == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onkeypress, aValue, kIDOMKeyListenerIID); + else if (nsHTMLAtoms::onmousemove == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onmousemove, aValue, kIDOMMouseMotionListenerIID); + else if (nsHTMLAtoms::onload == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onload, aValue, kIDOMLoadListenerIID); + else if (nsHTMLAtoms::onunload == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onunload, aValue, kIDOMLoadListenerIID); + else if (nsHTMLAtoms::onabort == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onabort, aValue, kIDOMLoadListenerIID); + else if (nsHTMLAtoms::onerror == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onerror, aValue, kIDOMLoadListenerIID); + else if (nsHTMLAtoms::onfocus == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onfocus, aValue, kIDOMFocusListenerIID); + else if (nsHTMLAtoms::onblur == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onblur, aValue, kIDOMFocusListenerIID); + nsHTMLValue val; if (NS_CONTENT_ATTR_NOT_THERE != mContent->StringToAttribute(aAttribute, aValue, val)) { @@ -2174,7 +2171,7 @@ nsGenericHTMLElement::Release() nsresult nsGenericHTMLElement::AddScriptEventListener(nsIAtom* aAttribute, - nsHTMLValue& aValue, + const nsString& aValue, REFNSIID aIID) { nsresult ret = NS_OK; @@ -2193,9 +2190,7 @@ nsGenericHTMLElement::AddScriptEventListener(nsIAtom* aAttribute, if (NS_OK == receiver->GetListenerManager(&manager)) { nsIScriptObjectOwner *mObjectOwner; if (NS_OK == global->QueryInterface(kIScriptObjectOwnerIID, (void**)&mObjectOwner)) { - nsString value; - aValue.GetStringValue(value); - ret = manager->AddScriptEventListener(context, mObjectOwner, aAttribute, value, aIID); + ret = manager->AddScriptEventListener(context, mObjectOwner, aAttribute, aValue, aIID); NS_RELEASE(mObjectOwner); } NS_RELEASE(manager); @@ -2207,13 +2202,11 @@ nsGenericHTMLElement::AddScriptEventListener(nsIAtom* aAttribute, else { nsIEventListenerManager *manager; if (NS_OK == GetListenerManager(&manager)) { - nsString value; - aValue.GetStringValue(value); nsIScriptObjectOwner* owner; if (NS_OK == mContent->QueryInterface(kIScriptObjectOwnerIID, (void**) &owner)) { ret = manager->AddScriptEventListener(context, owner, - aAttribute, value, aIID); + aAttribute, aValue, aIID); NS_RELEASE(owner); } NS_RELEASE(manager); diff --git a/mozilla/content/html/content/src/nsGenericHTMLElement.h b/mozilla/content/html/content/src/nsGenericHTMLElement.h index 442533dd817..8d3c12c9cc3 100644 --- a/mozilla/content/html/content/src/nsGenericHTMLElement.h +++ b/mozilla/content/html/content/src/nsGenericHTMLElement.h @@ -179,7 +179,7 @@ public: nsresult RenderFrame(); nsresult AddScriptEventListener(nsIAtom* aAttribute, - nsHTMLValue& aValue, + const nsString& aValue, REFNSIID aIID); nsresult AttributeToString(nsIAtom* aAttribute, diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 748e4031176..b1e02558a6e 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -132,6 +132,8 @@ public: NS_IMETHOD MoveTo(PRInt32 aX, PRInt32 aY); NS_IMETHOD Show(); NS_IMETHOD Hide(); + NS_IMETHOD SetFocus(); + NS_IMETHOD RemoveFocus(); NS_IMETHOD Repaint(PRBool aForce); NS_IMETHOD SetContentViewer(nsIContentViewer* aViewer); NS_IMETHOD GetContentViewer(nsIContentViewer*& aResult); @@ -725,6 +727,34 @@ nsWebShell::Hide() return NS_OK; } +NS_IMETHODIMP +nsWebShell::SetFocus() +{ + NS_PRECONDITION(nsnull != mWindow, "null window"); + + if (nsnull != mWindow) { + mWindow->SetFocus(); + } + + return NS_OK; +} + +NS_IMETHODIMP +nsWebShell::RemoveFocus() +{ + NS_PRECONDITION(nsnull != mWindow, "null window"); + + if (nsnull != mWindow) { + nsIWidget *parentWidget = mWindow->GetParent(); + if (nsnull != parentWidget) { + parentWidget->SetFocus(); + NS_RELEASE(parentWidget); + } + } + + return NS_OK; +} + NS_IMETHODIMP nsWebShell::Repaint(PRBool aForce) { diff --git a/mozilla/dom/public/coreDom/nsIDOMNamedNodeMap.h b/mozilla/dom/public/coreDom/nsIDOMNamedNodeMap.h index 7e562738394..56a6850e127 100644 --- a/mozilla/dom/public/coreDom/nsIDOMNamedNodeMap.h +++ b/mozilla/dom/public/coreDom/nsIDOMNamedNodeMap.h @@ -27,7 +27,7 @@ class nsIDOMNode; #define NS_IDOMNAMEDNODEMAP_IID \ -{ 0x6f7652e9, 0xee43, 0x11d1, \ +{ 0x6f7652ea, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMNamedNodeMap : public nsISupports { diff --git a/mozilla/dom/public/coreDom/nsIDOMNode.h b/mozilla/dom/public/coreDom/nsIDOMNode.h index d74608e787b..1b9ec20afe6 100644 --- a/mozilla/dom/public/coreDom/nsIDOMNode.h +++ b/mozilla/dom/public/coreDom/nsIDOMNode.h @@ -29,7 +29,7 @@ class nsIDOMNode; class nsIDOMNodeList; #define NS_IDOMNODE_IID \ -{ 0x6f7652ea, 0xee43, 0x11d1, \ +{ 0x6f7652eb, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMNode : public nsISupports { diff --git a/mozilla/dom/public/coreDom/nsIDOMNodeList.h b/mozilla/dom/public/coreDom/nsIDOMNodeList.h index 6638a7615ad..cfefc527c3f 100644 --- a/mozilla/dom/public/coreDom/nsIDOMNodeList.h +++ b/mozilla/dom/public/coreDom/nsIDOMNodeList.h @@ -27,7 +27,7 @@ class nsIDOMNode; #define NS_IDOMNODELIST_IID \ -{ 0x6f7652eb, 0xee43, 0x11d1, \ +{ 0x6f7652ec, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMNodeList : public nsISupports { diff --git a/mozilla/dom/public/coreDom/nsIDOMProcessingInstruction.h b/mozilla/dom/public/coreDom/nsIDOMProcessingInstruction.h index 0fe115a8ecb..b4d1c6c3396 100644 --- a/mozilla/dom/public/coreDom/nsIDOMProcessingInstruction.h +++ b/mozilla/dom/public/coreDom/nsIDOMProcessingInstruction.h @@ -27,7 +27,7 @@ #define NS_IDOMPROCESSINGINSTRUCTION_IID \ -{ 0x6f7652ec, 0xee43, 0x11d1, \ +{ 0x6f7652ed, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMProcessingInstruction : public nsIDOMNode { diff --git a/mozilla/dom/public/coreDom/nsIDOMText.h b/mozilla/dom/public/coreDom/nsIDOMText.h index bb385f0c894..77216657628 100644 --- a/mozilla/dom/public/coreDom/nsIDOMText.h +++ b/mozilla/dom/public/coreDom/nsIDOMText.h @@ -28,7 +28,7 @@ class nsIDOMText; #define NS_IDOMTEXT_IID \ -{ 0x6f7652ed, 0xee43, 0x11d1, \ +{ 0x6f7652ee, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMText : public nsIDOMData { diff --git a/mozilla/dom/public/coreEvents/nsIDOMEvent.h b/mozilla/dom/public/coreEvents/nsIDOMEvent.h index af9049778ab..0e12d6f3006 100644 --- a/mozilla/dom/public/coreEvents/nsIDOMEvent.h +++ b/mozilla/dom/public/coreEvents/nsIDOMEvent.h @@ -27,7 +27,7 @@ class nsIDOMNode; #define NS_IDOMEVENT_IID \ -{ 0x6f76532c, 0xee43, 0x11d1, \ +{ 0x6f76532d, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMEvent : public nsISupports { diff --git a/mozilla/dom/public/coreEvents/nsIDOMEventCapturer.h b/mozilla/dom/public/coreEvents/nsIDOMEventCapturer.h index 24346865acf..a1d3f6c003f 100644 --- a/mozilla/dom/public/coreEvents/nsIDOMEventCapturer.h +++ b/mozilla/dom/public/coreEvents/nsIDOMEventCapturer.h @@ -15,35 +15,39 @@ * Copyright (C) 1998 Netscape Communications Corporation. All Rights * Reserved. */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ #ifndef nsIDOMEventCapturer_h__ #define nsIDOMEventCapturer_h__ +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" #include "nsIDOMEventReceiver.h" -class nsIDOMEventListener; -class nsIDOMMouseListener; -class nsIDOMMouseMotionListener; -class nsIDOMKeyListener; -class nsIDOMFocusListener; -class nsIDOMLoadListener; -class nsIDOMDragListener; -class nsIEventListenerManager; -/* - * DOM event source class. Object that allow event registration and distribution - * from themselves implement this interface. - */ + #define NS_IDOMEVENTCAPTURER_IID \ -{ /* a044aec0-df04-11d1-bd85-00805f8ae3f4 */ \ -0xa044aec0, 0xdf04, 0x11d1, \ -{0xbd, 0x85, 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0xf4} } +{ 0x6f76532f, 0xee43, 0x11d1, \ + { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMEventCapturer : public nsIDOMEventReceiver { - public: - NS_IMETHOD CaptureEvent(nsIDOMEventListener *aListener) = 0; - NS_IMETHOD ReleaseEvent(nsIDOMEventListener *aListener) = 0; + NS_IMETHOD CaptureEvent(const nsString& aType)=0; + NS_IMETHOD ReleaseEvent(const nsString& aType)=0; }; + + +#define NS_DECL_IDOMEVENTCAPTURER \ + NS_IMETHOD CaptureEvent(const nsString& aType); \ + NS_IMETHOD ReleaseEvent(const nsString& aType); \ + + + +#define NS_FORWARD_IDOMEVENTCAPTURER(_to) \ + NS_IMETHOD CaptureEvent(const nsString& aType) { return _to##CaptureEvent(aType); } \ + NS_IMETHOD ReleaseEvent(const nsString& aType) { return _to##ReleaseEvent(aType); } \ + + #endif // nsIDOMEventCapturer_h__ diff --git a/mozilla/dom/public/coreEvents/nsIDOMNSEvent.h b/mozilla/dom/public/coreEvents/nsIDOMNSEvent.h index 2142c9844fd..f4f239c8a18 100644 --- a/mozilla/dom/public/coreEvents/nsIDOMNSEvent.h +++ b/mozilla/dom/public/coreEvents/nsIDOMNSEvent.h @@ -26,7 +26,7 @@ #define NS_IDOMNSEVENT_IID \ -{ 0x6f76532d, 0xee43, 0x11d1, \ +{ 0x6f76532e, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMNSEvent : public nsISupports { diff --git a/mozilla/dom/public/html/nsIDOMHTMLAnchorElement.h b/mozilla/dom/public/html/nsIDOMHTMLAnchorElement.h index 441256a7a26..17a0c65cd80 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLAnchorElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLAnchorElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLANCHORELEMENT_IID \ -{ 0x6f7652ee, 0xee43, 0x11d1, \ +{ 0x6f7652ef, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLAnchorElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLAppletElement.h b/mozilla/dom/public/html/nsIDOMHTMLAppletElement.h index 248036a8624..9d837e5f114 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLAppletElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLAppletElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLAPPLETELEMENT_IID \ -{ 0x6f7652ef, 0xee43, 0x11d1, \ +{ 0x6f7652f0, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLAppletElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLAreaElement.h b/mozilla/dom/public/html/nsIDOMHTMLAreaElement.h index 050d009645f..573a96a335f 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLAreaElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLAreaElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLAREAELEMENT_IID \ -{ 0x6f7652f0, 0xee43, 0x11d1, \ +{ 0x6f7652f1, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLAreaElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLBRElement.h b/mozilla/dom/public/html/nsIDOMHTMLBRElement.h index 2348bd845ed..5bb48ccfcb3 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLBRElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLBRElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLBRELEMENT_IID \ -{ 0x6f7652f4, 0xee43, 0x11d1, \ +{ 0x6f7652f5, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLBRElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLBaseElement.h b/mozilla/dom/public/html/nsIDOMHTMLBaseElement.h index affb0ed8814..4786bda8039 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLBaseElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLBaseElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLBASEELEMENT_IID \ -{ 0x6f7652f1, 0xee43, 0x11d1, \ +{ 0x6f7652f2, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLBaseElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLBaseFontElement.h b/mozilla/dom/public/html/nsIDOMHTMLBaseFontElement.h index 83705693418..9d1f78c2777 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLBaseFontElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLBaseFontElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLBASEFONTELEMENT_IID \ -{ 0x6f7652f2, 0xee43, 0x11d1, \ +{ 0x6f7652f3, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLBaseFontElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLBodyElement.h b/mozilla/dom/public/html/nsIDOMHTMLBodyElement.h index 4db1e39043f..b85955cd8d7 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLBodyElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLBodyElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLBODYELEMENT_IID \ -{ 0x6f7652f3, 0xee43, 0x11d1, \ +{ 0x6f7652f4, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLBodyElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLButtonElement.h b/mozilla/dom/public/html/nsIDOMHTMLButtonElement.h index b5ad6c8c21d..12f22520297 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLButtonElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLButtonElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLBUTTONELEMENT_IID \ -{ 0x6f7652f5, 0xee43, 0x11d1, \ +{ 0x6f7652f6, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLButtonElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLCollection.h b/mozilla/dom/public/html/nsIDOMHTMLCollection.h index eadafce91cb..2ac31060fc5 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLCollection.h +++ b/mozilla/dom/public/html/nsIDOMHTMLCollection.h @@ -27,7 +27,7 @@ class nsIDOMNode; #define NS_IDOMHTMLCOLLECTION_IID \ -{ 0x6f7652f6, 0xee43, 0x11d1, \ +{ 0x6f7652f7, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLCollection : public nsISupports { diff --git a/mozilla/dom/public/html/nsIDOMHTMLDListElement.h b/mozilla/dom/public/html/nsIDOMHTMLDListElement.h index dccc245837a..85450289de7 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLDListElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLDListElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLDLISTELEMENT_IID \ -{ 0x6f7652fa, 0xee43, 0x11d1, \ +{ 0x6f7652fb, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLDListElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLDelElement.h b/mozilla/dom/public/html/nsIDOMHTMLDelElement.h index f6f4fc89829..dc06752da37 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLDelElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLDelElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLDELELEMENT_IID \ -{ 0x6f7652f7, 0xee43, 0x11d1, \ +{ 0x6f7652f8, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLDelElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLDirectoryElement.h b/mozilla/dom/public/html/nsIDOMHTMLDirectoryElement.h index 187056fbe42..bca0281b005 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLDirectoryElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLDirectoryElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLDIRECTORYELEMENT_IID \ -{ 0x6f7652f8, 0xee43, 0x11d1, \ +{ 0x6f7652f9, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLDirectoryElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLDivElement.h b/mozilla/dom/public/html/nsIDOMHTMLDivElement.h index ee9f3460720..a28200f302c 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLDivElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLDivElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLDIVELEMENT_IID \ -{ 0x6f7652f9, 0xee43, 0x11d1, \ +{ 0x6f7652fa, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLDivElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLDocument.h b/mozilla/dom/public/html/nsIDOMHTMLDocument.h index 8214cc84b0c..1ebfa7772be 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLDocument.h +++ b/mozilla/dom/public/html/nsIDOMHTMLDocument.h @@ -32,7 +32,7 @@ class nsIDOMHTMLCollection; class nsIDOMNodeList; #define NS_IDOMHTMLDOCUMENT_IID \ -{ 0x6f7652fb, 0xee43, 0x11d1, \ +{ 0x6f7652fc, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLDocument : public nsIDOMDocument { diff --git a/mozilla/dom/public/html/nsIDOMHTMLElement.h b/mozilla/dom/public/html/nsIDOMHTMLElement.h index e072be0650b..3f29cb36e4b 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLELEMENT_IID \ -{ 0x6f7652fc, 0xee43, 0x11d1, \ +{ 0x6f7652fd, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLElement : public nsIDOMElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLFontElement.h b/mozilla/dom/public/html/nsIDOMHTMLFontElement.h index f7c6fc80111..db96bb0a8d4 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLFontElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLFontElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLFONTELEMENT_IID \ -{ 0x6f7652fd, 0xee43, 0x11d1, \ +{ 0x6f7652fe, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLFontElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLFormElement.h b/mozilla/dom/public/html/nsIDOMHTMLFormElement.h index 805d4ced20f..596da56f5a0 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLFormElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLFormElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLCollection; #define NS_IDOMHTMLFORMELEMENT_IID \ -{ 0x6f7652fe, 0xee43, 0x11d1, \ +{ 0x6f7652ff, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLFormElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLFrameElement.h b/mozilla/dom/public/html/nsIDOMHTMLFrameElement.h index 70ac1421acc..ed413827a7a 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLFrameElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLFrameElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLFRAMEELEMENT_IID \ -{ 0x6f7652ff, 0xee43, 0x11d1, \ +{ 0x6f765300, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLFrameElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLFrameSetElement.h b/mozilla/dom/public/html/nsIDOMHTMLFrameSetElement.h index d520b8c139d..50d1b91e033 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLFrameSetElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLFrameSetElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLFRAMESETELEMENT_IID \ -{ 0x6f765300, 0xee43, 0x11d1, \ +{ 0x6f765301, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLFrameSetElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLHRElement.h b/mozilla/dom/public/html/nsIDOMHTMLHRElement.h index ffb7fcdd187..14125c29b13 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLHRElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLHRElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLHRELEMENT_IID \ -{ 0x6f765303, 0xee43, 0x11d1, \ +{ 0x6f765304, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLHRElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLHeadElement.h b/mozilla/dom/public/html/nsIDOMHTMLHeadElement.h index 41147ae940a..46f0e27b1c9 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLHeadElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLHeadElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLHEADELEMENT_IID \ -{ 0x6f765301, 0xee43, 0x11d1, \ +{ 0x6f765302, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLHeadElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLHeadingElement.h b/mozilla/dom/public/html/nsIDOMHTMLHeadingElement.h index ada196912db..fdc79d96732 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLHeadingElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLHeadingElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLHEADINGELEMENT_IID \ -{ 0x6f765302, 0xee43, 0x11d1, \ +{ 0x6f765303, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLHeadingElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLHtmlElement.h b/mozilla/dom/public/html/nsIDOMHTMLHtmlElement.h index a4d658aa4ba..c70ee3abbb5 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLHtmlElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLHtmlElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLHTMLELEMENT_IID \ -{ 0x6f765304, 0xee43, 0x11d1, \ +{ 0x6f765305, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLHtmlElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLIFrameElement.h b/mozilla/dom/public/html/nsIDOMHTMLIFrameElement.h index 62753dfaf71..436ae679474 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLIFrameElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLIFrameElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLIFRAMEELEMENT_IID \ -{ 0x6f765305, 0xee43, 0x11d1, \ +{ 0x6f765306, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLIFrameElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLImageElement.h b/mozilla/dom/public/html/nsIDOMHTMLImageElement.h index f9815b93fe8..7616bcfcb82 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLImageElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLImageElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLIMAGEELEMENT_IID \ -{ 0x6f765306, 0xee43, 0x11d1, \ +{ 0x6f765307, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLImageElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLInputElement.h b/mozilla/dom/public/html/nsIDOMHTMLInputElement.h index a0ff2293c55..8b2a5170988 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLInputElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLInputElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLINPUTELEMENT_IID \ -{ 0x6f765307, 0xee43, 0x11d1, \ +{ 0x6f765308, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLInputElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLInsElement.h b/mozilla/dom/public/html/nsIDOMHTMLInsElement.h index c73c511cc7b..05dd00ab319 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLInsElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLInsElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLINSELEMENT_IID \ -{ 0x6f765308, 0xee43, 0x11d1, \ +{ 0x6f765309, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLInsElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLIsIndexElement.h b/mozilla/dom/public/html/nsIDOMHTMLIsIndexElement.h index 3e1f117cc7b..41d8a1de00a 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLIsIndexElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLIsIndexElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLISINDEXELEMENT_IID \ -{ 0x6f765309, 0xee43, 0x11d1, \ +{ 0x6f76530a, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLIsIndexElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLLIElement.h b/mozilla/dom/public/html/nsIDOMHTMLLIElement.h index c557b7fe97e..808f6878c22 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLLIElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLLIElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLLIELEMENT_IID \ -{ 0x6f76530c, 0xee43, 0x11d1, \ +{ 0x6f76530d, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLLIElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLLabelElement.h b/mozilla/dom/public/html/nsIDOMHTMLLabelElement.h index 32e0457c84b..d5a4b5dccae 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLLabelElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLLabelElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLLABELELEMENT_IID \ -{ 0x6f76530a, 0xee43, 0x11d1, \ +{ 0x6f76530b, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLLabelElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLLegendElement.h b/mozilla/dom/public/html/nsIDOMHTMLLegendElement.h index 865d4e298a3..23f414cb09f 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLLegendElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLLegendElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLLEGENDELEMENT_IID \ -{ 0x6f76530b, 0xee43, 0x11d1, \ +{ 0x6f76530c, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLLegendElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLLinkElement.h b/mozilla/dom/public/html/nsIDOMHTMLLinkElement.h index 359cdca3728..1ba9815cb1e 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLLinkElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLLinkElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLLINKELEMENT_IID \ -{ 0x6f76530d, 0xee43, 0x11d1, \ +{ 0x6f76530e, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLLinkElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLMapElement.h b/mozilla/dom/public/html/nsIDOMHTMLMapElement.h index 62ccd3802c0..83baf8c0743 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLMapElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLMapElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLCollection; #define NS_IDOMHTMLMAPELEMENT_IID \ -{ 0x6f76530e, 0xee43, 0x11d1, \ +{ 0x6f76530f, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLMapElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLMenuElement.h b/mozilla/dom/public/html/nsIDOMHTMLMenuElement.h index 08228bd8e73..31bfc56453b 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLMenuElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLMenuElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLMENUELEMENT_IID \ -{ 0x6f76530f, 0xee43, 0x11d1, \ +{ 0x6f765310, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLMenuElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLMetaElement.h b/mozilla/dom/public/html/nsIDOMHTMLMetaElement.h index 62c1d7e1e00..c11e78eeb84 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLMetaElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLMetaElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLMETAELEMENT_IID \ -{ 0x6f765310, 0xee43, 0x11d1, \ +{ 0x6f765311, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLMetaElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLModElement.h b/mozilla/dom/public/html/nsIDOMHTMLModElement.h index 87eed47c2a3..974dd48050c 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLModElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLModElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLMODELEMENT_IID \ -{ 0x6f765311, 0xee43, 0x11d1, \ +{ 0x6f765312, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLModElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLOListElement.h b/mozilla/dom/public/html/nsIDOMHTMLOListElement.h index 41ec3480393..42199fc859c 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLOListElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLOListElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLOLISTELEMENT_IID \ -{ 0x6f765313, 0xee43, 0x11d1, \ +{ 0x6f765314, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLOListElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLObjectElement.h b/mozilla/dom/public/html/nsIDOMHTMLObjectElement.h index c4d839b236d..6a97bdec783 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLObjectElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLObjectElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLOBJECTELEMENT_IID \ -{ 0x6f765312, 0xee43, 0x11d1, \ +{ 0x6f765313, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLObjectElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLOptGroupElement.h b/mozilla/dom/public/html/nsIDOMHTMLOptGroupElement.h index 555eb993b2a..88412afd4cd 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLOptGroupElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLOptGroupElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLOPTGROUPELEMENT_IID \ -{ 0x6f765314, 0xee43, 0x11d1, \ +{ 0x6f765315, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLOptGroupElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLOptionElement.h b/mozilla/dom/public/html/nsIDOMHTMLOptionElement.h index 8a5bcace074..4184c1e5eda 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLOptionElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLOptionElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLOPTIONELEMENT_IID \ -{ 0x6f765315, 0xee43, 0x11d1, \ +{ 0x6f765316, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLOptionElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLParagraphElement.h b/mozilla/dom/public/html/nsIDOMHTMLParagraphElement.h index 897422fd827..eec8a9a2d21 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLParagraphElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLParagraphElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLPARAGRAPHELEMENT_IID \ -{ 0x6f765316, 0xee43, 0x11d1, \ +{ 0x6f765317, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLParagraphElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLParamElement.h b/mozilla/dom/public/html/nsIDOMHTMLParamElement.h index f87ecde6fc1..1ffe74790ff 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLParamElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLParamElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLPARAMELEMENT_IID \ -{ 0x6f765317, 0xee43, 0x11d1, \ +{ 0x6f765318, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLParamElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLPreElement.h b/mozilla/dom/public/html/nsIDOMHTMLPreElement.h index 7c818f81139..e73b637a60f 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLPreElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLPreElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLPREELEMENT_IID \ -{ 0x6f765318, 0xee43, 0x11d1, \ +{ 0x6f765319, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLPreElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLQuoteElement.h b/mozilla/dom/public/html/nsIDOMHTMLQuoteElement.h index 9d8de1a0ea6..c93aa483014 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLQuoteElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLQuoteElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLQUOTEELEMENT_IID \ -{ 0x6f765319, 0xee43, 0x11d1, \ +{ 0x6f76531a, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLQuoteElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLScriptElement.h b/mozilla/dom/public/html/nsIDOMHTMLScriptElement.h index c7d981399b0..f2e07b3ca35 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLScriptElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLScriptElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLSCRIPTELEMENT_IID \ -{ 0x6f76531a, 0xee43, 0x11d1, \ +{ 0x6f76531b, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLScriptElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLSelectElement.h b/mozilla/dom/public/html/nsIDOMHTMLSelectElement.h index 5aee6fa427b..904e77612db 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLSelectElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLSelectElement.h @@ -30,7 +30,7 @@ class nsIDOMHTMLFormElement; class nsIDOMHTMLCollection; #define NS_IDOMHTMLSELECTELEMENT_IID \ -{ 0x6f76531b, 0xee43, 0x11d1, \ +{ 0x6f76531c, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLSelectElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLStyleElement.h b/mozilla/dom/public/html/nsIDOMHTMLStyleElement.h index 9502bed8ce3..0c5deda5f25 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLStyleElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLStyleElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLSTYLEELEMENT_IID \ -{ 0x6f76531c, 0xee43, 0x11d1, \ +{ 0x6f76531d, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLStyleElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLTableCaptionElement.h b/mozilla/dom/public/html/nsIDOMHTMLTableCaptionElement.h index 39966e62b24..6bae5239d1c 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTableCaptionElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTableCaptionElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTABLECAPTIONELEMENT_IID \ -{ 0x6f76531d, 0xee43, 0x11d1, \ +{ 0x6f76531e, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTableCaptionElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLTableCellElement.h b/mozilla/dom/public/html/nsIDOMHTMLTableCellElement.h index 4d8f2fe283c..028fe3ee08a 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTableCellElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTableCellElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTABLECELLELEMENT_IID \ -{ 0x6f76531e, 0xee43, 0x11d1, \ +{ 0x6f76531f, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTableCellElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLTableColElement.h b/mozilla/dom/public/html/nsIDOMHTMLTableColElement.h index 80aa048b13f..349db9bd370 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTableColElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTableColElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTABLECOLELEMENT_IID \ -{ 0x6f76531f, 0xee43, 0x11d1, \ +{ 0x6f765320, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTableColElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLTableElement.h b/mozilla/dom/public/html/nsIDOMHTMLTableElement.h index 832fa56d6d1..828f35d6d51 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTableElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTableElement.h @@ -31,7 +31,7 @@ class nsIDOMHTMLTableSectionElement; class nsIDOMHTMLCollection; #define NS_IDOMHTMLTABLEELEMENT_IID \ -{ 0x6f765320, 0xee43, 0x11d1, \ +{ 0x6f765321, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTableElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLTableRowElement.h b/mozilla/dom/public/html/nsIDOMHTMLTableRowElement.h index 96f317bb70e..1801e1c727e 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTableRowElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTableRowElement.h @@ -29,7 +29,7 @@ class nsIDOMHTMLElement; class nsIDOMHTMLCollection; #define NS_IDOMHTMLTABLEROWELEMENT_IID \ -{ 0x6f765321, 0xee43, 0x11d1, \ +{ 0x6f765322, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTableRowElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLTableSectionElement.h b/mozilla/dom/public/html/nsIDOMHTMLTableSectionElement.h index 22e390344ca..75e9c101e06 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTableSectionElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTableSectionElement.h @@ -29,7 +29,7 @@ class nsIDOMHTMLElement; class nsIDOMHTMLCollection; #define NS_IDOMHTMLTABLESECTIONELEMENT_IID \ -{ 0x6f765322, 0xee43, 0x11d1, \ +{ 0x6f765323, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTableSectionElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLTbodyElement.h b/mozilla/dom/public/html/nsIDOMHTMLTbodyElement.h index 4669af46e2c..bea0f18505d 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTbodyElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTbodyElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTBODYELEMENT_IID \ -{ 0x6f765323, 0xee43, 0x11d1, \ +{ 0x6f765324, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTbodyElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLTextAreaElement.h b/mozilla/dom/public/html/nsIDOMHTMLTextAreaElement.h index 91be1bee2e6..7225612eb52 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTextAreaElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTextAreaElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLTEXTAREAELEMENT_IID \ -{ 0x6f765324, 0xee43, 0x11d1, \ +{ 0x6f765325, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTextAreaElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLTfootElement.h b/mozilla/dom/public/html/nsIDOMHTMLTfootElement.h index 1d9a62f14e2..78d439d2341 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTfootElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTfootElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTFOOTELEMENT_IID \ -{ 0x6f765325, 0xee43, 0x11d1, \ +{ 0x6f765326, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTfootElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLTheadElement.h b/mozilla/dom/public/html/nsIDOMHTMLTheadElement.h index 5b5b5c819a7..e994ff66f74 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTheadElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTheadElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTHEADELEMENT_IID \ -{ 0x6f765326, 0xee43, 0x11d1, \ +{ 0x6f765327, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTheadElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLTitleElement.h b/mozilla/dom/public/html/nsIDOMHTMLTitleElement.h index 33bb489ca6b..4f3b7399387 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTitleElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTitleElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTITLEELEMENT_IID \ -{ 0x6f765327, 0xee43, 0x11d1, \ +{ 0x6f765328, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTitleElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMHTMLUListElement.h b/mozilla/dom/public/html/nsIDOMHTMLUListElement.h index 70e4700444f..675e2891523 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLUListElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLUListElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLULISTELEMENT_IID \ -{ 0x6f765328, 0xee43, 0x11d1, \ +{ 0x6f765329, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLUListElement : public nsIDOMHTMLElement { diff --git a/mozilla/dom/public/html/nsIDOMImage.h b/mozilla/dom/public/html/nsIDOMImage.h index 47d3db9e267..84a01f36f5d 100644 --- a/mozilla/dom/public/html/nsIDOMImage.h +++ b/mozilla/dom/public/html/nsIDOMImage.h @@ -26,7 +26,7 @@ #define NS_IDOMIMAGE_IID \ -{ 0x6f765329, 0xee43, 0x11d1, \ +{ 0x6f76532a, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMImage : public nsISupports { diff --git a/mozilla/dom/public/html/nsIDOMNSHTMLDocument.h b/mozilla/dom/public/html/nsIDOMNSHTMLDocument.h index b26c8cc25e3..99f0a931dd5 100644 --- a/mozilla/dom/public/html/nsIDOMNSHTMLDocument.h +++ b/mozilla/dom/public/html/nsIDOMNSHTMLDocument.h @@ -28,7 +28,7 @@ class nsIDOMElement; class nsIDOMHTMLCollection; #define NS_IDOMNSHTMLDOCUMENT_IID \ -{ 0x6f76532a, 0xee43, 0x11d1, \ +{ 0x6f76532b, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMNSHTMLDocument : public nsISupports { diff --git a/mozilla/dom/public/html/nsIDOMNSHTMLFormElement.h b/mozilla/dom/public/html/nsIDOMNSHTMLFormElement.h index 6abe5d0bceb..a5aa49bfce4 100644 --- a/mozilla/dom/public/html/nsIDOMNSHTMLFormElement.h +++ b/mozilla/dom/public/html/nsIDOMNSHTMLFormElement.h @@ -27,7 +27,7 @@ class nsIDOMElement; #define NS_IDOMNSHTMLFORMELEMENT_IID \ -{ 0x6f76532b, 0xee43, 0x11d1, \ +{ 0x6f76532c, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMNSHTMLFormElement : public nsISupports { diff --git a/mozilla/dom/public/idl/Window.idl b/mozilla/dom/public/idl/Window.idl index eb55ef90efe..33bf87a557f 100644 --- a/mozilla/dom/public/idl/Window.idl +++ b/mozilla/dom/public/idl/Window.idl @@ -1,21 +1,21 @@ interface Window { - readonly attribute Window window; + readonly attribute Window window; readonly attribute Window self; - readonly attribute Document document; - readonly attribute Navigator navigator; + readonly attribute Document document; + readonly attribute Navigator navigator; readonly attribute Window parent; readonly attribute Window top; - readonly attribute boolean closed; - readonly attribute WindowCollection frames; - attribute Window opener; - attribute wstring status; - attribute wstring defaultStatus; - attribute wstring name; - void dump(in wstring str); - void alert(in wstring str); - void focus(); - void blur(); - void close(); + readonly attribute boolean closed; + readonly attribute WindowCollection frames; + attribute Window opener; + attribute wstring status; + attribute wstring defaultStatus; + attribute wstring name; + void dump(in wstring str); + void alert(in wstring str); + void focus(); + void blur(); + void close(); void clearTimeout(in long timerID); void clearInterval(in long timerID); @@ -24,3 +24,7 @@ Window open(/* ... */); }; + interface EventCapturer : EventReceiver { + void captureEvent(in wstring type); + void releaseEvent(in wstring type); + }; \ No newline at end of file diff --git a/mozilla/dom/public/idl/coreDom/Document.idl b/mozilla/dom/public/idl/coreDom/Document.idl index 93383f920dc..5abe83fa928 100644 --- a/mozilla/dom/public/idl/coreDom/Document.idl +++ b/mozilla/dom/public/idl/coreDom/Document.idl @@ -14,3 +14,8 @@ in Node value); NodeList getElementsByTagName(in wstring tagname); }; + + interface EventCapturer : EventReceiver { + void captureEvent(in wstring type); + void releaseEvent(in wstring type); + }; \ No newline at end of file diff --git a/mozilla/dom/public/idl/coreDom/Element.idl b/mozilla/dom/public/idl/coreDom/Element.idl index 1546e96286f..ee6395efbba 100644 --- a/mozilla/dom/public/idl/coreDom/Element.idl +++ b/mozilla/dom/public/idl/coreDom/Element.idl @@ -10,4 +10,3 @@ NodeList getElementsByTagName(in wstring tagname); void normalize(); }; - diff --git a/mozilla/dom/public/idl/coreDom/makefile.win b/mozilla/dom/public/idl/coreDom/makefile.win index fe961fc2564..2775a68df43 100644 --- a/mozilla/dom/public/idl/coreDom/makefile.win +++ b/mozilla/dom/public/idl/coreDom/makefile.win @@ -61,5 +61,7 @@ export:: $(GENXDIR) $(GENJSDIR) $(IDLSRCS) $(IDLC) -d $(GENJSDIR) -j $(IDLSRCS) install:: + $(MAKE_INSTALL:/=\) $(GENXDIR)\nsIDOMEventCapturer.h $(XPCOM_DESTDIR)\..\coreEvents + $(RM) $(GENXDIR)\nsIDOMEventCapturer.h $(MAKE_INSTALL:/=\) $(GENXDIR)\nsIDOM*.h $(XPCOM_DESTDIR) $(MAKE_INSTALL:/=\) $(GENJSDIR)\nsJS*.cpp $(JSSTUB_DESTDIR) diff --git a/mozilla/dom/public/idl/events/Event.idl b/mozilla/dom/public/idl/events/Event.idl index fb0c8d2f1e1..2c3bca9be10 100644 --- a/mozilla/dom/public/idl/events/Event.idl +++ b/mozilla/dom/public/idl/events/Event.idl @@ -1,182 +1,182 @@ interface Event { - const int VK_CANCEL = 0x03; - const int VK_BACK = 0x08; - const int VK_TAB = 0x09; - const int VK_CLEAR = 0x0C; - const int VK_RETURN = 0x0D; - const int VK_SHIFT = 0x10; - const int VK_CONTROL = 0x11; - const int VK_ALT = 0x12; - const int VK_PAUSE = 0x13; - const int VK_CAPS_LOCK = 0x14; - const int VK_ESCAPE = 0x1B; - const int VK_SPACE = 0x20; - const int VK_PAGE_UP = 0x21; - const int VK_PAGE_DOWN = 0x22; - const int VK_END = 0x23; - const int VK_HOME = 0x24; - const int VK_LEFT = 0x25; - const int VK_UP = 0x26; - const int VK_RIGHT = 0x27; - const int VK_DOWN = 0x28; - const int VK_PRINTSCREEN = 0x2C; - const int VK_INSERT = 0x2D; - const int VK_DELETE = 0x2E; + const int VK_CANCEL = 0x03; + const int VK_BACK = 0x08; + const int VK_TAB = 0x09; + const int VK_CLEAR = 0x0C; + const int VK_RETURN = 0x0D; + const int VK_SHIFT = 0x10; + const int VK_CONTROL = 0x11; + const int VK_ALT = 0x12; + const int VK_PAUSE = 0x13; + const int VK_CAPS_LOCK = 0x14; + const int VK_ESCAPE = 0x1B; + const int VK_SPACE = 0x20; + const int VK_PAGE_UP = 0x21; + const int VK_PAGE_DOWN = 0x22; + const int VK_END = 0x23; + const int VK_HOME = 0x24; + const int VK_LEFT = 0x25; + const int VK_UP = 0x26; + const int VK_RIGHT = 0x27; + const int VK_DOWN = 0x28; + const int VK_PRINTSCREEN = 0x2C; + const int VK_INSERT = 0x2D; + const int VK_DELETE = 0x2E; - // VK_0 - VK_9 match their ascii values - const int VK_0 = 0x30; - const int VK_1 = 0x31; - const int VK_2 = 0x32; - const int VK_3 = 0x33; - const int VK_4 = 0x34; - const int VK_5 = 0x35; - const int VK_6 = 0x36; - const int VK_7 = 0x37; - const int VK_8 = 0x38; - const int VK_9 = 0x39; + // VK_0 - VK_9 match their ascii values + const int VK_0 = 0x30; + const int VK_1 = 0x31; + const int VK_2 = 0x32; + const int VK_3 = 0x33; + const int VK_4 = 0x34; + const int VK_5 = 0x35; + const int VK_6 = 0x36; + const int VK_7 = 0x37; + const int VK_8 = 0x38; + const int VK_9 = 0x39; - const int VK_SEMICOLON = 0x3B; - const int VK_EQUALS = 0x3D; + const int VK_SEMICOLON = 0x3B; + const int VK_EQUALS = 0x3D; - // VK_A - VK_Z match their ascii values - const int VK_A = 0x41; - const int VK_B = 0x42; - const int VK_C = 0x43; - const int VK_D = 0x44; - const int VK_E = 0x45; - const int VK_F = 0x46; - const int VK_G = 0x47; - const int VK_H = 0x48; - const int VK_I = 0x49; - const int VK_J = 0x4A; - const int VK_K = 0x4B; - const int VK_L = 0x4C; - const int VK_M = 0x4D; - const int VK_N = 0x4E; - const int VK_O = 0x4F; - const int VK_P = 0x50; - const int VK_Q = 0x51; - const int VK_R = 0x52; - const int VK_S = 0x53; - const int VK_T = 0x54; - const int VK_U = 0x55; - const int VK_V = 0x56; - const int VK_W = 0x57; - const int VK_X = 0x58; - const int VK_Y = 0x59; - const int VK_Z = 0x5A; + // VK_A - VK_Z match their ascii values + const int VK_A = 0x41; + const int VK_B = 0x42; + const int VK_C = 0x43; + const int VK_D = 0x44; + const int VK_E = 0x45; + const int VK_F = 0x46; + const int VK_G = 0x47; + const int VK_H = 0x48; + const int VK_I = 0x49; + const int VK_J = 0x4A; + const int VK_K = 0x4B; + const int VK_L = 0x4C; + const int VK_M = 0x4D; + const int VK_N = 0x4E; + const int VK_O = 0x4F; + const int VK_P = 0x50; + const int VK_Q = 0x51; + const int VK_R = 0x52; + const int VK_S = 0x53; + const int VK_T = 0x54; + const int VK_U = 0x55; + const int VK_V = 0x56; + const int VK_W = 0x57; + const int VK_X = 0x58; + const int VK_Y = 0x59; + const int VK_Z = 0x5A; - const int VK_NUMPAD0 = 0x60; - const int VK_NUMPAD1 = 0x61; - const int VK_NUMPAD2 = 0x62; - const int VK_NUMPAD3 = 0x63; - const int VK_NUMPAD4 = 0x64; - const int VK_NUMPAD5 = 0x65; - const int VK_NUMPAD6 = 0x66; - const int VK_NUMPAD7 = 0x67; - const int VK_NUMPAD8 = 0x68; - const int VK_NUMPAD9 = 0x69; - const int VK_MULTIPLY = 0x6A; - const int VK_ADD = 0x6B; - const int VK_SEPARATOR = 0x6C; - const int VK_SUBTRACT = 0x6D; - const int VK_DECIMAL = 0x6E; - const int VK_DIVIDE = 0x6F; - const int VK_F1 = 0x70; - const int VK_F2 = 0x71; - const int VK_F3 = 0x72; - const int VK_F4 = 0x73; - const int VK_F5 = 0x74; - const int VK_F6 = 0x75; - const int VK_F7 = 0x76; - const int VK_F8 = 0x77; - const int VK_F9 = 0x78; - const int VK_F10 = 0x79; - const int VK_F11 = 0x7A; - const int VK_F12 = 0x7B; - const int VK_F13 = 0x7C; - const int VK_F14 = 0x7D; - const int VK_F15 = 0x7E; - const int VK_F16 = 0x7F; - const int VK_F17 = 0x80; - const int VK_F18 = 0x81; - const int VK_F19 = 0x82; - const int VK_F20 = 0x83; - const int VK_F21 = 0x84; - const int VK_F22 = 0x85; - const int VK_F23 = 0x86; - const int VK_F24 = 0x87; + const int VK_NUMPAD0 = 0x60; + const int VK_NUMPAD1 = 0x61; + const int VK_NUMPAD2 = 0x62; + const int VK_NUMPAD3 = 0x63; + const int VK_NUMPAD4 = 0x64; + const int VK_NUMPAD5 = 0x65; + const int VK_NUMPAD6 = 0x66; + const int VK_NUMPAD7 = 0x67; + const int VK_NUMPAD8 = 0x68; + const int VK_NUMPAD9 = 0x69; + const int VK_MULTIPLY = 0x6A; + const int VK_ADD = 0x6B; + const int VK_SEPARATOR = 0x6C; + const int VK_SUBTRACT = 0x6D; + const int VK_DECIMAL = 0x6E; + const int VK_DIVIDE = 0x6F; + const int VK_F1 = 0x70; + const int VK_F2 = 0x71; + const int VK_F3 = 0x72; + const int VK_F4 = 0x73; + const int VK_F5 = 0x74; + const int VK_F6 = 0x75; + const int VK_F7 = 0x76; + const int VK_F8 = 0x77; + const int VK_F9 = 0x78; + const int VK_F10 = 0x79; + const int VK_F11 = 0x7A; + const int VK_F12 = 0x7B; + const int VK_F13 = 0x7C; + const int VK_F14 = 0x7D; + const int VK_F15 = 0x7E; + const int VK_F16 = 0x7F; + const int VK_F17 = 0x80; + const int VK_F18 = 0x81; + const int VK_F19 = 0x82; + const int VK_F20 = 0x83; + const int VK_F21 = 0x84; + const int VK_F22 = 0x85; + const int VK_F23 = 0x86; + const int VK_F24 = 0x87; - const int VK_NUM_LOCK = 0x90; - const int VK_SCROLL_LOCK = 0x91; + const int VK_NUM_LOCK = 0x90; + const int VK_SCROLL_LOCK = 0x91; - const int VK_COMMA = 0xBC; - const int VK_PERIOD = 0xBE; - const int VK_SLASH = 0xBF; - const int VK_BACK_QUOTE = 0xC0; - const int VK_OPEN_BRACKET = 0xDB; - const int VK_BACK_SLASH = 0xDC; - const int VK_CLOSE_BRACKET = 0xDD; - const int VK_QUOTE = 0xDE; + const int VK_COMMA = 0xBC; + const int VK_PERIOD = 0xBE; + const int VK_SLASH = 0xBF; + const int VK_BACK_QUOTE = 0xC0; + const int VK_OPEN_BRACKET = 0xDB; + const int VK_BACK_SLASH = 0xDC; + const int VK_CLOSE_BRACKET = 0xDD; + const int VK_QUOTE = 0xDE; - attribute wstring type; - attribute Node target; + attribute wstring type; + attribute Node target; - attribute int screenX; - attribute int screenY; + attribute int screenX; + attribute int screenY; - attribute int clientX; - attribute int clientY; - - attribute boolean altKey; - attribute boolean ctrlKey; - attribute boolean shiftKey; - attribute boolean metaKey; + attribute int clientX; + attribute int clientY; + + attribute boolean altKey; + attribute boolean ctrlKey; + attribute boolean shiftKey; + attribute boolean metaKey; - attribute boolean cancelBubble; + attribute boolean cancelBubble; - attribute unsigned long charCode; - attribute unsigned long keyCode; - attribute unsigned long button; + attribute unsigned long charCode; + attribute unsigned long keyCode; + attribute unsigned long button; }; interface NSEvent { - const int EVENT_MOUSEDOWN = 0x00000001; - const int EVENT_MOUSEUP = 0x00000002; - const int EVENT_MOUSEOVER = 0x00000004; - const int EVENT_MOUSEOUT = 0x00000008; - const int EVENT_MOUSEMOVE = 0x00000010; - const int EVENT_MOUSEDRAG = 0x00000020; - const int EVENT_CLICK = 0x00000040; - const int EVENT_DBLCLICK = 0x00000080; - const int EVENT_KEYDOWN = 0x00000100; - const int EVENT_KEYUP = 0x00000200; - const int EVENT_KEYPRESS = 0x00000400; - const int EVENT_DRAGDROP = 0x00000800; - const int EVENT_FOCUS = 0x00001000; - const int EVENT_BLUR = 0x00002000; - const int EVENT_SELECT = 0x00004000; - const int EVENT_CHANGE = 0x00008000; - const int EVENT_RESET = 0x00010000; - const int EVENT_SUBMIT = 0x00020000; - const int EVENT_SCROLL = 0x00040000; - const int EVENT_LOAD = 0x00080000; - const int EVENT_UNLOAD = 0x00100000; - const int EVENT_XFER_DONE = 0x00200000; - const int EVENT_ABORT = 0x00400000; - const int EVENT_ERROR = 0x00800000; - const int EVENT_LOCATE = 0x01000000; - const int EVENT_MOVE = 0x02000000; - const int EVENT_RESIZE = 0x04000000; - const int EVENT_FORWARD = 0x08000000; - const int EVENT_HELP = 0x10000000; - const int EVENT_BACK = 0x20000000; + const int EVENT_MOUSEDOWN = 0x00000001; + const int EVENT_MOUSEUP = 0x00000002; + const int EVENT_MOUSEOVER = 0x00000004; + const int EVENT_MOUSEOUT = 0x00000008; + const int EVENT_MOUSEMOVE = 0x00000010; + const int EVENT_MOUSEDRAG = 0x00000020; + const int EVENT_CLICK = 0x00000040; + const int EVENT_DBLCLICK = 0x00000080; + const int EVENT_KEYDOWN = 0x00000100; + const int EVENT_KEYUP = 0x00000200; + const int EVENT_KEYPRESS = 0x00000400; + const int EVENT_DRAGDROP = 0x00000800; + const int EVENT_FOCUS = 0x00001000; + const int EVENT_BLUR = 0x00002000; + const int EVENT_SELECT = 0x00004000; + const int EVENT_CHANGE = 0x00008000; + const int EVENT_RESET = 0x00010000; + const int EVENT_SUBMIT = 0x00020000; + const int EVENT_SCROLL = 0x00040000; + const int EVENT_LOAD = 0x00080000; + const int EVENT_UNLOAD = 0x00100000; + const int EVENT_XFER_DONE = 0x00200000; + const int EVENT_ABORT = 0x00400000; + const int EVENT_ERROR = 0x00800000; + const int EVENT_LOCATE = 0x01000000; + const int EVENT_MOVE = 0x02000000; + const int EVENT_RESIZE = 0x04000000; + const int EVENT_FORWARD = 0x08000000; + const int EVENT_HELP = 0x10000000; + const int EVENT_BACK = 0x20000000; - const int EVENT_ALT_MASK = 0x00000001; - const int EVENT_CONTROL_MASK = 0x00000002; - const int EVENT_SHIFT_MASK = 0x00000004; - const int EVENT_META_MASK = 0x00000008; + const int EVENT_ALT_MASK = 0x00000001; + const int EVENT_CONTROL_MASK = 0x00000002; + const int EVENT_SHIFT_MASK = 0x00000004; + const int EVENT_META_MASK = 0x00000008; - attribute int layerX; - attribute int layerY; + attribute int layerX; + attribute int layerY; }; diff --git a/mozilla/dom/public/idl/makefile.win b/mozilla/dom/public/idl/makefile.win index be5af87b729..0adaa08dac9 100644 --- a/mozilla/dom/public/idl/makefile.win +++ b/mozilla/dom/public/idl/makefile.win @@ -58,6 +58,8 @@ export:: $(GENXDIR) $(GENJSDIR) $(IDLSRCS) $(PERL) $(GENIID) $(IIDDIRS) install:: + $(MAKE_INSTALL:/=\) $(GENXDIR)\nsIDOMEventCapturer.h $(XPCOM_DESTDIR)\coreEvents + $(RM) $(GENXDIR)\nsIDOMEventCapturer.h $(MAKE_INSTALL:/=\) $(GENXDIR)\nsIDOM*.h $(XPCOM_DESTDIR) $(MAKE_INSTALL:/=\) $(GENXDIR)\nsIDOM$(GLOBAL_IDLSRC:.idl=.h) $(XPCOM_DESTDIR) $(MAKE_INSTALL:/=\) $(GENJSDIR)\nsJS*.cpp $(JSSTUB_DESTDIR) diff --git a/mozilla/dom/public/nsIDOMLocation.h b/mozilla/dom/public/nsIDOMLocation.h index 51bbe9b800f..ca9ce93d3b2 100644 --- a/mozilla/dom/public/nsIDOMLocation.h +++ b/mozilla/dom/public/nsIDOMLocation.h @@ -27,7 +27,7 @@ #define NS_IDOMLOCATION_IID \ -{ 0x6f76532e, 0xee43, 0x11d1, \ +{ 0x6f765330, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMLocation : public nsISupports { diff --git a/mozilla/dom/public/nsIDOMNavigator.h b/mozilla/dom/public/nsIDOMNavigator.h index 7ded1292b4b..74f6cefef45 100644 --- a/mozilla/dom/public/nsIDOMNavigator.h +++ b/mozilla/dom/public/nsIDOMNavigator.h @@ -26,7 +26,7 @@ #define NS_IDOMNAVIGATOR_IID \ -{ 0x6f76532f, 0xee43, 0x11d1, \ +{ 0x6f765331, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMNavigator : public nsISupports { diff --git a/mozilla/dom/public/nsIDOMWindow.h b/mozilla/dom/public/nsIDOMWindow.h index 3ef23f00aa5..497e0a14f7f 100644 --- a/mozilla/dom/public/nsIDOMWindow.h +++ b/mozilla/dom/public/nsIDOMWindow.h @@ -31,7 +31,7 @@ class nsIDOMWindowCollection; class nsIDOMWindow; #define NS_IDOMWINDOW_IID \ -{ 0x6f765330, 0xee43, 0x11d1, \ +{ 0x6f765332, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMWindow : public nsISupports { diff --git a/mozilla/dom/public/nsIDOMWindowCollection.h b/mozilla/dom/public/nsIDOMWindowCollection.h index 34bcac761ff..8f217225a73 100644 --- a/mozilla/dom/public/nsIDOMWindowCollection.h +++ b/mozilla/dom/public/nsIDOMWindowCollection.h @@ -27,7 +27,7 @@ class nsIDOMWindow; #define NS_IDOMWINDOWCOLLECTION_IID \ -{ 0x6f765331, 0xee43, 0x11d1, \ +{ 0x6f765333, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMWindowCollection : public nsISupports { diff --git a/mozilla/dom/src/base/nsGlobalWindow.cpp b/mozilla/dom/src/base/nsGlobalWindow.cpp index c1192e93117..2afaeaa175d 100644 --- a/mozilla/dom/src/base/nsGlobalWindow.cpp +++ b/mozilla/dom/src/base/nsGlobalWindow.cpp @@ -469,12 +469,14 @@ GlobalWindowImpl::Alert(const nsString& aStr) NS_IMETHODIMP GlobalWindowImpl::Focus() { + mWebShell->SetFocus(); return NS_OK; } NS_IMETHODIMP GlobalWindowImpl::Blur() { + mWebShell->RemoveFocus(); return NS_OK; } @@ -1042,6 +1044,7 @@ GlobalWindowImpl::Open(JSContext *cx, if (nsnull != newWindow) { //How should we do default size/pos + newWindow->Hide(); newWindow->SetChrome(mChrome); newWindow->SizeTo(mWidth ? mWidth : 620, mHeight ? mHeight : 400); newWindow->MoveTo(mLeft, mTop); @@ -1395,7 +1398,11 @@ GlobalWindowImpl::HandleDOMEvent(nsIPresContext& aPresContext, if (DOM_EVENT_INIT == aFlags) { // We're leaving the DOM event loop so if we created a DOM event, release here. if (nsnull != *aDOMEvent) { - if (0 != (*aDOMEvent)->Release()) { + nsrefcnt rc; + nsIDOMEvent* DOMEvent = *aDOMEvent; + // Release the copy since the macro will null the pointer + NS_RELEASE2(DOMEvent, rc); + if (0 != rc) { //Okay, so someone in the DOM loop (a listener, JS object) still has a ref to the DOM Event but //the internal data hasn't been malloc'd. Force a copy of the data here so the DOM Event is still valid. nsIPrivateDOMEvent *mPrivateEvent; @@ -1435,12 +1442,12 @@ GlobalWindowImpl::RemoveEventListener(nsIDOMEventListener *aListener, const nsII } nsresult -GlobalWindowImpl::CaptureEvent(nsIDOMEventListener *aListener) +GlobalWindowImpl::CaptureEvent(const nsString& aType) { nsIEventListenerManager *mManager; if (NS_OK == GetListenerManager(&mManager)) { - mManager->CaptureEvent(aListener); + //mManager->CaptureEvent(aListener); NS_RELEASE(mManager); return NS_OK; } @@ -1448,10 +1455,10 @@ GlobalWindowImpl::CaptureEvent(nsIDOMEventListener *aListener) } nsresult -GlobalWindowImpl::ReleaseEvent(nsIDOMEventListener *aListener) +GlobalWindowImpl::ReleaseEvent(const nsString& aType) { if (nsnull != mListenerManager) { - mListenerManager->ReleaseEvent(aListener); + //mListenerManager->ReleaseEvent(aListener); return NS_OK; } return NS_ERROR_FAILURE; diff --git a/mozilla/dom/src/base/nsGlobalWindow.h b/mozilla/dom/src/base/nsGlobalWindow.h index 19fbe9a2f75..dbb453cbef9 100644 --- a/mozilla/dom/src/base/nsGlobalWindow.h +++ b/mozilla/dom/src/base/nsGlobalWindow.h @@ -101,8 +101,10 @@ public: nsIDOMWindow** aReturn); // nsIDOMEventCapturer interface - NS_IMETHOD CaptureEvent(nsIDOMEventListener *aListener); - NS_IMETHOD ReleaseEvent(nsIDOMEventListener *aListener); + NS_IMETHOD CaptureEvent(const nsString& aType); + NS_IMETHOD ReleaseEvent(const nsString& aType); + + // nsIDOMEventReceiver interface NS_IMETHOD AddEventListener(nsIDOMEventListener *aListener, const nsIID& aIID); NS_IMETHOD RemoveEventListener(nsIDOMEventListener *aListener, const nsIID& aIID); NS_IMETHOD GetListenerManager(nsIEventListenerManager** aInstancePtrResult); diff --git a/mozilla/dom/src/base/nsJSWindow.cpp b/mozilla/dom/src/base/nsJSWindow.cpp index 5eafc4af540..8077e2493ab 100644 --- a/mozilla/dom/src/base/nsJSWindow.cpp +++ b/mozilla/dom/src/base/nsJSWindow.cpp @@ -28,6 +28,7 @@ #include "nsIDOMNavigator.h" #include "nsIDOMDocument.h" #include "nsIDOMWindowCollection.h" +#include "nsIDOMEventCapturer.h" #include "nsIDOMWindow.h" @@ -37,11 +38,13 @@ static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); static NS_DEFINE_IID(kINavigatorIID, NS_IDOMNAVIGATOR_IID); static NS_DEFINE_IID(kIDocumentIID, NS_IDOMDOCUMENT_IID); static NS_DEFINE_IID(kIWindowCollectionIID, NS_IDOMWINDOWCOLLECTION_IID); +static NS_DEFINE_IID(kIEventCapturerIID, NS_IDOMEVENTCAPTURER_IID); static NS_DEFINE_IID(kIWindowIID, NS_IDOMWINDOW_IID); NS_DEF_PTR(nsIDOMNavigator); NS_DEF_PTR(nsIDOMDocument); NS_DEF_PTR(nsIDOMWindowCollection); +NS_DEF_PTR(nsIDOMEventCapturer); NS_DEF_PTR(nsIDOMWindow); // @@ -906,6 +909,102 @@ WindowOpen(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) } +// +// Native method CaptureEvent +// +PR_STATIC_CALLBACK(JSBool) +EventCapturerCaptureEvent(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMWindow *privateThis = (nsIDOMWindow*)JS_GetPrivate(cx, obj); + nsIDOMEventCapturer *nativeThis; + if (NS_OK != privateThis->QueryInterface(kIEventCapturerIID, (void **)nativeThis)) { + JS_ReportError(cx, "Object must be of type EventCapturer"); + return JS_FALSE; + } + + JSBool rBool = JS_FALSE; + nsAutoString b0; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 1) { + + JSString *jsstring0 = JS_ValueToString(cx, argv[0]); + if (nsnull != jsstring0) { + b0.SetString(JS_GetStringChars(jsstring0)); + } + else { + b0.SetString(""); // Should this really be null?? + } + + if (NS_OK != nativeThis->CaptureEvent(b0)) { + return JS_FALSE; + } + + *rval = JSVAL_VOID; + } + else { + JS_ReportError(cx, "Function captureEvent requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +// +// Native method ReleaseEvent +// +PR_STATIC_CALLBACK(JSBool) +EventCapturerReleaseEvent(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMWindow *privateThis = (nsIDOMWindow*)JS_GetPrivate(cx, obj); + nsIDOMEventCapturer *nativeThis; + if (NS_OK != privateThis->QueryInterface(kIEventCapturerIID, (void **)nativeThis)) { + JS_ReportError(cx, "Object must be of type EventCapturer"); + return JS_FALSE; + } + + JSBool rBool = JS_FALSE; + nsAutoString b0; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 1) { + + JSString *jsstring0 = JS_ValueToString(cx, argv[0]); + if (nsnull != jsstring0) { + b0.SetString(JS_GetStringChars(jsstring0)); + } + else { + b0.SetString(""); // Should this really be null?? + } + + if (NS_OK != nativeThis->ReleaseEvent(b0)) { + return JS_FALSE; + } + + *rval = JSVAL_VOID; + } + else { + JS_ReportError(cx, "Function releaseEvent requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + /***********************************************************************/ // // class for Window @@ -960,6 +1059,8 @@ static JSFunctionSpec WindowMethods[] = {"setTimeout", WindowSetTimeout, 0}, {"setInterval", WindowSetInterval, 0}, {"open", WindowOpen, 0}, + {"captureEvent", EventCapturerCaptureEvent, 1}, + {"releaseEvent", EventCapturerReleaseEvent, 1}, {0} }; diff --git a/mozilla/dom/src/coreDOM/nsJSDocument.cpp b/mozilla/dom/src/coreDOM/nsJSDocument.cpp index 423e208e6b9..62c9d2dde18 100644 --- a/mozilla/dom/src/coreDOM/nsJSDocument.cpp +++ b/mozilla/dom/src/coreDOM/nsJSDocument.cpp @@ -35,6 +35,7 @@ #include "nsIDOMDocumentType.h" #include "nsIDOMDocumentFragment.h" #include "nsIDOMComment.h" +#include "nsIDOMEventCapturer.h" #include "nsIDOMNodeList.h" @@ -51,6 +52,7 @@ static NS_DEFINE_IID(kITextIID, NS_IDOMTEXT_IID); static NS_DEFINE_IID(kIDocumentTypeIID, NS_IDOMDOCUMENTTYPE_IID); static NS_DEFINE_IID(kIDocumentFragmentIID, NS_IDOMDOCUMENTFRAGMENT_IID); static NS_DEFINE_IID(kICommentIID, NS_IDOMCOMMENT_IID); +static NS_DEFINE_IID(kIEventCapturerIID, NS_IDOMEVENTCAPTURER_IID); static NS_DEFINE_IID(kINodeListIID, NS_IDOMNODELIST_IID); NS_DEF_PTR(nsIDOMElement); @@ -63,6 +65,7 @@ NS_DEF_PTR(nsIDOMText); NS_DEF_PTR(nsIDOMDocumentType); NS_DEF_PTR(nsIDOMDocumentFragment); NS_DEF_PTR(nsIDOMComment); +NS_DEF_PTR(nsIDOMEventCapturer); NS_DEF_PTR(nsIDOMNodeList); // @@ -772,6 +775,102 @@ DocumentGetElementsByTagName(JSContext *cx, JSObject *obj, uintN argc, jsval *ar } +// +// Native method CaptureEvent +// +PR_STATIC_CALLBACK(JSBool) +EventCapturerCaptureEvent(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMDocument *privateThis = (nsIDOMDocument*)JS_GetPrivate(cx, obj); + nsIDOMEventCapturer *nativeThis; + if (NS_OK != privateThis->QueryInterface(kIEventCapturerIID, (void **)nativeThis)) { + JS_ReportError(cx, "Object must be of type EventCapturer"); + return JS_FALSE; + } + + JSBool rBool = JS_FALSE; + nsAutoString b0; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 1) { + + JSString *jsstring0 = JS_ValueToString(cx, argv[0]); + if (nsnull != jsstring0) { + b0.SetString(JS_GetStringChars(jsstring0)); + } + else { + b0.SetString(""); // Should this really be null?? + } + + if (NS_OK != nativeThis->CaptureEvent(b0)) { + return JS_FALSE; + } + + *rval = JSVAL_VOID; + } + else { + JS_ReportError(cx, "Function captureEvent requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +// +// Native method ReleaseEvent +// +PR_STATIC_CALLBACK(JSBool) +EventCapturerReleaseEvent(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMDocument *privateThis = (nsIDOMDocument*)JS_GetPrivate(cx, obj); + nsIDOMEventCapturer *nativeThis; + if (NS_OK != privateThis->QueryInterface(kIEventCapturerIID, (void **)nativeThis)) { + JS_ReportError(cx, "Object must be of type EventCapturer"); + return JS_FALSE; + } + + JSBool rBool = JS_FALSE; + nsAutoString b0; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 1) { + + JSString *jsstring0 = JS_ValueToString(cx, argv[0]); + if (nsnull != jsstring0) { + b0.SetString(JS_GetStringChars(jsstring0)); + } + else { + b0.SetString(""); // Should this really be null?? + } + + if (NS_OK != nativeThis->ReleaseEvent(b0)) { + return JS_FALSE; + } + + *rval = JSVAL_VOID; + } + else { + JS_ReportError(cx, "Function releaseEvent requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + /***********************************************************************/ // // class for Document @@ -815,6 +914,8 @@ static JSFunctionSpec DocumentMethods[] = {"createProcessingInstruction", DocumentCreateProcessingInstruction, 2}, {"createAttribute", DocumentCreateAttribute, 2}, {"getElementsByTagName", DocumentGetElementsByTagName, 1}, + {"captureEvent", EventCapturerCaptureEvent, 1}, + {"releaseEvent", EventCapturerReleaseEvent, 1}, {0} }; diff --git a/mozilla/layout/base/src/nsDocument.cpp b/mozilla/layout/base/src/nsDocument.cpp index 2d802a55332..a4d8d4946ea 100644 --- a/mozilla/layout/base/src/nsDocument.cpp +++ b/mozilla/layout/base/src/nsDocument.cpp @@ -886,6 +886,9 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext, } //Capturing stage + /*if (mEventCapturer) { + mEventCapturer->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, aFlags, aEventStatus); + }*/ //Local handling stage if (nsnull != mListenerManager) { @@ -906,7 +909,11 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext, if (DOM_EVENT_INIT == aFlags) { // We're leaving the DOM event loop so if we created a DOM event, release here. if (nsnull != *aDOMEvent) { - if (0 != (*aDOMEvent)->Release()) { + nsrefcnt rc; + nsIDOMEvent* DOMEvent = *aDOMEvent; + // Release the copy since the macro will null the pointer + NS_RELEASE2(DOMEvent, rc); + if (0 != rc) { //Okay, so someone in the DOM loop (a listener, JS object) still has a ref to the DOM Event but //the internal data hasn't been malloc'd. Force a copy of the data here so the DOM Event is still valid. nsIPrivateDOMEvent *mPrivateEvent; @@ -943,22 +950,22 @@ nsresult nsDocument::RemoveEventListener(nsIDOMEventListener *aListener, const n return NS_ERROR_FAILURE; } -nsresult nsDocument::CaptureEvent(nsIDOMEventListener *aListener) +nsresult nsDocument::CaptureEvent(const nsString& aType) { nsIEventListenerManager *mManager; if (NS_OK == GetListenerManager(&mManager)) { - mManager->CaptureEvent(aListener); + //mManager->CaptureEvent(aListener); NS_RELEASE(mManager); return NS_OK; } return NS_ERROR_FAILURE; } -nsresult nsDocument::ReleaseEvent(nsIDOMEventListener *aListener) +nsresult nsDocument::ReleaseEvent(const nsString& aType) { if (nsnull != mListenerManager) { - mListenerManager->ReleaseEvent(aListener); + //mListenerManager->ReleaseEvent(aListener); return NS_OK; } return NS_ERROR_FAILURE; @@ -1460,6 +1467,7 @@ nsIContent* nsDocument::GetNextContent(const nsIContent *aContent) const nsIContent * old = result; old->ChildAt(0, result); NS_RELEASE(old); + result->ChildCount(n); } } else { result = GetNextContent(parent); diff --git a/mozilla/layout/base/src/nsDocument.h b/mozilla/layout/base/src/nsDocument.h index 93cd09823c8..78c31e72722 100644 --- a/mozilla/layout/base/src/nsDocument.h +++ b/mozilla/layout/base/src/nsDocument.h @@ -229,8 +229,10 @@ public: NS_IMETHOD Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn); // nsIDOMEventCapturer interface - NS_IMETHOD CaptureEvent(nsIDOMEventListener *aListener); - NS_IMETHOD ReleaseEvent(nsIDOMEventListener *aListener); + NS_IMETHOD CaptureEvent(const nsString& aType); + NS_IMETHOD ReleaseEvent(const nsString& aType); + + // nsIDOMEventReceiver interface NS_IMETHOD AddEventListener(nsIDOMEventListener *aListener, const nsIID& aIID); NS_IMETHOD RemoveEventListener(nsIDOMEventListener *aListener, const nsIID& aIID); NS_IMETHOD GetListenerManager(nsIEventListenerManager** aInstancePtrResult); diff --git a/mozilla/layout/html/base/src/nsHTMLContent.cpp b/mozilla/layout/html/base/src/nsHTMLContent.cpp index 1e6a279d197..b8e7ada82f6 100644 --- a/mozilla/layout/html/base/src/nsHTMLContent.cpp +++ b/mozilla/layout/html/base/src/nsHTMLContent.cpp @@ -680,8 +680,8 @@ nsresult nsHTMLContent::HandleDOMEvent(nsIPresContext& aPresContext, PRUint32 aFlags, nsEventStatus& aEventStatus) { - nsresult mRet = NS_OK; - nsIDOMEvent* mDOMEvent = nsnull; + nsresult ret = NS_OK; + nsIDOMEvent* DOMEvent = nsnull; if (DOM_EVENT_INIT == aFlags) { nsIEventStateManager *mManager; @@ -690,38 +690,45 @@ nsresult nsHTMLContent::HandleDOMEvent(nsIPresContext& aPresContext, NS_RELEASE(mManager); } - aDOMEvent = &mDOMEvent; + aDOMEvent = &DOMEvent; } //Capturing stage + /*if (mDocument->GetEventCapturer) { + ret = mEventCapturer->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, aFlags, aEventStatus); + }*/ //Local handling stage if (nsnull != mListenerManager) { - mListenerManager->HandleEvent(aPresContext, aEvent, aDOMEvent, aEventStatus); + ret = mListenerManager->HandleEvent(aPresContext, aEvent, aDOMEvent, aEventStatus); } //Bubbling stage if (DOM_EVENT_CAPTURE != aFlags && mParent != nsnull) { - mRet = mParent->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, DOM_EVENT_BUBBLE, aEventStatus); + ret = mParent->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, DOM_EVENT_BUBBLE, aEventStatus); } if (DOM_EVENT_INIT == aFlags) { // We're leaving the DOM event loop so if we created a DOM event, release here. if (nsnull != *aDOMEvent) { - if (0 != (*aDOMEvent)->Release()) { + nsrefcnt rc; + nsIDOMEvent* DOMEvent = *aDOMEvent; + // Release the copy since the macro will null the pointer + NS_RELEASE2(DOMEvent, rc); + if (0 != rc) { //Okay, so someone in the DOM loop (a listener, JS object) still has a ref to the DOM Event but //the internal data hasn't been malloc'd. Force a copy of the data here so the DOM Event is still valid. - nsIPrivateDOMEvent *mPrivateEvent; - if (NS_OK == (*aDOMEvent)->QueryInterface(kIPrivateDOMEventIID, (void**)&mPrivateEvent)) { - mPrivateEvent->DuplicatePrivateData(); - NS_RELEASE(mPrivateEvent); + nsIPrivateDOMEvent *privateEvent; + if (NS_OK == (*aDOMEvent)->QueryInterface(kIPrivateDOMEventIID, (void**)&privateEvent)) { + privateEvent->DuplicatePrivateData(); + NS_RELEASE(privateEvent); } } } aDOMEvent = nsnull; } - return mRet; + return ret; } // XXX i18n: this is wrong (?) because we need to know the outgoing diff --git a/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp b/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp index fec252a2ddc..1be157ae0c4 100644 --- a/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp +++ b/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp @@ -1055,44 +1055,7 @@ nsGenericHTMLElement::SetDocument(nsIDocument* aDocument) { mDocument = aDocument; - // Once the element is added to the doc tree we need to check if - // event handler were registered on it. Unfortunately, this means - // doing a GetAttribute for every type of handler. if ((nsnull != mDocument) && (nsnull != mAttributes)) { - nsHTMLValue val; - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onclick, val)) - AddScriptEventListener(nsHTMLAtoms::onclick, val, kIDOMMouseListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::ondblclick, val)) - AddScriptEventListener(nsHTMLAtoms::onclick, val, kIDOMMouseListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onmousedown, val)) - AddScriptEventListener(nsHTMLAtoms::onmousedown, val, kIDOMMouseListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onmouseup, val)) - AddScriptEventListener(nsHTMLAtoms::onmouseup, val, kIDOMMouseListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onmouseover, val)) - AddScriptEventListener(nsHTMLAtoms::onmouseover, val, kIDOMMouseListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onmouseout, val)) - AddScriptEventListener(nsHTMLAtoms::onmouseout, val, kIDOMMouseListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onkeydown, val)) - AddScriptEventListener(nsHTMLAtoms::onkeydown, val, kIDOMKeyListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onkeyup, val)) - AddScriptEventListener(nsHTMLAtoms::onkeyup, val, kIDOMKeyListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onkeypress, val)) - AddScriptEventListener(nsHTMLAtoms::onkeypress, val, kIDOMKeyListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onmousemove, val)) - AddScriptEventListener(nsHTMLAtoms::onmousemove, val, kIDOMMouseMotionListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onload, val)) - AddScriptEventListener(nsHTMLAtoms::onload, val, kIDOMLoadListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onunload, val)) - AddScriptEventListener(nsHTMLAtoms::onunload, val, kIDOMLoadListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onabort, val)) - AddScriptEventListener(nsHTMLAtoms::onabort, val, kIDOMLoadListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onerror, val)) - AddScriptEventListener(nsHTMLAtoms::onerror, val, kIDOMLoadListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onfocus, val)) - AddScriptEventListener(nsHTMLAtoms::onfocus, val, kIDOMFocusListenerIID); - if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::onblur, val)) - AddScriptEventListener(nsHTMLAtoms::onblur, val, kIDOMFocusListenerIID); - nsIHTMLStyleSheet* sheet = GetAttrStyleSheet(mDocument); if (nsnull != sheet) { sheet->SetAttributesFor(mContent, mAttributes); // sync attributes with sheet @@ -1257,6 +1220,40 @@ nsGenericHTMLElement::SetAttribute(nsIAtom* aAttribute, NS_RELEASE(css); } else { + // Check for event handlers + if (nsHTMLAtoms::onclick == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onclick, aValue, kIDOMMouseListenerIID); + else if (nsHTMLAtoms::ondblclick == aAttribute) + AddScriptEventListener(nsHTMLAtoms::ondblclick, aValue, kIDOMMouseListenerIID); + else if (nsHTMLAtoms::onmousedown == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onmousedown, aValue, kIDOMMouseListenerIID); + else if (nsHTMLAtoms::onmouseup == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onmouseup, aValue, kIDOMMouseListenerIID); + else if (nsHTMLAtoms::onmouseover == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onmouseover, aValue, kIDOMMouseListenerIID); + else if (nsHTMLAtoms::onmouseout == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onmouseout, aValue, kIDOMMouseListenerIID); + else if (nsHTMLAtoms::onkeydown == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onkeydown, aValue, kIDOMKeyListenerIID); + else if (nsHTMLAtoms::onkeyup == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onkeyup, aValue, kIDOMKeyListenerIID); + else if (nsHTMLAtoms::onkeypress == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onkeypress, aValue, kIDOMKeyListenerIID); + else if (nsHTMLAtoms::onmousemove == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onmousemove, aValue, kIDOMMouseMotionListenerIID); + else if (nsHTMLAtoms::onload == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onload, aValue, kIDOMLoadListenerIID); + else if (nsHTMLAtoms::onunload == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onunload, aValue, kIDOMLoadListenerIID); + else if (nsHTMLAtoms::onabort == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onabort, aValue, kIDOMLoadListenerIID); + else if (nsHTMLAtoms::onerror == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onerror, aValue, kIDOMLoadListenerIID); + else if (nsHTMLAtoms::onfocus == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onfocus, aValue, kIDOMFocusListenerIID); + else if (nsHTMLAtoms::onblur == aAttribute) + AddScriptEventListener(nsHTMLAtoms::onblur, aValue, kIDOMFocusListenerIID); + nsHTMLValue val; if (NS_CONTENT_ATTR_NOT_THERE != mContent->StringToAttribute(aAttribute, aValue, val)) { @@ -2174,7 +2171,7 @@ nsGenericHTMLElement::Release() nsresult nsGenericHTMLElement::AddScriptEventListener(nsIAtom* aAttribute, - nsHTMLValue& aValue, + const nsString& aValue, REFNSIID aIID) { nsresult ret = NS_OK; @@ -2193,9 +2190,7 @@ nsGenericHTMLElement::AddScriptEventListener(nsIAtom* aAttribute, if (NS_OK == receiver->GetListenerManager(&manager)) { nsIScriptObjectOwner *mObjectOwner; if (NS_OK == global->QueryInterface(kIScriptObjectOwnerIID, (void**)&mObjectOwner)) { - nsString value; - aValue.GetStringValue(value); - ret = manager->AddScriptEventListener(context, mObjectOwner, aAttribute, value, aIID); + ret = manager->AddScriptEventListener(context, mObjectOwner, aAttribute, aValue, aIID); NS_RELEASE(mObjectOwner); } NS_RELEASE(manager); @@ -2207,13 +2202,11 @@ nsGenericHTMLElement::AddScriptEventListener(nsIAtom* aAttribute, else { nsIEventListenerManager *manager; if (NS_OK == GetListenerManager(&manager)) { - nsString value; - aValue.GetStringValue(value); nsIScriptObjectOwner* owner; if (NS_OK == mContent->QueryInterface(kIScriptObjectOwnerIID, (void**) &owner)) { ret = manager->AddScriptEventListener(context, owner, - aAttribute, value, aIID); + aAttribute, aValue, aIID); NS_RELEASE(owner); } NS_RELEASE(manager); diff --git a/mozilla/layout/html/content/src/nsGenericHTMLElement.h b/mozilla/layout/html/content/src/nsGenericHTMLElement.h index 442533dd817..8d3c12c9cc3 100644 --- a/mozilla/layout/html/content/src/nsGenericHTMLElement.h +++ b/mozilla/layout/html/content/src/nsGenericHTMLElement.h @@ -179,7 +179,7 @@ public: nsresult RenderFrame(); nsresult AddScriptEventListener(nsIAtom* aAttribute, - nsHTMLValue& aValue, + const nsString& aValue, REFNSIID aIID); nsresult AttributeToString(nsIAtom* aAttribute, diff --git a/mozilla/webshell/public/nsIWebShell.h b/mozilla/webshell/public/nsIWebShell.h index c64d96a9134..27917f79ee0 100644 --- a/mozilla/webshell/public/nsIWebShell.h +++ b/mozilla/webshell/public/nsIWebShell.h @@ -115,6 +115,9 @@ public: NS_IMETHOD Hide() = 0; + NS_IMETHOD SetFocus() = 0; + NS_IMETHOD RemoveFocus() = 0; + NS_IMETHOD Repaint(PRBool aForce) = 0; // SetContextView moved to bottom to keep branch/tip interfaces diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 748e4031176..b1e02558a6e 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -132,6 +132,8 @@ public: NS_IMETHOD MoveTo(PRInt32 aX, PRInt32 aY); NS_IMETHOD Show(); NS_IMETHOD Hide(); + NS_IMETHOD SetFocus(); + NS_IMETHOD RemoveFocus(); NS_IMETHOD Repaint(PRBool aForce); NS_IMETHOD SetContentViewer(nsIContentViewer* aViewer); NS_IMETHOD GetContentViewer(nsIContentViewer*& aResult); @@ -725,6 +727,34 @@ nsWebShell::Hide() return NS_OK; } +NS_IMETHODIMP +nsWebShell::SetFocus() +{ + NS_PRECONDITION(nsnull != mWindow, "null window"); + + if (nsnull != mWindow) { + mWindow->SetFocus(); + } + + return NS_OK; +} + +NS_IMETHODIMP +nsWebShell::RemoveFocus() +{ + NS_PRECONDITION(nsnull != mWindow, "null window"); + + if (nsnull != mWindow) { + nsIWidget *parentWidget = mWindow->GetParent(); + if (nsnull != parentWidget) { + parentWidget->SetFocus(); + NS_RELEASE(parentWidget); + } + } + + return NS_OK; +} + NS_IMETHODIMP nsWebShell::Repaint(PRBool aForce) { diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp index f6f930169a6..3a135fff041 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp @@ -1059,56 +1059,62 @@ nsBrowserWindow::Layout(PRInt32 aWidth, PRInt32 aHeight) txtHeight = 24; } + nsRect rr(0, 0, aWidth, aHeight); nsIWidget* locationWidget = nsnull; if (NS_OK == mLocation->QueryInterface(kIWidgetIID,(void**)&locationWidget)) { // position location bar (it's stretchy) if (mLocation) { - if (mThrobber) { - locationWidget->Resize(2*BUTTON_WIDTH, 0, - aWidth - (2*BUTTON_WIDTH + THROBBER_WIDTH), - BUTTON_HEIGHT, - PR_TRUE); + if (mChromeMask & NS_CHROME_TOOL_BAR_ON) { + if (mThrobber) { + locationWidget->Resize(2*BUTTON_WIDTH, 0, + aWidth - (2*BUTTON_WIDTH + THROBBER_WIDTH), + BUTTON_HEIGHT, + PR_TRUE); + mThrobber->MoveTo(aWidth - THROBBER_WIDTH, 0); + } + else { + locationWidget->Resize(2*BUTTON_WIDTH, 0, + aWidth - 2*BUTTON_WIDTH, + BUTTON_HEIGHT, + PR_TRUE); + } + rr.y += BUTTON_HEIGHT; + rr.height -= BUTTON_HEIGHT; + locationWidget->Show(PR_TRUE); } else { - locationWidget->Resize(2*BUTTON_WIDTH, 0, - aWidth - 2*BUTTON_WIDTH, - BUTTON_HEIGHT, - PR_TRUE); + locationWidget->Show(PR_FALSE); } } + } + + nsIWidget* statusWidget = nsnull; - if (mThrobber) { - mThrobber->MoveTo(aWidth - THROBBER_WIDTH, 0); - } - - nsRect rr(0, 0, aWidth, aHeight); - - if (mLocation) { - rr.y += BUTTON_HEIGHT; - rr.height -= BUTTON_HEIGHT; - } - - nsIWidget* statusWidget = nsnull; - - if (NS_OK == mStatus->QueryInterface(kIWidgetIID,(void**)&statusWidget)) - { - if (mStatus) { + if (NS_OK == mStatus->QueryInterface(kIWidgetIID,(void**)&statusWidget)) + { + if (mStatus) { + if (mChromeMask & NS_CHROME_STATUS_BAR_ON) { statusWidget->Resize(0, aHeight - txtHeight, aWidth, txtHeight, PR_TRUE); rr.height -= txtHeight; + statusWidget->Show(PR_TRUE); + } + else { + statusWidget->Show(PR_FALSE); } } - // inset the web widget - rr.x += WEBSHELL_LEFT_INSET; - rr.y += WEBSHELL_TOP_INSET; - rr.width -= WEBSHELL_LEFT_INSET + WEBSHELL_RIGHT_INSET; - rr.height -= WEBSHELL_TOP_INSET + WEBSHELL_BOTTOM_INSET; - mWebShell->SetBounds(rr.x, rr.y, rr.width, rr.height); - NS_RELEASE(locationWidget); } + + // inset the web widget + rr.x += WEBSHELL_LEFT_INSET; + rr.y += WEBSHELL_TOP_INSET; + rr.width -= WEBSHELL_LEFT_INSET + WEBSHELL_RIGHT_INSET; + rr.height -= WEBSHELL_TOP_INSET + WEBSHELL_BOTTOM_INSET; + mWebShell->SetBounds(rr.x, rr.y, rr.width, rr.height); + NS_IF_RELEASE(locationWidget); } NS_IMETHODIMP @@ -1183,8 +1189,11 @@ nsBrowserWindow::Close() NS_IMETHODIMP nsBrowserWindow::SetChrome(PRUint32 aChromeMask) { - // XXX write me mChromeMask = aChromeMask; + nsRect r; + mWindow->GetBounds(r); + Layout(r.width, r.height); + return NS_OK; } diff --git a/mozilla/webshell/tests/viewer/nsEditorMode.cpp b/mozilla/webshell/tests/viewer/nsEditorMode.cpp index bde46ff8f4d..93105a4a1b3 100644 --- a/mozilla/webshell/tests/viewer/nsEditorMode.cpp +++ b/mozilla/webshell/tests/viewer/nsEditorMode.cpp @@ -130,7 +130,7 @@ nsresult nsGetCurrentNode(nsIDOMNode ** aNode) } /* If no node set, get first text node */ - nsIDOMNode *mDocNode, *mFirstTextNode; + nsIDOMNode *mDocNode = nsnull, *mFirstTextNode; if (NS_OK == kDomDoc->GetFirstChild(&mDocNode) && NS_OK == GetFirstTextNode(mDocNode, &mFirstTextNode)) { @@ -156,7 +156,7 @@ nsresult nsSetCurrentNode(nsIDOMNode * aNode) nsresult nsAppendText(nsString *aStr) { - nsIDOMNode *mNode; + nsIDOMNode *mNode = nsnull; nsIDOMText *mText; if (NS_OK == nsGetCurrentNode(&mNode) &&