зеркало из https://github.com/mozilla/pjs.git
Landing changes Vidur made while the tree was closed for beta1 work, here's a list of the changes. r=me
[1] Cutting down the size of content. Made nsIJSScriptObject inherit from nsIScriptObjectOwner [2] Cutting down the size of content. Made nsITextContent inherit from nsIContent. [3] Cutting down the size of content. Moved implementation of nsIDOMReceiver to nsListenerManager. This is not true aggregation since it isn't transitive, but it's OK for now. It will be necessary for nsListenerManager to have a reference to its content in the future anyway, so the transitivity could be done. dom/public/nsDOMPropEnums.h,v - bug 12559 dom/public/nsIJSScriptObject.h,v - [1] dom/public/html/MANIFEST,v - bug 12559 dom/public/html/Makefile.in,v - bug 12559 dom/public/html/makefile.win,v - bug 12559 dom/public/html/nsIDOMHTMLInputElement.h,v - bug 17544 dom/public/idl/html/HTMLAnchorElement.idl,v - bug 12559 dom/public/idl/html/HTMLAreaElement.idl,v - bug 12559 dom/public/idl/html/HTMLInputElement.idl,v - bug 17544 dom/src/base/nsGlobalWindow.cpp,v - bug 30700 dom/src/base/nsGlobalWindow.h,v - [1] dom/src/base/nsLocation.cpp,v - [1] dom/src/html/nsJSHTMLAnchorElement.cpp,v - bug 12559 dom/src/html/nsJSHTMLAreaElement.cpp,v - bug 12559 dom/src/html/nsJSHTMLInputElement.cpp,v - bug 17544 layout/base/public/nsIDocument.h,v - bug 27953 layout/base/public/nsITextContent.h,v - [2] layout/base/src/nsCommentNode.cpp,v - [2] layout/base/src/nsDocument.cpp,v - bug 27953 layout/base/src/nsDocument.h,v - bug 27953 layout/base/src/nsDocumentViewer.cpp,v - bug 27953 layout/base/src/nsGenericDOMDataNode.cpp,v - [3] layout/base/src/nsGenericDOMDataNode.h,v - [3] layout/base/src/nsGenericElement.cpp,v - [3] layout/base/src/nsGenericElement.h,v - [3] layout/base/src/nsNameSpaceManager.cpp,v - bug 7834 layout/base/src/nsStyleContext.cpp,v - outline property shouldn't reflow layout/base/src/nsTextNode.cpp,v - [2] layout/events/src/nsEventListenerManager.cpp,v - [3] layout/events/src/nsEventListenerManager.h,v - [3] layout/html/base/src/nsGfxScrollFrame.cpp,v - nsString->nsAutoString layout/html/content/src/nsAttributeContent.cpp,v - [2] layout/html/content/src/nsHTMLAnchorElement.cpp,v - [1][3] layout/html/content/src/nsHTMLAppletElement.cpp,v - [1][3] layout/html/content/src/nsHTMLAreaElement.cpp,v - [1][3] layout/html/content/src/nsHTMLBRElement.cpp,v - [1][3] layout/html/content/src/nsHTMLBaseElement.cpp,v - [1][3] layout/html/content/src/nsHTMLBaseFontElement.cpp,v - [1][3] layout/html/content/src/nsHTMLBodyElement.cpp,v - [1][3] layout/html/content/src/nsHTMLButtonElement.cpp,v - [1][3] layout/html/content/src/nsHTMLDListElement.cpp,v - [1][3] layout/html/content/src/nsHTMLDelElement.cpp,v - [1][3] layout/html/content/src/nsHTMLDirectoryElement.cpp,v - [1][3] layout/html/content/src/nsHTMLDivElement.cpp,v - [1][3] layout/html/content/src/nsHTMLEmbedElement.cpp,v - [1][3] layout/html/content/src/nsHTMLFieldSetElement.cpp,v - [1][3] layout/html/content/src/nsHTMLFontElement.cpp,v - [1][3] layout/html/content/src/nsHTMLFormElement.cpp,v - [1][3] layout/html/content/src/nsHTMLFrameElement.cpp,v - [1][3] layout/html/content/src/nsHTMLFrameSetElement.cpp,v - [1][3] layout/html/content/src/nsHTMLHRElement.cpp,v - [1][3] layout/html/content/src/nsHTMLHeadElement.cpp,v - [1][3] layout/html/content/src/nsHTMLHeadingElement.cpp,v - [1][3] layout/html/content/src/nsHTMLHtmlElement.cpp,v - [1][3] layout/html/content/src/nsHTMLIFrameElement.cpp,v - [1][3] layout/html/content/src/nsHTMLImageElement.cpp,v - [1][3] layout/html/content/src/nsHTMLInputElement.cpp,v - [1][3] layout/html/content/src/nsHTMLInsElement.cpp,v - [1][3] layout/html/content/src/nsHTMLIsIndexElement.cpp,v - [1][3] layout/html/content/src/nsHTMLLIElement.cpp,v - [1][3] layout/html/content/src/nsHTMLLabelElement.cpp,v - [1][3] layout/html/content/src/nsHTMLLayerElement.cpp,v - [1][3] layout/html/content/src/nsHTMLLegendElement.cpp,v - [1][3] layout/html/content/src/nsHTMLLinkElement.cpp,v - [1][3] layout/html/content/src/nsHTMLMapElement.cpp,v - [1][3] layout/html/content/src/nsHTMLMenuElement.cpp,v - [1][3] layout/html/content/src/nsHTMLMetaElement.cpp,v - [1][3] layout/html/content/src/nsHTMLModElement.cpp,v - [1][3] layout/html/content/src/nsHTMLOListElement.cpp,v - [1][3] layout/html/content/src/nsHTMLObjectElement.cpp,v - [1][3] layout/html/content/src/nsHTMLOptGroupElement.cpp,v - [1][3] layout/html/content/src/nsHTMLOptionElement.cpp,v - [1][3] layout/html/content/src/nsHTMLParagraphElement.cpp,v - [1][3] layout/html/content/src/nsHTMLParamElement.cpp,v - [1][3] layout/html/content/src/nsHTMLPreElement.cpp,v - [1][3] layout/html/content/src/nsHTMLQuoteElement.cpp,v - [1][3] layout/html/content/src/nsHTMLScriptElement.cpp,v - [1][3] layout/html/content/src/nsHTMLSelectElement.cpp,v - [1][3] layout/html/content/src/nsHTMLSpacerElement.cpp,v - [1][3] layout/html/content/src/nsHTMLSpanElement.cpp,v - [1][3] layout/html/content/src/nsHTMLStyleElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableCaptionElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableCellElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableColElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableColGroupElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableRowElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableSectionElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTextAreaElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTitleElement.cpp,v - [1][3] layout/html/content/src/nsHTMLUListElement.cpp,v - [1][3] layout/html/content/src/nsHTMLWBRElement.cpp,v - [1][3] layout/html/document/src/nsHTMLDocument.cpp,v - bug 27953 layout/html/document/src/nsHTMLDocument.h,v - bug 27953 layout/xml/content/src/nsXMLCDATASection.cpp,v - [1][2] layout/xml/content/src/nsXMLDocumentType.cpp,v - [1][2] layout/xml/content/src/nsXMLElement.h,v - [1][2] layout/xml/content/src/nsXMLEntity.cpp,v - [1][2] layout/xml/content/src/nsXMLNotation.cpp,v - [1][2] layout/xml/content/src/nsXMLProcessingInstruction.cpp,v - [1][2] layout/xul/base/src/nsBoxFrame.cpp,v - nsString->nsAutoString layout/xul/base/src/nsSliderFrame.cpp,v - nsString->nsAutoString netwerk/protocol/http/src/nsHTTPRequest.cpp,v - nsString->nsAutoString rdf/content/src/nsXULDocument.cpp,v - bug 27953 rdf/content/src/nsXULDocument.h,v - bug 27953 rdf/content/src/nsXULElement.h,v - [1] xpcom/base/IIDS.h,v - bug 12559
This commit is contained in:
Родитель
aac37fb734
Коммит
b768001187
|
@ -98,6 +98,8 @@ public:
|
|||
nsISupports* aContainer,
|
||||
nsIStreamListener **aDocListener) = 0;
|
||||
|
||||
NS_IMETHOD StopDocumentLoad() = 0;
|
||||
|
||||
/**
|
||||
* Return the title of the document. May return null.
|
||||
*/
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
#define nsITextContent_h___
|
||||
|
||||
#include "nslayout.h"
|
||||
#include "nsIContent.h"
|
||||
class nsString;
|
||||
class nsTextFragment;
|
||||
class nsIContent;
|
||||
|
||||
// IID for the nsITextContent interface
|
||||
#define NS_ITEXT_CONTENT_IID \
|
||||
|
@ -35,7 +35,7 @@ class nsIContent;
|
|||
* Interface for textual content. This interface is used to provide
|
||||
* an efficient access to text content.
|
||||
*/
|
||||
class nsITextContent : public nsISupports {
|
||||
class nsITextContent : public nsIContent {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_ITEXT_CONTENT_IID; return iid; }
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);
|
|||
|
||||
class nsCommentNode : public nsIDOMComment,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIContent,
|
||||
public nsITextContent
|
||||
{
|
||||
public:
|
||||
|
@ -61,9 +59,6 @@ public:
|
|||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
// nsIContent
|
||||
//NS_IMPL_ICONTENT_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
|
|
|
@ -848,7 +848,7 @@ nsDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
NS_IMETHODIMP
|
||||
nsDocument::StartDocumentLoad(const char* aCommand,
|
||||
nsIChannel* aChannel,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
|
@ -858,6 +858,12 @@ nsDocument::StartDocumentLoad(const char* aCommand,
|
|||
return Reset(aChannel, aLoadGroup);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::StopDocumentLoad()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
const nsString* nsDocument::GetDocumentTitle() const
|
||||
{
|
||||
return mDocumentTitle;
|
||||
|
|
|
@ -110,7 +110,6 @@ class nsDocument : public nsIDocument,
|
|||
public nsIDOMDocument,
|
||||
public nsIDOMNSDocument,
|
||||
public nsIDiskDocument,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIJSScriptObject,
|
||||
public nsSupportsWeakReference,
|
||||
public nsIDOMEventReceiver,
|
||||
|
@ -127,6 +126,8 @@ public:
|
|||
nsISupports* aContainer,
|
||||
nsIStreamListener **aDocListener);
|
||||
|
||||
NS_IMETHOD StopDocumentLoad();
|
||||
|
||||
/**
|
||||
* Return the title of the document. May return null.
|
||||
*/
|
||||
|
|
|
@ -537,6 +537,10 @@ DocumentViewerImpl::Init(nsIWidget* aParentWidget,
|
|||
NS_IMETHODIMP
|
||||
DocumentViewerImpl::Stop(void)
|
||||
{
|
||||
if (mDocument) {
|
||||
mDocument->StopDocumentLoad();
|
||||
}
|
||||
|
||||
if (mPresContext) {
|
||||
mPresContext->Stop();
|
||||
}
|
||||
|
|
|
@ -494,8 +494,6 @@ nsGenericDOMDataNode::SetScriptObject(void *aScriptObject)
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// nsIDOMEventReceiver implementation
|
||||
|
||||
nsresult
|
||||
nsGenericDOMDataNode::GetListenerManager(nsIEventListenerManager** aResult)
|
||||
{
|
||||
|
@ -512,72 +510,6 @@ nsGenericDOMDataNode::GetListenerManager(nsIEventListenerManager** aResult)
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericDOMDataNode::GetNewListenerManager(nsIEventListenerManager** aResult)
|
||||
{
|
||||
return NS_NewEventListenerManager(aResult);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericDOMDataNode::HandleEvent(nsIDOMEvent *aEvent)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericDOMDataNode::AddEventListenerByIID(nsIDOMEventListener* aListener,
|
||||
const nsIID& aIID)
|
||||
{
|
||||
nsIEventListenerManager *manager;
|
||||
|
||||
if (NS_OK == GetListenerManager(&manager)) {
|
||||
manager->AddEventListenerByIID(aListener, aIID, NS_EVENT_FLAG_BUBBLE);
|
||||
NS_RELEASE(manager);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericDOMDataNode::RemoveEventListenerByIID(nsIDOMEventListener* aListener,
|
||||
const nsIID& aIID)
|
||||
{
|
||||
if (nsnull != mListenerManager) {
|
||||
mListenerManager->RemoveEventListenerByIID(aListener, aIID, NS_EVENT_FLAG_BUBBLE);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericDOMDataNode::AddEventListener(const nsString& aType, nsIDOMEventListener* aListener,
|
||||
PRBool aUseCapture)
|
||||
{
|
||||
nsIEventListenerManager *manager;
|
||||
|
||||
if (NS_OK == GetListenerManager(&manager)) {
|
||||
PRInt32 flags = aUseCapture ? NS_EVENT_FLAG_CAPTURE : NS_EVENT_FLAG_BUBBLE;
|
||||
|
||||
manager->AddEventListenerByType(aListener, aType, flags);
|
||||
NS_RELEASE(manager);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericDOMDataNode::RemoveEventListener(const nsString& aType, nsIDOMEventListener* aListener,
|
||||
PRBool aUseCapture)
|
||||
{
|
||||
if (nsnull != mListenerManager) {
|
||||
PRInt32 flags = aUseCapture ? NS_EVENT_FLAG_CAPTURE : NS_EVENT_FLAG_BUBBLE;
|
||||
|
||||
mListenerManager->RemoveEventListenerByType(aListener, aType, flags);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// Implementation of nsIContent
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#ifndef nsGenericDOMDataNode_h___
|
||||
#define nsGenericDOMDataNode_h___
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDOMCharacterData.h"
|
||||
#include "nsIScriptObjectOwner.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
|
@ -31,6 +32,7 @@
|
|||
#include "nsINameSpaceManager.h"
|
||||
#include "nsITextContent.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
|
||||
extern const nsIID kIDOMCharacterDataIID;
|
||||
extern const nsIID kIDOMNodeIID;
|
||||
|
@ -43,7 +45,6 @@ extern const nsIID kIContentIID;
|
|||
class nsIDOMAttr;
|
||||
class nsIDOMEventListener;
|
||||
class nsIDOMNodeList;
|
||||
class nsIEventListenerManager;
|
||||
class nsIFrame;
|
||||
class nsIStyleContext;
|
||||
class nsIStyleRule;
|
||||
|
@ -105,19 +106,6 @@ struct nsGenericDOMDataNode {
|
|||
nsresult DeleteData(PRUint32 aOffset, PRUint32 aCount);
|
||||
nsresult ReplaceData(PRUint32 aOffset, PRUint32 aCount, const nsString& aArg);
|
||||
|
||||
// nsIDOMEventReceiver interface
|
||||
nsresult AddEventListenerByIID(nsIDOMEventListener *aListener, const nsIID& aIID);
|
||||
nsresult RemoveEventListenerByIID(nsIDOMEventListener* aListener,
|
||||
const nsIID& aIID);
|
||||
nsresult GetListenerManager(nsIEventListenerManager** aInstancePtrResult);
|
||||
nsresult GetNewListenerManager(nsIEventListenerManager** aInstancePtrResult);
|
||||
nsresult HandleEvent(nsIDOMEvent *aEvent);
|
||||
|
||||
// nsIDOMEventTarget interface
|
||||
nsresult AddEventListener(const nsString& aType, nsIDOMEventListener* aListener,
|
||||
PRBool aUseCapture);
|
||||
nsresult RemoveEventListener(const nsString& aType, nsIDOMEventListener* aListener,
|
||||
PRBool aUseCapture);
|
||||
|
||||
// nsIScriptObjectOwner interface
|
||||
nsresult GetScriptObject(nsIScriptContext* aContext, void** aScriptObject);
|
||||
|
@ -227,6 +215,8 @@ struct nsGenericDOMDataNode {
|
|||
|
||||
//----------------------------------------
|
||||
|
||||
nsresult GetListenerManager(nsIEventListenerManager** aInstancePtrResult);
|
||||
|
||||
void ToCString(nsString& aBuf, PRInt32 aOffset, PRInt32 aLen) const;
|
||||
|
||||
// Up pointer to the real content object that we are
|
||||
|
@ -549,16 +539,18 @@ struct nsGenericDOMDataNode {
|
|||
return NS_OK; \
|
||||
} \
|
||||
if (_id.Equals(kIDOMEventReceiverIID)) { \
|
||||
nsIDOMEventReceiver* tmp = _this; \
|
||||
*_iptr = (void*) tmp; \
|
||||
NS_ADDREF_THIS(); \
|
||||
return NS_OK; \
|
||||
nsCOMPtr<nsIEventListenerManager> man; \
|
||||
if (NS_SUCCEEDED(mInner.GetListenerManager(getter_AddRefs(man)))){ \
|
||||
return man->QueryInterface(kIDOMEventReceiverIID, (void**)_iptr); \
|
||||
} \
|
||||
return NS_NOINTERFACE; \
|
||||
} \
|
||||
if (_id.Equals(kIDOMEventTargetIID)) { \
|
||||
nsIDOMEventTarget* tmp = _this; \
|
||||
*_iptr = (void*) tmp; \
|
||||
NS_ADDREF_THIS(); \
|
||||
return NS_OK; \
|
||||
nsCOMPtr<nsIEventListenerManager> man; \
|
||||
if (NS_SUCCEEDED(mInner.GetListenerManager(getter_AddRefs(man)))){ \
|
||||
return man->QueryInterface(kIDOMEventTargetIID, (void**)_iptr); \
|
||||
} \
|
||||
return NS_NOINTERFACE; \
|
||||
} \
|
||||
if (_id.Equals(kIScriptObjectOwnerIID)) { \
|
||||
nsIScriptObjectOwner* tmp = _this; \
|
||||
|
|
|
@ -380,7 +380,6 @@ nsGenericElement::nsGenericElement()
|
|||
mTag = nsnull;
|
||||
mContent = nsnull;
|
||||
mDOMSlots = nsnull;
|
||||
mListenerManager = nsnull;
|
||||
mContentID = 0;
|
||||
}
|
||||
|
||||
|
@ -389,7 +388,6 @@ nsGenericElement::~nsGenericElement()
|
|||
// pop any enclosed ranges out
|
||||
// nsRange::OwnerGone(mContent); not used for now
|
||||
NS_IF_RELEASE(mTag);
|
||||
NS_IF_RELEASE(mListenerManager);
|
||||
if (nsnull != mDOMSlots) {
|
||||
if (nsnull != mDOMSlots->mChildNodes) {
|
||||
mDOMSlots->mChildNodes->DropReference();
|
||||
|
@ -404,6 +402,7 @@ nsGenericElement::~nsGenericElement()
|
|||
mDOMSlots->mAttributeMap->DropReference();
|
||||
NS_RELEASE(mDOMSlots->mAttributeMap);
|
||||
}
|
||||
NS_IF_RELEASE(mDOMSlots->mListenerManager);
|
||||
// XXX Should really be arena managed
|
||||
PR_DELETE(mDOMSlots);
|
||||
}
|
||||
|
@ -420,11 +419,27 @@ nsGenericElement::GetDOMSlots()
|
|||
mDOMSlots->mAttributeMap = nsnull;
|
||||
mDOMSlots->mRangeList = nsnull;
|
||||
mDOMSlots->mCapturer = nsnull;
|
||||
mDOMSlots->mListenerManager = nsnull;
|
||||
}
|
||||
|
||||
return mDOMSlots;
|
||||
}
|
||||
|
||||
void
|
||||
nsGenericElement::MaybeClearDOMSlots()
|
||||
{
|
||||
if (mDOMSlots &&
|
||||
(nsnull == mDOMSlots->mScriptObject) &&
|
||||
(nsnull == mDOMSlots->mChildNodes) &&
|
||||
(nsnull == mDOMSlots->mStyle) &&
|
||||
(nsnull == mDOMSlots->mAttributeMap) &&
|
||||
(nsnull == mDOMSlots->mRangeList) &&
|
||||
(nsnull == mDOMSlots->mCapturer) &&
|
||||
(nsnull == mDOMSlots->mListenerManager)) {
|
||||
PR_DELETE(mDOMSlots);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsGenericElement::Init(nsIContent* aOuterContentObject,
|
||||
nsIAtom* aTag)
|
||||
|
@ -1004,9 +1019,9 @@ nsGenericElement::HandleDOMEvent(nsIPresContext* aPresContext,
|
|||
}
|
||||
|
||||
//Local handling stage
|
||||
if (mListenerManager && !(aEvent->flags & NS_EVENT_FLAG_STOP_DISPATCH)) {
|
||||
if (mDOMSlots && mDOMSlots->mListenerManager && !(aEvent->flags & NS_EVENT_FLAG_STOP_DISPATCH)) {
|
||||
aEvent->flags |= aFlags;
|
||||
mListenerManager->HandleEvent(aPresContext, aEvent, aDOMEvent, aFlags, aEventStatus);
|
||||
mDOMSlots->mListenerManager->HandleEvent(aPresContext, aEvent, aDOMEvent, aFlags, aEventStatus);
|
||||
aEvent->flags &= ~aFlags;
|
||||
}
|
||||
|
||||
|
@ -1090,11 +1105,7 @@ nsGenericElement::RangeRemove(nsIDOMRange& aRange)
|
|||
if (mDOMSlots->mRangeList->Count() == 0) {
|
||||
delete mDOMSlots->mRangeList;
|
||||
mDOMSlots->mRangeList = nsnull;
|
||||
if ( (mDOMSlots->mScriptObject == nsnull) &&
|
||||
(mDOMSlots->mChildNodes == nsnull) &&
|
||||
(mDOMSlots->mStyle == nsnull) ) {
|
||||
PR_DELETE(mDOMSlots);
|
||||
}
|
||||
MaybeClearDOMSlots();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -1220,9 +1231,10 @@ nsGenericElement::SetScriptObject(void *aScriptObject)
|
|||
slots->mScriptObject = aScriptObject;
|
||||
|
||||
if (!aScriptObject) {
|
||||
if (mListenerManager) {
|
||||
mListenerManager->RemoveAllListeners(PR_TRUE);
|
||||
if (slots->mListenerManager) {
|
||||
slots->mListenerManager->RemoveAllListeners(PR_TRUE);
|
||||
}
|
||||
MaybeClearDOMSlots();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -1230,90 +1242,24 @@ nsGenericElement::SetScriptObject(void *aScriptObject)
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// nsIDOMEventReceiver implementation
|
||||
|
||||
nsresult
|
||||
nsGenericElement::GetListenerManager(nsIEventListenerManager** aResult)
|
||||
{
|
||||
if (nsnull != mListenerManager) {
|
||||
NS_ADDREF(mListenerManager);
|
||||
*aResult = mListenerManager;
|
||||
nsDOMSlots *slots = GetDOMSlots();
|
||||
|
||||
if (nsnull != slots->mListenerManager) {
|
||||
NS_ADDREF(slots->mListenerManager);
|
||||
*aResult = slots->mListenerManager;
|
||||
return NS_OK;
|
||||
}
|
||||
nsresult rv = NS_NewEventListenerManager(aResult);
|
||||
if (NS_OK == rv) {
|
||||
mListenerManager = *aResult;
|
||||
NS_ADDREF(mListenerManager);
|
||||
slots->mListenerManager = *aResult;
|
||||
NS_ADDREF(slots->mListenerManager);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericElement::GetNewListenerManager(nsIEventListenerManager** aResult)
|
||||
{
|
||||
return NS_NewEventListenerManager(aResult);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericElement::HandleEvent(nsIDOMEvent *aEvent)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericElement::AddEventListenerByIID(nsIDOMEventListener* aListener,
|
||||
const nsIID& aIID)
|
||||
{
|
||||
nsIEventListenerManager *manager;
|
||||
|
||||
if (NS_OK == GetListenerManager(&manager)) {
|
||||
manager->AddEventListenerByIID(aListener, aIID, NS_EVENT_FLAG_BUBBLE);
|
||||
NS_RELEASE(manager);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericElement::RemoveEventListenerByIID(nsIDOMEventListener* aListener,
|
||||
const nsIID& aIID)
|
||||
{
|
||||
if (nsnull != mListenerManager) {
|
||||
mListenerManager->RemoveEventListenerByIID(aListener, aIID, NS_EVENT_FLAG_BUBBLE);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericElement::AddEventListener(const nsString& aType, nsIDOMEventListener* aListener,
|
||||
PRBool aUseCapture)
|
||||
{
|
||||
nsIEventListenerManager *manager;
|
||||
|
||||
if (NS_OK == GetListenerManager(&manager)) {
|
||||
PRInt32 flags = aUseCapture ? NS_EVENT_FLAG_CAPTURE : NS_EVENT_FLAG_BUBBLE;
|
||||
|
||||
manager->AddEventListenerByType(aListener, aType, flags);
|
||||
NS_RELEASE(manager);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericElement::RemoveEventListener(const nsString& aType, nsIDOMEventListener* aListener,
|
||||
PRBool aUseCapture)
|
||||
{
|
||||
if (nsnull != mListenerManager) {
|
||||
PRInt32 flags = aUseCapture ? NS_EVENT_FLAG_CAPTURE : NS_EVENT_FLAG_BUBBLE;
|
||||
|
||||
mListenerManager->RemoveEventListenerByType(aListener, aType, flags);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// nsIJSScriptObject implementation
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#ifndef nsGenericElement_h___
|
||||
#define nsGenericElement_h___
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDOMAttr.h"
|
||||
#include "nsIDOMNamedNodeMap.h"
|
||||
|
@ -32,6 +33,7 @@
|
|||
#include "nsIJSScriptObject.h"
|
||||
#include "nsILinkHandler.h"
|
||||
#include "nsGenericDOMNodeList.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
|
||||
extern const nsIID kIDOMNodeIID;
|
||||
extern const nsIID kIDOMElementIID;
|
||||
|
@ -44,7 +46,6 @@ extern const nsIID kIContentIID;
|
|||
|
||||
class nsIDOMAttr;
|
||||
class nsIDOMEventListener;
|
||||
class nsIEventListenerManager;
|
||||
class nsIFrame;
|
||||
class nsISupportsArray;
|
||||
class nsIDOMScriptObjectFactory;
|
||||
|
@ -115,14 +116,12 @@ typedef struct {
|
|||
nsDOMAttributeMap* mAttributeMap;
|
||||
nsVoidArray *mRangeList;
|
||||
nsIContent* mCapturer;
|
||||
nsIEventListenerManager* mListenerManager;
|
||||
} nsDOMSlots;
|
||||
|
||||
class nsGenericElement : public nsIJSScriptObject {
|
||||
class nsGenericElement {
|
||||
public:
|
||||
nsGenericElement();
|
||||
#if 1
|
||||
virtual // XXX temporary until vidur fixes this up
|
||||
#endif
|
||||
~nsGenericElement();
|
||||
|
||||
void Init(nsIContent* aOuterContentObject, nsIAtom* aTag);
|
||||
|
@ -151,20 +150,6 @@ public:
|
|||
nsIDOMNodeList** aReturn);
|
||||
nsresult Normalize();
|
||||
|
||||
// nsIDOMEventReceiver interface
|
||||
nsresult AddEventListenerByIID(nsIDOMEventListener *aListener, const nsIID& aIID);
|
||||
nsresult RemoveEventListenerByIID(nsIDOMEventListener* aListener,
|
||||
const nsIID& aIID);
|
||||
nsresult GetListenerManager(nsIEventListenerManager** aInstancePtrResult);
|
||||
nsresult GetNewListenerManager(nsIEventListenerManager** aInstancePtrResult);
|
||||
nsresult HandleEvent(nsIDOMEvent *aEvent);
|
||||
|
||||
// nsIDOMEventTarget interface
|
||||
nsresult AddEventListener(const nsString& aType, nsIDOMEventListener* aListener,
|
||||
PRBool aUseCapture);
|
||||
nsresult RemoveEventListener(const nsString& aType, nsIDOMEventListener* aListener,
|
||||
PRBool aUseCapture);
|
||||
|
||||
// nsIScriptObjectOwner interface
|
||||
nsresult GetScriptObject(nsIScriptContext* aContext, void** aScriptObject);
|
||||
nsresult SetScriptObject(void *aScriptObject);
|
||||
|
@ -223,6 +208,8 @@ public:
|
|||
|
||||
//----------------------------------------
|
||||
|
||||
nsresult GetListenerManager(nsIEventListenerManager** aInstancePtrResult);
|
||||
|
||||
nsresult RenderFrame(nsIPresContext*);
|
||||
|
||||
nsresult AddScriptEventListener(nsIAtom* aAttribute,
|
||||
|
@ -249,6 +236,7 @@ public:
|
|||
static nsIAtom* CutNameSpacePrefix(nsString& aString);
|
||||
|
||||
nsDOMSlots *GetDOMSlots();
|
||||
void MaybeClearDOMSlots();
|
||||
|
||||
// Up pointer to the real content object that we are
|
||||
// supporting. Sometimes there is work that we just can't do
|
||||
|
@ -256,10 +244,9 @@ public:
|
|||
// work.
|
||||
nsIContent* mContent;
|
||||
|
||||
nsIDocument* mDocument;
|
||||
nsIContent* mParent;
|
||||
nsIDocument* mDocument; // WEAK
|
||||
nsIContent* mParent; // WEAK
|
||||
nsIAtom* mTag;
|
||||
nsIEventListenerManager* mListenerManager;
|
||||
nsDOMSlots *mDOMSlots;
|
||||
PRUint32 mContentID;
|
||||
};
|
||||
|
@ -913,6 +900,37 @@ public:
|
|||
return _g.SetScriptObject(aScriptObject); \
|
||||
}
|
||||
|
||||
#define NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(_g) \
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(_g) \
|
||||
virtual PRBool AddProperty(JSContext *aContext, JSObject *aObj, \
|
||||
jsval aID, jsval *aVp) { \
|
||||
return _g.AddProperty(aContext, aObj, aID, aVp); \
|
||||
} \
|
||||
virtual PRBool DeleteProperty(JSContext *aContext, JSObject *aObj, \
|
||||
jsval aID, jsval *aVp) { \
|
||||
return _g.DeleteProperty(aContext, aObj, aID, aVp); \
|
||||
} \
|
||||
virtual PRBool GetProperty(JSContext *aContext, JSObject *aObj, \
|
||||
jsval aID, jsval *aVp) { \
|
||||
return _g.GetProperty(aContext, aObj, aID, aVp); \
|
||||
} \
|
||||
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj, \
|
||||
jsval aID, jsval *aVp) { \
|
||||
return _g.SetProperty(aContext, aObj, aID, aVp); \
|
||||
} \
|
||||
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj) { \
|
||||
return _g.EnumerateProperty(aContext, aObj); \
|
||||
} \
|
||||
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID) { \
|
||||
return _g.EnumerateProperty(aContext, aObj); \
|
||||
} \
|
||||
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID) { \
|
||||
return _g.EnumerateProperty(aContext, aObj); \
|
||||
} \
|
||||
virtual void Finalize(JSContext *aContext, JSObject *aObj) { \
|
||||
_g.Finalize(aContext, aObj); \
|
||||
}
|
||||
|
||||
#define NS_IMPL_CONTENT_QUERY_INTERFACE(_id, _iptr, _this, _base) \
|
||||
if (_id.Equals(kISupportsIID)) { \
|
||||
_base* tmp = _this; \
|
||||
|
@ -934,16 +952,18 @@ public:
|
|||
return NS_OK; \
|
||||
} \
|
||||
if (_id.Equals(kIDOMEventReceiverIID)) { \
|
||||
nsIDOMEventReceiver* tmp = _this; \
|
||||
*_iptr = (void*) tmp; \
|
||||
NS_ADDREF_THIS(); \
|
||||
return NS_OK; \
|
||||
nsCOMPtr<nsIEventListenerManager> man; \
|
||||
if (NS_SUCCEEDED(mInner.GetListenerManager(getter_AddRefs(man)))){ \
|
||||
return man->QueryInterface(kIDOMEventReceiverIID, (void**)_iptr); \
|
||||
} \
|
||||
return NS_NOINTERFACE; \
|
||||
} \
|
||||
if (_id.Equals(kIDOMEventTargetIID)) { \
|
||||
nsIDOMEventTarget* tmp = _this; \
|
||||
*_iptr = (void*) tmp; \
|
||||
NS_ADDREF_THIS(); \
|
||||
return NS_OK; \
|
||||
nsCOMPtr<nsIEventListenerManager> man; \
|
||||
if (NS_SUCCEEDED(mInner.GetListenerManager(getter_AddRefs(man)))){ \
|
||||
return man->QueryInterface(kIDOMEventTargetIID, (void**)_iptr); \
|
||||
} \
|
||||
return NS_NOINTERFACE; \
|
||||
} \
|
||||
if (_id.Equals(kIScriptObjectOwnerIID)) { \
|
||||
nsIScriptObjectOwner* tmp = _this; \
|
||||
|
@ -959,7 +979,7 @@ public:
|
|||
return NS_OK; \
|
||||
} \
|
||||
if (_id.Equals(kIJSScriptObjectIID)) { \
|
||||
nsIJSScriptObject* tmp = (nsIJSScriptObject*)&mInner; \
|
||||
nsIJSScriptObject* tmp = _this; \
|
||||
*_iptr = (void*) tmp; \
|
||||
NS_ADDREF_THIS(); \
|
||||
return NS_OK; \
|
||||
|
|
|
@ -34,6 +34,7 @@ static NS_DEFINE_IID(kINameSpaceIID, NS_INAMESPACE_IID);
|
|||
static const char kXMLNSNameSpaceURI[] = "<This isn't really a namespace>";
|
||||
static const char kXMLNameSpaceURI[] = "http://www.w3.org/XML/1998/namespace";
|
||||
static const char kHTMLNameSpaceURI[] = "http://www.w3.org/TR/REC-html40"; // XXX?? "urn:w3-org-ns:HTML"??
|
||||
static const char kXHTMLNameSpaceURI[] = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Name Space ID table support
|
||||
|
@ -109,15 +110,19 @@ static void AddRefTable()
|
|||
nsString* xmlns = new nsString(kXMLNSNameSpaceURI);
|
||||
nsString* xml = new nsString(kXMLNameSpaceURI);
|
||||
nsString* html = new nsString(kHTMLNameSpaceURI);
|
||||
nsString* xhtml = new nsString(kXHTMLNameSpaceURI);
|
||||
gURIArray->AppendElement(xmlns); // ordering here needs to match IDs
|
||||
gURIArray->AppendElement(xml);
|
||||
gURIArray->AppendElement(html);
|
||||
gURIArray->AppendElement(xhtml);
|
||||
NameSpaceURIKey xmlnsKey(xmlns);
|
||||
NameSpaceURIKey xmlKey(xml);
|
||||
NameSpaceURIKey htmlKey(html);
|
||||
NameSpaceURIKey xhtmlKey(xhtml);
|
||||
gURIToIDTable->Put(&xmlnsKey, (void*)kNameSpaceID_XMLNS);
|
||||
gURIToIDTable->Put(&xmlKey, (void*)kNameSpaceID_XML);
|
||||
gURIToIDTable->Put(&htmlKey, (void*)kNameSpaceID_HTML);
|
||||
gURIToIDTable->Put(&xhtmlKey, (void*)kNameSpaceID_HTML);
|
||||
}
|
||||
NS_ASSERTION(nsnull != gURIToIDTable, "no URI table");
|
||||
NS_ASSERTION(nsnull != gURIArray, "no URI array");
|
||||
|
|
|
@ -766,7 +766,7 @@ PRInt32 StyleSpacingImpl::CalcDifference(const StyleSpacingImpl& aOther) const
|
|||
(mOutlineStyle != aOther.mOutlineStyle) ||
|
||||
(mOutlineColor != aOther.mOutlineColor) ||
|
||||
(mOutlineRadius != aOther.mOutlineRadius)) {
|
||||
return NS_STYLE_HINT_REFLOW; // XXX: should be VISUAL: see bugs 9809 and 9816
|
||||
return NS_STYLE_HINT_VISUAL; // XXX: should be VISUAL: see bugs 9809 and 9816
|
||||
}
|
||||
return NS_STYLE_HINT_NONE;
|
||||
}
|
||||
|
|
|
@ -36,8 +36,6 @@ static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);
|
|||
|
||||
class nsTextNode : public nsIDOMText,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIContent,
|
||||
public nsITextContent
|
||||
{
|
||||
public:
|
||||
|
@ -59,9 +57,6 @@ public:
|
|||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
|
|
|
@ -96,7 +96,12 @@ nsEventListenerManager::~nsEventListenerManager()
|
|||
|
||||
NS_IMPL_ADDREF(nsEventListenerManager)
|
||||
NS_IMPL_RELEASE(nsEventListenerManager)
|
||||
NS_IMPL_QUERY_INTERFACE1(nsEventListenerManager, nsIEventListenerManager)
|
||||
NS_INTERFACE_MAP_BEGIN(nsEventListenerManager)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIEventListenerManager)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIEventListenerManager)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMEventTarget)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMEventReceiver)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
nsVoidArray** nsEventListenerManager::GetListenersByIID(const nsIID& aIID)
|
||||
{
|
||||
|
@ -1200,6 +1205,8 @@ nsresult nsEventListenerManager::HandleEvent(nsIPresContext* aPresContext,
|
|||
|
||||
case NS_PAGE_LOAD:
|
||||
case NS_PAGE_UNLOAD:
|
||||
case NS_IMAGE_LOAD:
|
||||
case NS_IMAGE_ERROR:
|
||||
|
||||
if (nsnull != mLoadListeners) {
|
||||
if (nsnull == *aDOMEvent) {
|
||||
|
@ -1216,11 +1223,14 @@ nsresult nsEventListenerManager::HandleEvent(nsIPresContext* aPresContext,
|
|||
if (NS_OK == ls->mListener->QueryInterface(kIDOMLoadListenerIID, (void**)&mLoadListener)) {
|
||||
switch(aEvent->message) {
|
||||
case NS_PAGE_LOAD:
|
||||
case NS_IMAGE_LOAD:
|
||||
ret = mLoadListener->Load(*aDOMEvent);
|
||||
break;
|
||||
case NS_PAGE_UNLOAD:
|
||||
ret = mLoadListener->Unload(*aDOMEvent);
|
||||
break;
|
||||
case NS_IMAGE_ERROR:
|
||||
ret = mLoadListener->Error(*aDOMEvent);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1231,6 +1241,7 @@ nsresult nsEventListenerManager::HandleEvent(nsIPresContext* aPresContext,
|
|||
PRUint32 subType = 0;
|
||||
switch(aEvent->message) {
|
||||
case NS_PAGE_LOAD:
|
||||
case NS_IMAGE_LOAD:
|
||||
subType = NS_EVENT_BITS_LOAD_LOAD;
|
||||
if (ls->mSubType & NS_EVENT_BITS_LOAD_LOAD) {
|
||||
correctSubType = PR_TRUE;
|
||||
|
@ -1242,6 +1253,12 @@ nsresult nsEventListenerManager::HandleEvent(nsIPresContext* aPresContext,
|
|||
correctSubType = PR_TRUE;
|
||||
}
|
||||
break;
|
||||
case NS_IMAGE_ERROR:
|
||||
subType = NS_EVENT_BITS_LOAD_ERROR;
|
||||
if (ls->mSubType & NS_EVENT_BITS_LOAD_ERROR) {
|
||||
correctSubType = PR_TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1733,6 +1750,62 @@ nsresult nsEventListenerManager::RemoveAllListeners(PRBool aScriptOnly)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsIDOMEventTarget interface
|
||||
NS_IMETHODIMP
|
||||
nsEventListenerManager::AddEventListener(const nsString& aType,
|
||||
nsIDOMEventListener* aListener,
|
||||
PRBool aUseCapture)
|
||||
{
|
||||
PRInt32 flags = aUseCapture ? NS_EVENT_FLAG_CAPTURE : NS_EVENT_FLAG_BUBBLE;
|
||||
|
||||
return AddEventListenerByType(aListener, aType, flags);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEventListenerManager::RemoveEventListener(const nsString& aType,
|
||||
nsIDOMEventListener* aListener,
|
||||
PRBool aUseCapture)
|
||||
{
|
||||
PRInt32 flags = aUseCapture ? NS_EVENT_FLAG_CAPTURE : NS_EVENT_FLAG_BUBBLE;
|
||||
|
||||
return RemoveEventListenerByType(aListener, aType, flags);
|
||||
}
|
||||
|
||||
// nsIDOMEventReceiver interface
|
||||
NS_IMETHODIMP
|
||||
nsEventListenerManager::AddEventListenerByIID(nsIDOMEventListener *aListener,
|
||||
const nsIID& aIID)
|
||||
{
|
||||
return AddEventListenerByIID(aListener, aIID, NS_EVENT_FLAG_BUBBLE);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEventListenerManager::RemoveEventListenerByIID(nsIDOMEventListener *aListener, const nsIID& aIID)
|
||||
{
|
||||
return RemoveEventListenerByIID(aListener, aIID, NS_EVENT_FLAG_BUBBLE);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEventListenerManager::GetListenerManager(nsIEventListenerManager** aInstancePtrResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aInstancePtrResult);
|
||||
*aInstancePtrResult = NS_STATIC_CAST(nsIEventListenerManager*, this);
|
||||
NS_ADDREF(*aInstancePtrResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEventListenerManager::GetNewListenerManager(nsIEventListenerManager **aInstancePtrResult)
|
||||
{
|
||||
return NS_NewEventListenerManager(aInstancePtrResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEventListenerManager::HandleEvent(nsIDOMEvent *aEvent)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_HTML nsresult NS_NewEventListenerManager(nsIEventListenerManager** aInstancePtrResult)
|
||||
{
|
||||
nsIEventListenerManager* l = new nsEventListenerManager();
|
||||
|
@ -1747,3 +1820,4 @@ NS_HTML nsresult NS_NewEventListenerManager(nsIEventListenerManager** aInstanceP
|
|||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "jsapi.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
|
||||
class nsIDOMEvent;
|
||||
class nsIAtom;
|
||||
|
@ -46,7 +47,9 @@ typedef struct {
|
|||
* Event listener manager
|
||||
*/
|
||||
|
||||
class nsEventListenerManager : public nsIEventListenerManager {
|
||||
class nsEventListenerManager : public nsIEventListenerManager,
|
||||
public nsIDOMEventReceiver
|
||||
{
|
||||
|
||||
public:
|
||||
nsEventListenerManager();
|
||||
|
@ -102,6 +105,21 @@ public:
|
|||
|
||||
static nsresult GetIdentifiersForType(nsIAtom* aType, nsIID& aIID, PRInt32* aSubType);
|
||||
|
||||
// nsIDOMEventTarget interface
|
||||
NS_IMETHOD AddEventListener(const nsString& aType,
|
||||
nsIDOMEventListener* aListener,
|
||||
PRBool aUseCapture);
|
||||
NS_IMETHOD RemoveEventListener(const nsString& aType,
|
||||
nsIDOMEventListener* aListener,
|
||||
PRBool aUseCapture);
|
||||
|
||||
// nsIDOMEventReceiver interface
|
||||
NS_IMETHOD AddEventListenerByIID(nsIDOMEventListener *aListener, const nsIID& aIID);
|
||||
NS_IMETHOD RemoveEventListenerByIID(nsIDOMEventListener *aListener, const nsIID& aIID);
|
||||
NS_IMETHOD GetListenerManager(nsIEventListenerManager** aInstancePtrResult);
|
||||
NS_IMETHOD GetNewListenerManager(nsIEventListenerManager **aInstancePtrResult);
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent *aEvent);
|
||||
|
||||
protected:
|
||||
nsresult HandleEventSubType(nsListenerStruct* aListenerStruct,
|
||||
nsIDOMEvent* aDOMEvent,
|
||||
|
|
|
@ -74,7 +74,7 @@ static NS_DEFINE_IID(kIDOMTextIID, NS_IDOMTEXT_IID);
|
|||
static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);
|
||||
|
||||
|
||||
class nsAttributeContent : public nsIContent, public nsITextContent, public nsIAttributeContent {
|
||||
class nsAttributeContent : public nsITextContent, public nsIAttributeContent {
|
||||
public:
|
||||
friend nsresult NS_NewAttributeContent(nsAttributeContent** aNewFrame);
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* Contributor(s):
|
||||
*/
|
||||
#include "nsIDOMHTMLAnchorElement.h"
|
||||
#include "nsIDOMNSHTMLAnchorElement.h"
|
||||
#include "nsIScriptObjectOwner.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIHTMLContent.h"
|
||||
|
@ -30,7 +31,7 @@
|
|||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIEventStateManager.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIFocusableContent.h"
|
||||
|
||||
|
@ -52,8 +53,8 @@ static NS_DEFINE_IID(kIDOMHTMLAnchorElementIID, NS_IDOMHTMLANCHORELEMENT_IID);
|
|||
static NS_DEFINE_IID(kIFocusableContentIID, NS_IFOCUSABLECONTENT_IID);
|
||||
|
||||
class nsHTMLAnchorElement : public nsIDOMHTMLAnchorElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIDOMNSHTMLAnchorElement,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIFocusableContent
|
||||
{
|
||||
|
@ -101,11 +102,18 @@ public:
|
|||
NS_IMETHOD Blur();
|
||||
NS_IMETHOD Focus();
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
// nsIDOMNSHTMLAnchorElement
|
||||
NS_IMETHOD GetProtocol(nsString& aProtocol);
|
||||
NS_IMETHOD GetHost(nsString& aHost);
|
||||
NS_IMETHOD GetHostname(nsString& aHostname);
|
||||
NS_IMETHOD GetPathname(nsString& aPathname);
|
||||
NS_IMETHOD GetSearch(nsString& aSearch);
|
||||
NS_IMETHOD GetPort(nsString& aPort);
|
||||
NS_IMETHOD GetHash(nsString& aHash);
|
||||
NS_IMETHOD GetText(nsString& aText);
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
@ -165,6 +173,11 @@ nsHTMLAnchorElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
else if (aIID.Equals(NS_GET_IID(nsIDOMNSHTMLAnchorElement))) {
|
||||
*aInstancePtr = (void*)(nsIDOMNSHTMLAnchorElement*) this;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
@ -383,3 +396,205 @@ nsHTMLAnchorElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
|
|||
{
|
||||
return mInner.SizeOf(aSizer, aResult, sizeof(*this));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAnchorElement::GetProtocol(nsString& aProtocol)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *url;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&url, href);
|
||||
if (NS_OK == result) {
|
||||
char* protocol;
|
||||
result = url->GetScheme(&protocol);
|
||||
if (result == NS_OK) {
|
||||
aProtocol.SetString(protocol);
|
||||
aProtocol.Append(":");
|
||||
nsCRT::free(protocol);
|
||||
}
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAnchorElement::GetHost(nsString& aHost)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *url;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&url, href);
|
||||
if (NS_OK == result) {
|
||||
char* host;
|
||||
result = url->GetHost(&host);
|
||||
if (result == NS_OK) {
|
||||
aHost.SetString(host);
|
||||
nsCRT::free(host);
|
||||
PRInt32 port;
|
||||
(void)url->GetPort(&port);
|
||||
if (-1 != port) {
|
||||
aHost.Append(":");
|
||||
aHost.Append(port, 10);
|
||||
}
|
||||
}
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAnchorElement::GetHostname(nsString& aHostname)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *url;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&url, href);
|
||||
if (NS_OK == result) {
|
||||
char* host;
|
||||
result = url->GetHost(&host);
|
||||
if (result == NS_OK) {
|
||||
aHostname.SetString(host);
|
||||
nsCRT::free(host);
|
||||
}
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAnchorElement::GetPathname(nsString& aPathname)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *url;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&url, href);
|
||||
if (NS_OK == result) {
|
||||
char* file;
|
||||
result = url->GetPath(&file);
|
||||
if (result == NS_OK) {
|
||||
aPathname.SetString(file);
|
||||
nsCRT::free(file);
|
||||
}
|
||||
NS_IF_RELEASE(url);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAnchorElement::GetSearch(nsString& aSearch)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *uri;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&uri, href);
|
||||
if (NS_OK == result) {
|
||||
char *search;
|
||||
nsIURL* url;
|
||||
result = uri->QueryInterface(NS_GET_IID(nsIURL), (void**)&url);
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
result = url->GetQuery(&search);
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
if (result == NS_OK && (nsnull != search) && ('\0' != *search)) {
|
||||
aSearch.SetString("?");
|
||||
aSearch.Append(search);
|
||||
nsCRT::free(search);
|
||||
}
|
||||
else {
|
||||
aSearch.SetLength(0);
|
||||
}
|
||||
NS_RELEASE(uri);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAnchorElement::GetPort(nsString& aPort)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *url;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&url, href);
|
||||
if (NS_OK == result) {
|
||||
aPort.SetLength(0);
|
||||
PRInt32 port;
|
||||
(void)url->GetPort(&port);
|
||||
if (-1 != port) {
|
||||
aPort.Append(port, 10);
|
||||
}
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAnchorElement::GetHash(nsString& aHash)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *uri;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&uri, href);
|
||||
|
||||
if (NS_OK == result) {
|
||||
char *ref;
|
||||
nsIURL* url;
|
||||
result = uri->QueryInterface(NS_GET_IID(nsIURL), (void**)&url);
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
result = url->GetRef(&ref);
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
if (result == NS_OK && (nsnull != ref) && ('\0' != *ref)) {
|
||||
aHash.SetString("#");
|
||||
aHash.Append(ref);
|
||||
nsCRT::free(ref);
|
||||
}
|
||||
else {
|
||||
aHash.SetLength(0);
|
||||
}
|
||||
NS_RELEASE(uri);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAnchorElement::GetText(nsString& aText)
|
||||
{
|
||||
// XXX TBI
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,8 +52,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLAppletElementIID, NS_IDOMHTMLAPPLETELEMENT_IID);
|
||||
|
||||
class nsHTMLAppletElement : public nsIDOMHTMLAppletElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -96,14 +95,40 @@ public:
|
|||
NS_IMETHOD GetWidth(nsString& aWidth);
|
||||
NS_IMETHOD SetWidth(const nsString& aWidth);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
// nsIJSScriptObject
|
||||
virtual PRBool AddProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp) {
|
||||
return mInner.AddProperty(aContext, aObj, aID, aVp);
|
||||
}
|
||||
virtual PRBool DeleteProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp) {
|
||||
return mInner.DeleteProperty(aContext, aObj, aID, aVp);
|
||||
}
|
||||
virtual PRBool GetProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp) {
|
||||
return mInner.GetProperty(aContext, aObj, aID, aVp);
|
||||
}
|
||||
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp) {
|
||||
return mInner.SetProperty(aContext, aObj, aID, aVp);
|
||||
}
|
||||
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj) {
|
||||
return mInner.EnumerateProperty(aContext, aObj);
|
||||
}
|
||||
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID) {
|
||||
return mInner.EnumerateProperty(aContext, aObj);
|
||||
}
|
||||
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID) {
|
||||
return mInner.EnumerateProperty(aContext, aObj);
|
||||
}
|
||||
virtual void Finalize(JSContext *aContext, JSObject *aObj) {
|
||||
mInner.Finalize(aContext, aObj);
|
||||
}
|
||||
|
||||
NS_IMETHOD GetScriptObject(nsIScriptContext* aContext,
|
||||
void** aScriptObject);
|
||||
NS_IMETHOD SetScriptObject(void *aScriptObject);
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* Contributor(s):
|
||||
*/
|
||||
#include "nsIDOMHTMLAreaElement.h"
|
||||
#include "nsIDOMNSHTMLAreaElement.h"
|
||||
#include "nsIScriptObjectOwner.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIHTMLContent.h"
|
||||
|
@ -32,13 +33,14 @@
|
|||
#include "nsIPresContext.h"
|
||||
#include "nsIFocusableContent.h"
|
||||
#include "nsIEventStateManager.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
||||
static NS_DEFINE_IID(kIDOMHTMLAreaElementIID, NS_IDOMHTMLAREAELEMENT_IID);
|
||||
static NS_DEFINE_IID(kIFocusableContentIID, NS_IFOCUSABLECONTENT_IID);
|
||||
|
||||
class nsHTMLAreaElement : public nsIDOMHTMLAreaElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIFocusableContent
|
||||
{
|
||||
|
@ -76,11 +78,17 @@ public:
|
|||
NS_IMETHOD GetTarget(nsString& aTarget);
|
||||
NS_IMETHOD SetTarget(const nsString& aTarget);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
// nsIDOMNSHTMLAreaElement
|
||||
NS_IMETHOD GetProtocol(nsString& aProtocol);
|
||||
NS_IMETHOD GetHost(nsString& aHost);
|
||||
NS_IMETHOD GetHostname(nsString& aHostname);
|
||||
NS_IMETHOD GetPathname(nsString& aPathname);
|
||||
NS_IMETHOD GetSearch(nsString& aSearch);
|
||||
NS_IMETHOD GetPort(nsString& aPort);
|
||||
NS_IMETHOD GetHash(nsString& aHash);
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
@ -140,6 +148,11 @@ nsHTMLAreaElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
else if (aIID.Equals(NS_GET_IID(nsIDOMNSHTMLAreaElement))) {
|
||||
*aInstancePtr = (void*)(nsIDOMNSHTMLAreaElement*) this;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
@ -259,3 +272,197 @@ nsHTMLAreaElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
|
|||
{
|
||||
return mInner.SizeOf(aSizer, aResult, sizeof(*this));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAreaElement::GetProtocol(nsString& aProtocol)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *url;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&url, href);
|
||||
if (NS_OK == result) {
|
||||
char* protocol;
|
||||
result = url->GetScheme(&protocol);
|
||||
if (result == NS_OK) {
|
||||
aProtocol.SetString(protocol);
|
||||
aProtocol.Append(":");
|
||||
nsCRT::free(protocol);
|
||||
}
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAreaElement::GetHost(nsString& aHost)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *url;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&url, href);
|
||||
if (NS_OK == result) {
|
||||
char* host;
|
||||
result = url->GetHost(&host);
|
||||
if (result == NS_OK) {
|
||||
aHost.SetString(host);
|
||||
nsCRT::free(host);
|
||||
PRInt32 port;
|
||||
(void)url->GetPort(&port);
|
||||
if (-1 != port) {
|
||||
aHost.Append(":");
|
||||
aHost.Append(port, 10);
|
||||
}
|
||||
}
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAreaElement::GetHostname(nsString& aHostname)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *url;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&url, href);
|
||||
if (NS_OK == result) {
|
||||
char* host;
|
||||
result = url->GetHost(&host);
|
||||
if (result == NS_OK) {
|
||||
aHostname.SetString(host);
|
||||
nsCRT::free(host);
|
||||
}
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAreaElement::GetPathname(nsString& aPathname)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *url;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&url, href);
|
||||
if (NS_OK == result) {
|
||||
char* file;
|
||||
result = url->GetPath(&file);
|
||||
if (result == NS_OK) {
|
||||
aPathname.SetString(file);
|
||||
nsCRT::free(file);
|
||||
}
|
||||
NS_IF_RELEASE(url);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAreaElement::GetSearch(nsString& aSearch)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *uri;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&uri, href);
|
||||
if (NS_OK == result) {
|
||||
char *search;
|
||||
nsIURL* url;
|
||||
result = uri->QueryInterface(NS_GET_IID(nsIURL), (void**)&url);
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
result = url->GetQuery(&search);
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
if (result == NS_OK && (nsnull != search) && ('\0' != *search)) {
|
||||
aSearch.SetString("?");
|
||||
aSearch.Append(search);
|
||||
nsCRT::free(search);
|
||||
}
|
||||
else {
|
||||
aSearch.SetLength(0);
|
||||
}
|
||||
NS_RELEASE(uri);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAreaElement::GetPort(nsString& aPort)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *url;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&url, href);
|
||||
if (NS_OK == result) {
|
||||
aPort.SetLength(0);
|
||||
PRInt32 port;
|
||||
(void)url->GetPort(&port);
|
||||
if (-1 != port) {
|
||||
aPort.Append(port, 10);
|
||||
}
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLAreaElement::GetHash(nsString& aHash)
|
||||
{
|
||||
nsAutoString href;
|
||||
nsIURI *uri;
|
||||
nsresult result = NS_OK;
|
||||
|
||||
result = GetHref(href);
|
||||
if (NS_OK == result) {
|
||||
result = NS_NewURI(&uri, href);
|
||||
|
||||
if (NS_OK == result) {
|
||||
char *ref;
|
||||
nsIURL* url;
|
||||
result = uri->QueryInterface(NS_GET_IID(nsIURL), (void**)&url);
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
result = url->GetRef(&ref);
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
if (result == NS_OK && (nsnull != ref) && ('\0' != *ref)) {
|
||||
aHash.SetString("#");
|
||||
aHash.Append(ref);
|
||||
nsCRT::free(ref);
|
||||
}
|
||||
else {
|
||||
aHash.SetLength(0);
|
||||
}
|
||||
NS_RELEASE(uri);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLBRElementIID, NS_IDOMHTMLBRELEMENT_IID);
|
||||
|
||||
class nsHTMLBRElement : public nsIDOMHTMLBRElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -59,11 +58,8 @@ public:
|
|||
NS_IMETHOD GetClear(nsString& aClear);
|
||||
NS_IMETHOD SetClear(const nsString& aClear);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLBaseElementIID, NS_IDOMHTMLBASEELEMENT_IID);
|
||||
|
||||
class nsHTMLBaseElement : public nsIDOMHTMLBaseElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -60,11 +59,8 @@ public:
|
|||
NS_IMETHOD GetTarget(nsString& aTarget);
|
||||
NS_IMETHOD SetTarget(const nsString& aTarget);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLBaseFontElementIID, NS_IDOMHTMLBASEFONTELEMENT_IID);
|
||||
|
||||
class nsHTMLBaseFontElement : public nsIDOMHTMLBaseFontElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -62,11 +61,8 @@ public:
|
|||
NS_IMETHOD GetSize(nsString& aSize);
|
||||
NS_IMETHOD SetSize(const nsString& aSize);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "nsIHTMLAttributes.h"
|
||||
#include "nsIHTMLContentContainer.h"
|
||||
#include "nsISupportsArray.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIDocShell.h"
|
||||
|
||||
static NS_DEFINE_IID(kIHTMLDocumentIID, NS_IHTMLDOCUMENT_IID);
|
||||
|
@ -162,8 +163,7 @@ nsresult nsBodyInner::SetDocument(nsIDocument* aDocument, PRBool aDeep)
|
|||
//----------------------------------------------------------------------
|
||||
|
||||
class nsHTMLBodyElement : public nsIDOMHTMLBodyElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -196,11 +196,8 @@ public:
|
|||
NS_IMETHOD GetVLink(nsString& aVLink);
|
||||
NS_IMETHOD SetVLink(const nsString& aVLink);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
@ -599,11 +596,65 @@ nsHTMLBodyElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
|
||||
NS_IMPL_STRING_ATTR(nsHTMLBodyElement, ALink, alink)
|
||||
NS_IMPL_STRING_ATTR(nsHTMLBodyElement, Background, background)
|
||||
NS_IMPL_STRING_ATTR(nsHTMLBodyElement, BgColor, bgcolor)
|
||||
NS_IMPL_STRING_ATTR(nsHTMLBodyElement, Link, link)
|
||||
NS_IMPL_STRING_ATTR(nsHTMLBodyElement, Text, text)
|
||||
NS_IMPL_STRING_ATTR(nsHTMLBodyElement, VLink, vlink)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLBodyElement::GetBgColor(nsString& aBgColor)
|
||||
{
|
||||
// If we don't have an attribute, find the actual color used for
|
||||
// (generally from the user agent style sheet) for compatibility
|
||||
if (NS_CONTENT_ATTR_NOT_THERE == mInner.GetAttribute(kNameSpaceID_None, nsHTMLAtoms::bgcolor, aBgColor)) {
|
||||
nsresult result = NS_OK;
|
||||
if (mInner.mDocument) {
|
||||
// Make sure the presentation is up-to-date
|
||||
result = mInner.mDocument->FlushPendingNotifications();
|
||||
if (NS_FAILED(result)) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
result = nsGenericHTMLElement::GetPresContext(this,
|
||||
getter_AddRefs(context));
|
||||
if (NS_FAILED(result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
result = context->GetShell(getter_AddRefs(shell));
|
||||
if (NS_FAILED(result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
nsIFrame* frame;
|
||||
result = shell->GetPrimaryFrameFor(this, &frame);
|
||||
if (NS_FAILED(result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (frame) {
|
||||
const nsStyleColor* styleColor;
|
||||
result = frame->GetStyleData(eStyleStruct_Color, (const nsStyleStruct*&)styleColor);
|
||||
if (NS_FAILED(result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
nsHTMLValue value(styleColor->mBackgroundColor);
|
||||
nsGenericHTMLElement::ColorToString(value, aBgColor);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLBodyElement::SetBgColor(const nsString& aBgColor)
|
||||
{
|
||||
return mInner.SetAttribute(kNameSpaceID_None, nsHTMLAtoms::bgcolor, aBgColor, PR_TRUE);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLBodyElement::StringToAttribute(nsIAtom* aAttribute,
|
||||
const nsString& aValue,
|
||||
|
|
|
@ -46,8 +46,7 @@ static NS_DEFINE_IID(kIDOMHTMLButtonElementIID, NS_IDOMHTMLBUTTONELEMENT_IID);
|
|||
static NS_DEFINE_IID(kIFocusableContentIID, NS_IFOCUSABLECONTENT_IID);
|
||||
|
||||
class nsHTMLButtonElement : public nsIDOMHTMLButtonElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIFormControl,
|
||||
public nsIFocusableContent
|
||||
|
@ -86,11 +85,8 @@ public:
|
|||
NS_IMETHOD Blur();
|
||||
NS_IMETHOD Focus();
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLDListElementIID, NS_IDOMHTMLDLISTELEMENT_IID);
|
||||
|
||||
class nsHTMLDListElement : public nsIDOMHTMLDListElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -59,11 +58,8 @@ public:
|
|||
NS_IMETHOD GetCompact(PRBool* aCompact);
|
||||
NS_IMETHOD SetCompact(PRBool aCompact);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLModElementIID, NS_IDOMHTMLMODELEMENT_IID);
|
||||
|
||||
class nsHTMLDelElement : public nsIDOMHTMLModElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -60,11 +59,8 @@ public:
|
|||
NS_IMETHOD GetDateTime(nsString& aDateTime);
|
||||
NS_IMETHOD SetDateTime(const nsString& aDateTime);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -39,8 +39,7 @@ extern nsGenericHTMLElement::EnumTable kListTypeTable[];
|
|||
static NS_DEFINE_IID(kIDOMHTMLDirectoryElementIID, NS_IDOMHTMLDIRECTORYELEMENT_IID);
|
||||
|
||||
class nsHTMLDirectoryElement : public nsIDOMHTMLDirectoryElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -63,11 +62,8 @@ public:
|
|||
NS_IMETHOD GetCompact(PRBool* aCompact);
|
||||
NS_IMETHOD SetCompact(PRBool aCompact);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLDivElementIID, NS_IDOMHTMLDIVELEMENT_IID);
|
||||
|
||||
class nsHTMLDivElement : public nsIDOMHTMLDivElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -61,11 +60,8 @@ public:
|
|||
NS_IMETHOD GetAlign(nsString& aAlign);
|
||||
NS_IMETHOD SetAlign(const nsString& aAlign);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -36,8 +36,7 @@
|
|||
//static NS_DEFINE_IID(kIDOMHTMLEmbedElementIID, NS_IDOMHTMLEmbedELEMENT_IID);
|
||||
|
||||
class nsHTMLEmbedElement : public nsIDOMHTMLElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -58,11 +57,8 @@ public:
|
|||
|
||||
// nsIDOMHTMLEmbedElement
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -41,8 +41,7 @@ static NS_DEFINE_IID(kIFormControlIID, NS_IFORMCONTROL_IID);
|
|||
static NS_DEFINE_IID(kIFormIID, NS_IFORM_IID);
|
||||
|
||||
class nsHTMLFieldSetElement : public nsIDOMHTMLFieldSetElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIFormControl
|
||||
{
|
||||
|
@ -66,11 +65,8 @@ public:
|
|||
NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm);
|
||||
NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -38,8 +38,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLFontElementIID, NS_IDOMHTMLFONTELEMENT_IID);
|
||||
|
||||
class nsHTMLFontElement : public nsIDOMHTMLFontElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -66,11 +65,8 @@ public:
|
|||
NS_IMETHOD GetSize(nsString& aSize);
|
||||
NS_IMETHOD SetSize(const nsString& aSize);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -57,11 +57,9 @@ class nsFormControlList;
|
|||
|
||||
class nsHTMLFormElement : public nsIDOMHTMLFormElement,
|
||||
public nsIDOMNSHTMLFormElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIForm,
|
||||
public nsIJSScriptObject
|
||||
public nsIForm
|
||||
{
|
||||
public:
|
||||
nsHTMLFormElement(nsIAtom* aTag);
|
||||
|
@ -102,11 +100,6 @@ public:
|
|||
NS_IMETHOD Item(PRUint32 aIndex, nsIDOMElement** aReturn);
|
||||
NS_IMETHOD NamedItem(JSContext* cx, jsval* argv, PRUint32 argc, jsval* aReturn);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
@ -115,18 +108,19 @@ public:
|
|||
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIJSScriptObject
|
||||
PRBool AddProperty(JSContext *aContext, JSObject *aObj,
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
virtual PRBool AddProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp);
|
||||
PRBool DeleteProperty(JSContext *aContext, JSObject *aObj,
|
||||
virtual PRBool DeleteProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp);
|
||||
PRBool GetProperty(JSContext *aContext, JSObject *aObj,
|
||||
virtual PRBool GetProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp);
|
||||
PRBool SetProperty(JSContext *aContext, JSObject *aObj,
|
||||
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp);
|
||||
PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
|
||||
PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
|
||||
PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
|
||||
void Finalize(JSContext *aContext, JSObject *aObj);
|
||||
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
|
||||
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
|
||||
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
|
||||
virtual void Finalize(JSContext *aContext, JSObject *aObj);
|
||||
|
||||
// nsIForm
|
||||
NS_IMETHOD AddElement(nsIFormControl* aElement);
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLFrameElementIID, NS_IDOMHTMLFRAMEELEMENT_IID);
|
||||
|
||||
class nsHTMLFrameElement : public nsIDOMHTMLFrameElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIChromeEventHandler
|
||||
{
|
||||
|
@ -74,11 +73,8 @@ public:
|
|||
NS_IMETHOD GetSrc(nsString& aSrc);
|
||||
NS_IMETHOD SetSrc(const nsString& aSrc);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLFrameSetElementIID, NS_IDOMHTMLFRAMESETELEMENT_IID);
|
||||
|
||||
class nsHTMLFrameSetElement : public nsIDOMHTMLFrameSetElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -60,11 +59,8 @@ public:
|
|||
NS_IMETHOD GetRows(nsString& aRows);
|
||||
NS_IMETHOD SetRows(const nsString& aRows);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLHRElementIID, NS_IDOMHTMLHRELEMENT_IID);
|
||||
|
||||
class nsHTMLHRElement : public nsIDOMHTMLHRElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -65,11 +64,8 @@ public:
|
|||
NS_IMETHOD GetWidth(nsString& aWidth);
|
||||
NS_IMETHOD SetWidth(const nsString& aWidth);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLHeadElementIID, NS_IDOMHTMLHEADELEMENT_IID);
|
||||
|
||||
class nsHTMLHeadElement : public nsIDOMHTMLHeadElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -58,11 +57,8 @@ public:
|
|||
NS_IMETHOD GetProfile(nsString& aProfile);
|
||||
NS_IMETHOD SetProfile(const nsString& aProfile);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLHeadingElementIID, NS_IDOMHTMLHEADINGELEMENT_IID);
|
||||
|
||||
class nsHTMLHeadingElement : public nsIDOMHTMLHeadingElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -59,11 +58,8 @@ public:
|
|||
NS_IMETHOD GetAlign(nsString& aAlign);
|
||||
NS_IMETHOD SetAlign(const nsString& aAlign);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLHtmlElementIID, NS_IDOMHTMLHTMLELEMENT_IID);
|
||||
|
||||
class nsHTMLHtmlElement : public nsIDOMHTMLHtmlElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -59,11 +58,8 @@ public:
|
|||
NS_IMETHOD GetVersion(nsString& aVersion);
|
||||
NS_IMETHOD SetVersion(const nsString& aVersion);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -36,8 +36,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLIFrameElementIID, NS_IDOMHTMLIFRAMEELEMENT_IID);
|
||||
|
||||
class nsHTMLIFrameElement : public nsIDOMHTMLIFrameElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIChromeEventHandler
|
||||
{
|
||||
|
@ -79,11 +78,8 @@ public:
|
|||
NS_IMETHOD GetWidth(nsString& aWidth);
|
||||
NS_IMETHOD SetWidth(const nsString& aWidth);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -64,10 +64,8 @@ static NS_DEFINE_IID(kIDocumentIID, NS_IDOCUMENT_IID);
|
|||
|
||||
class nsHTMLImageElement : public nsIDOMHTMLImageElement,
|
||||
public nsIDOMImage,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIHTMLContent,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIJSNativeInitializer
|
||||
{
|
||||
public:
|
||||
|
@ -120,11 +118,6 @@ public:
|
|||
NS_IMETHOD SetLowsrc(const nsString& aLowsrc);
|
||||
NS_IMETHOD GetComplete(PRBool* aComplete);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
|
||||
|
@ -133,18 +126,19 @@ public:
|
|||
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIJSScriptObject
|
||||
PRBool AddProperty(JSContext *aContext, JSObject *aObj,
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
virtual PRBool AddProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp);
|
||||
PRBool DeleteProperty(JSContext *aContext, JSObject *aObj,
|
||||
virtual PRBool DeleteProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp);
|
||||
PRBool GetProperty(JSContext *aContext, JSObject *aObj,
|
||||
virtual PRBool GetProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp);
|
||||
PRBool SetProperty(JSContext *aContext, JSObject *aObj,
|
||||
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp);
|
||||
PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
|
||||
PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
|
||||
PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
|
||||
void Finalize(JSContext *aContext, JSObject *aObj);
|
||||
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
|
||||
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
|
||||
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
|
||||
virtual void Finalize(JSContext *aContext, JSObject *aObj);
|
||||
|
||||
// nsIJSNativeInitializer
|
||||
NS_IMETHOD Initialize(JSContext* aContext, JSObject *aObj,
|
||||
|
@ -545,14 +539,13 @@ nsHTMLImageElement::GetCallerSourceURL(JSContext* cx,
|
|||
|
||||
if (doc) {
|
||||
result = doc->GetBaseURL(*sourceURL);
|
||||
}
|
||||
|
||||
if (!*sourceURL) {
|
||||
*sourceURL = doc->GetDocumentURL();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -71,8 +71,7 @@ static NS_DEFINE_CID(kXULControllersCID, NS_XULCONTROLLERS_CID);
|
|||
|
||||
class nsHTMLInputElement : public nsIDOMHTMLInputElement,
|
||||
public nsIDOMNSHTMLInputElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIFormControl,
|
||||
public nsIFocusableContent,
|
||||
|
@ -163,6 +162,7 @@ public:
|
|||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_IMETHOD GetType(nsString& aType);
|
||||
NS_IMETHOD SetType(const nsString& aType);
|
||||
NS_IMETHOD GetUseMap(nsString& aUseMap);
|
||||
NS_IMETHOD SetUseMap(const nsString& aUseMap);
|
||||
NS_IMETHOD GetValue(nsString& aValue);
|
||||
|
@ -178,11 +178,8 @@ public:
|
|||
// nsIDOMNSHTMLInputElement
|
||||
NS_DECL_IDOMNSHTMLINPUTELEMENT
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
|
||||
|
@ -411,15 +408,9 @@ NS_IMPL_STRING_ATTR(nsHTMLInputElement, Size, size)
|
|||
NS_IMPL_STRING_ATTR(nsHTMLInputElement, Src, src)
|
||||
NS_IMPL_INT_ATTR(nsHTMLInputElement, TabIndex, tabindex)
|
||||
NS_IMPL_STRING_ATTR(nsHTMLInputElement, UseMap, usemap)
|
||||
NS_IMPL_STRING_ATTR(nsHTMLInputElement, Type, type)
|
||||
//NS_IMPL_STRING_ATTR(nsHTMLInputElement, Value, value)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLInputElement::GetType(nsString& aValue)
|
||||
{
|
||||
mInner.GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::type, aValue);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLInputElement::GetValue(nsString& aValue)
|
||||
{
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLModElementIID, NS_IDOMHTMLMODELEMENT_IID);
|
||||
|
||||
class nsHTMLInsElement : public nsIDOMHTMLModElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -60,11 +59,8 @@ public:
|
|||
NS_IMETHOD GetDateTime(nsString& aDateTime);
|
||||
NS_IMETHOD SetDateTime(const nsString& aDateTime);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLIsIndexElementIID, NS_IDOMHTMLISINDEXELEMENT_IID);
|
||||
|
||||
class nsHTMLIsIndexElement : public nsIDOMHTMLIsIndexElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -59,11 +58,8 @@ public:
|
|||
NS_IMETHOD GetPrompt(nsString& aPrompt);
|
||||
NS_IMETHOD SetPrompt(const nsString& aPrompt);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLLIElementIID, NS_IDOMHTMLLIELEMENT_IID);
|
||||
|
||||
class nsHTMLLIElement : public nsIDOMHTMLLIElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -61,11 +60,8 @@ public:
|
|||
NS_IMETHOD GetValue(PRInt32* aValue);
|
||||
NS_IMETHOD SetValue(PRInt32 aValue);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -47,8 +47,7 @@ static NS_DEFINE_IID(kIFormIID, NS_IFORM_IID);
|
|||
static NS_DEFINE_IID(kIFormControlIID, NS_IFORMCONTROL_IID);
|
||||
|
||||
class nsHTMLLabelElement : public nsIDOMHTMLLabelElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIFormControl
|
||||
|
||||
|
@ -77,11 +76,8 @@ public:
|
|||
NS_IMETHOD GetHtmlFor(nsString& aHtmlFor);
|
||||
NS_IMETHOD SetHtmlFor(const nsString& aHtmlFor);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -40,8 +40,7 @@ static NS_DEFINE_IID(kIDOMHTMLFormElementIID, NS_IDOMHTMLFORMELEMENT_IID);
|
|||
static NS_DEFINE_IID(kIFormIID, NS_IFORM_IID);
|
||||
|
||||
class nsHTMLLegendElement : public nsIDOMHTMLLegendElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIFormControl
|
||||
{
|
||||
|
@ -68,11 +67,8 @@ public:
|
|||
NS_IMETHOD GetAlign(nsString& aAlign);
|
||||
NS_IMETHOD SetAlign(const nsString& aAlign);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -39,8 +39,7 @@ static NS_DEFINE_IID(kIStyleSheetLinkingElementIID, NS_ISTYLESHEETLINKINGELEMENT
|
|||
static NS_DEFINE_IID(kIDOMStyleSheetIID, NS_IDOMSTYLESHEET_IID);
|
||||
|
||||
class nsHTMLLinkElement : public nsIDOMHTMLLinkElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIStyleSheetLinkingElement
|
||||
{
|
||||
|
@ -80,11 +79,8 @@ public:
|
|||
NS_IMETHOD GetType(nsString& aType);
|
||||
NS_IMETHOD SetType(const nsString& aType);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -39,8 +39,7 @@ static NS_DEFINE_IID(kIDOMHTMLMapElementIID, NS_IDOMHTMLMAPELEMENT_IID);
|
|||
static NS_DEFINE_IID(kIHTMLDocumentIID, NS_IHTMLDOCUMENT_IID);
|
||||
|
||||
class nsHTMLMapElement : public nsIDOMHTMLMapElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -64,11 +63,8 @@ public:
|
|||
NS_IMETHOD GetName(nsString& aName);
|
||||
NS_IMETHOD SetName(const nsString& aName);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMETHOD GetDocument(nsIDocument*& aResult) const {
|
||||
|
|
|
@ -39,8 +39,7 @@ extern nsGenericHTMLElement::EnumTable kListTypeTable[];
|
|||
static NS_DEFINE_IID(kIDOMHTMLMenuElementIID, NS_IDOMHTMLMENUELEMENT_IID);
|
||||
|
||||
class nsHTMLMenuElement : public nsIDOMHTMLMenuElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -63,11 +62,8 @@ public:
|
|||
NS_IMETHOD GetCompact(PRBool* aCompact);
|
||||
NS_IMETHOD SetCompact(PRBool aCompact);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLMetaElementIID, NS_IDOMHTMLMETAELEMENT_IID);
|
||||
|
||||
class nsHTMLMetaElement : public nsIDOMHTMLMetaElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -64,11 +63,8 @@ public:
|
|||
NS_IMETHOD GetScheme(nsString& aScheme);
|
||||
NS_IMETHOD SetScheme(const nsString& aScheme);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLModElementIID, NS_IDOMHTMLMODELEMENT_IID);
|
||||
|
||||
class nsHTMLModElement : public nsIDOMHTMLModElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -60,11 +59,8 @@ public:
|
|||
NS_IMETHOD GetDateTime(nsString& aDateTime);
|
||||
NS_IMETHOD SetDateTime(const nsString& aDateTime);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLOListElementIID, NS_IDOMHTMLOLISTELEMENT_IID);
|
||||
|
||||
class nsHTMLOListElement : public nsIDOMHTMLOListElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -63,11 +62,8 @@ public:
|
|||
NS_IMETHOD GetType(nsString& aType);
|
||||
NS_IMETHOD SetType(const nsString& aType);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLObjectElementIID, NS_IDOMHTMLOBJECTELEMENT_IID);
|
||||
|
||||
class nsHTMLObjectElement : public nsIDOMHTMLObjectElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -91,11 +90,8 @@ public:
|
|||
NS_IMETHOD GetWidth(nsString& aWidth);
|
||||
NS_IMETHOD SetWidth(const nsString& aWidth);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLOptGroupElementIID, NS_IDOMHTMLOPTGROUPELEMENT_IID);
|
||||
|
||||
class nsHTMLOptGroupElement : public nsIDOMHTMLOptGroupElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -60,11 +59,8 @@ public:
|
|||
NS_IMETHOD GetLabel(nsString& aLabel);
|
||||
NS_IMETHOD SetLabel(const nsString& aLabel);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -67,8 +67,7 @@ static NS_DEFINE_IID(kIFormControlFrameIID, NS_IFORMCONTROLFRAME_IID);
|
|||
static NS_DEFINE_IID(kIJSNativeInitializerIID, NS_IJSNATIVEINITIALIZER_IID);
|
||||
|
||||
class nsHTMLOptionElement : public nsIDOMHTMLOptionElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIJSNativeInitializer
|
||||
//public nsIFormControl
|
||||
|
@ -106,11 +105,8 @@ public:
|
|||
NS_IMETHOD GetValue(nsString& aValue);
|
||||
NS_IMETHOD SetValue(const nsString& aValue);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_NO_SETPARENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLParagraphElementIID, NS_IDOMHTMLPARAGRAPHELEMENT_IID);
|
||||
|
||||
class nsHTMLParagraphElement : public nsIDOMHTMLParagraphElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -61,11 +60,8 @@ public:
|
|||
NS_IMETHOD GetAlign(nsString& aAlign);
|
||||
NS_IMETHOD SetAlign(const nsString& aAlign);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLParamElementIID, NS_IDOMHTMLPARAMELEMENT_IID);
|
||||
|
||||
class nsHTMLParamElement : public nsIDOMHTMLParamElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -64,11 +63,8 @@ public:
|
|||
NS_IMETHOD GetValueType(nsString& aValueType);
|
||||
NS_IMETHOD SetValueType(const nsString& aValueType);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLPreElementIID, NS_IDOMHTMLPREELEMENT_IID);
|
||||
|
||||
class nsHTMLPreElement : public nsIDOMHTMLPreElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -61,11 +60,8 @@ public:
|
|||
NS_IMETHOD GetWidth(PRInt32* aWidth);
|
||||
NS_IMETHOD SetWidth(PRInt32 aWidth);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLQuoteElementIID, NS_IDOMHTMLQUOTEELEMENT_IID);
|
||||
|
||||
class nsHTMLQuoteElement : public nsIDOMHTMLQuoteElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -58,11 +57,8 @@ public:
|
|||
NS_IMETHOD GetCite(nsString& aCite);
|
||||
NS_IMETHOD SetCite(const nsString& aCite);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLScriptElementIID, NS_IDOMHTMLSCRIPTELEMENT_IID);
|
||||
|
||||
class nsHTMLScriptElement : public nsIDOMHTMLScriptElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -70,11 +69,8 @@ public:
|
|||
NS_IMETHOD GetType(nsString& aType);
|
||||
NS_IMETHOD SetType(const nsString& aType);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -92,10 +92,9 @@ public:
|
|||
// nsIDOMHTMLCollection interface
|
||||
NS_DECL_IDOMHTMLCOLLECTION
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMETHOD GetScriptObject(nsIScriptContext *aContext, void** aScriptObject);
|
||||
|
||||
// nsIJSScriptObject interface
|
||||
NS_IMETHOD GetScriptObject(nsIScriptContext* aContext, void** aScriptObject);
|
||||
NS_IMETHOD SetScriptObject(void *aScriptObject);
|
||||
PRBool AddProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp);
|
||||
PRBool DeleteProperty(JSContext *aContext, JSObject *aObj,
|
||||
|
@ -126,9 +125,7 @@ private:
|
|||
|
||||
class nsHTMLSelectElement : public nsIDOMHTMLSelectElement,
|
||||
public nsIDOMNSHTMLSelectElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIJSScriptObject,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIHTMLContent,
|
||||
public nsIFormControl,
|
||||
public nsIFocusableContent,
|
||||
|
@ -179,12 +176,6 @@ public:
|
|||
NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn);
|
||||
NS_IMETHOD NamedItem(const nsString& aName, nsIDOMNode** aReturn);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
|
||||
|
||||
|
@ -206,6 +197,7 @@ public:
|
|||
NS_IMETHOD IsDoneAddingContent(PRBool * aIsDone);
|
||||
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
virtual PRBool AddProperty(JSContext *aContext, JSObject *aObj,
|
||||
jsval aID, jsval *aVp);
|
||||
virtual PRBool DeleteProperty(JSContext *aContext, JSObject *aObj,
|
||||
|
@ -1407,7 +1399,6 @@ nsHTMLOptionCollection::IndexOf(nsIContent* aOption)
|
|||
return -1;
|
||||
}
|
||||
|
||||
|
||||
// nsIScriptObjectOwner interface
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -1421,6 +1412,12 @@ nsHTMLOptionCollection::GetScriptObject(nsIScriptContext *aContext, void** aScri
|
|||
return res;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLOptionCollection::SetScriptObject(void* aScriptObject)
|
||||
{
|
||||
return nsGenericDOMHTMLCollection::SetScriptObject(aScriptObject);
|
||||
}
|
||||
|
||||
// nsIJSScriptObject interface
|
||||
|
||||
PRBool
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLObjectElementIID, NS_IDOMHTMLOBJECTELEMENT_IID);
|
||||
|
||||
class nsHTMLObjectElement : public nsIDOMHTMLObjectElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -91,11 +90,8 @@ public:
|
|||
NS_IMETHOD GetWidth(nsString& aWidth);
|
||||
NS_IMETHOD SetWidth(const nsString& aWidth);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
//static NS_DEFINE_IID(kIDOMHTMLSpacerElementIID, NS_IDOMHTMLSpacerELEMENT_IID);
|
||||
|
||||
class nsHTMLSpacerElement : public nsIDOMHTMLElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -57,11 +56,8 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_IMPL_IDOMHTMLELEMENT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -32,8 +32,7 @@
|
|||
#include "nsIPresContext.h"
|
||||
|
||||
class nsHTMLSpanElement : public nsIDOMHTMLElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -52,11 +51,8 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_IMPL_IDOMHTMLELEMENT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -41,8 +41,7 @@ static NS_DEFINE_IID(kIStyleSheetLinkingElementIID, NS_ISTYLESHEETLINKINGELEMENT
|
|||
static NS_DEFINE_IID(kIDOMStyleSheetIID, NS_IDOMSTYLESHEET_IID);
|
||||
|
||||
class nsHTMLStyleElement : public nsIDOMHTMLStyleElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIStyleSheetLinkingElement
|
||||
{
|
||||
|
@ -70,11 +69,8 @@ public:
|
|||
NS_IMETHOD GetType(nsString& aType);
|
||||
NS_IMETHOD SetType(const nsString& aType);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLTableCaptionElementIID, NS_IDOMHTMLTABLECAPTIONELEMENT_IID);
|
||||
|
||||
class nsHTMLTableCaptionElement : public nsIDOMHTMLTableCaptionElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -59,11 +58,8 @@ public:
|
|||
NS_IMETHOD GetAlign(nsString& aAlign);
|
||||
NS_IMETHOD SetAlign(const nsString& aAlign);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -41,8 +41,7 @@ static NS_DEFINE_IID(kIDOMHTMLTableRowElementIID, NS_IDOMHTMLTABLEROWELEMENT_IID
|
|||
|
||||
class nsHTMLTableCellElement : public nsIHTMLTableCellElement,
|
||||
public nsIDOMHTMLTableCellElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -102,11 +101,8 @@ public:
|
|||
NS_IMETHOD GetWidth(nsString& aWidth);
|
||||
NS_IMETHOD SetWidth(const nsString& aWidth);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -38,8 +38,7 @@ static NS_DEFINE_IID(kIHTMLTableColElementIID, NS_IHTMLTABLECOLELEMENT_IID);
|
|||
|
||||
class nsHTMLTableColElement : public nsIDOMHTMLTableColElement,
|
||||
public nsIHTMLTableColElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -72,11 +71,8 @@ public:
|
|||
NS_IMETHOD GetWidth(nsString& aWidth);
|
||||
NS_IMETHOD SetWidth(const nsString& aWidth);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
static NS_DEFINE_IID(kIDOMHTMLTableColElementIID, NS_IDOMHTMLTABLECOLELEMENT_IID);
|
||||
|
||||
class nsHTMLTableColGroupElement : public nsIDOMHTMLTableColElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -69,11 +68,8 @@ public:
|
|||
NS_IMETHOD GetWidth(nsString& aWidth);
|
||||
NS_IMETHOD SetWidth(const nsString& aWidth);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -52,8 +52,7 @@ class GenericElementCollection;
|
|||
class TableRowsCollection;
|
||||
|
||||
class nsHTMLTableElement : public nsIDOMHTMLTableElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -108,11 +107,8 @@ public:
|
|||
NS_IMETHOD InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aReturn);
|
||||
NS_IMETHOD DeleteRow(PRInt32 aIndex);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -138,8 +138,7 @@ nsTableCellCollection::Item(PRUint32 aIndex,
|
|||
//----------------------------------------------------------------------
|
||||
|
||||
class nsHTMLTableRowElement : public nsIDOMHTMLTableRowElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -178,11 +177,8 @@ public:
|
|||
NS_IMETHOD InsertCell(PRInt32 aIndex, nsIDOMHTMLElement** aReturn);
|
||||
NS_IMETHOD DeleteCell(PRInt32 aIndex);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -40,8 +40,7 @@ static NS_DEFINE_IID(kIDOMHTMLCollectionIID, NS_IDOMHTMLCOLLECTION_IID);
|
|||
// you will see the phrases "rowgroup" and "section" used interchangably
|
||||
|
||||
class nsHTMLTableSectionElement : public nsIDOMHTMLTableSectionElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -73,11 +72,8 @@ public:
|
|||
NS_IMETHOD InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aReturn);
|
||||
NS_IMETHOD DeleteRow(PRInt32 aIndex);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -58,8 +58,7 @@ static NS_DEFINE_CID(kXULControllersCID, NS_XULCONTROLLERS_CID);
|
|||
|
||||
class nsHTMLTextAreaElement : public nsIDOMHTMLTextAreaElement,
|
||||
public nsIDOMNSHTMLTextAreaElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent,
|
||||
public nsIFormControl,
|
||||
public nsIFocusableContent,
|
||||
|
@ -109,11 +108,8 @@ public:
|
|||
// nsIDOMNSHTMLTextAreaElement
|
||||
NS_DECL_IDOMNSHTMLTEXTAREAELEMENT
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -40,8 +40,7 @@ static NS_DEFINE_IID(kIDOMTextIID, NS_IDOMTEXT_IID);
|
|||
static NS_DEFINE_IID(kIHTMLDocumentIID, NS_IHTMLDOCUMENT_IID);
|
||||
|
||||
class nsHTMLTitleElement : public nsIDOMHTMLTitleElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -64,11 +63,8 @@ public:
|
|||
NS_IMETHOD GetText(nsString& aType);
|
||||
NS_IMETHOD SetText(const nsString& aType);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -38,8 +38,7 @@ extern nsGenericHTMLElement::EnumTable kOldListTypeTable[];
|
|||
static NS_DEFINE_IID(kIDOMHTMLUListElementIID, NS_IDOMHTMLULISTELEMENT_IID);
|
||||
|
||||
class nsHTMLUListElement : public nsIDOMHTMLUListElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -64,11 +63,8 @@ public:
|
|||
NS_IMETHOD GetType(nsString& aType);
|
||||
NS_IMETHOD SetType(const nsString& aType);
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -36,8 +36,7 @@
|
|||
//static NS_DEFINE_IID(kIDOMHTMLWBRElementIID, NS_IDOMHTMLWBRELEMENT_IID);
|
||||
|
||||
class nsHTMLWBRElement : public nsIDOMHTMLElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIJSScriptObject,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
|
@ -56,11 +55,8 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_IMPL_IDOMHTMLELEMENT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
// nsIJSScriptObject
|
||||
NS_IMPL_IJSSCRIPTOBJECT_USING_GENERIC(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
|
||||
|
|
|
@ -752,6 +752,16 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::StopDocumentLoad()
|
||||
{
|
||||
if (mParser) {
|
||||
mParser->Terminate();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::EndLoad()
|
||||
{
|
||||
|
|
|
@ -70,6 +70,8 @@ public:
|
|||
nsISupports* aContainer,
|
||||
nsIStreamListener **aDocListener);
|
||||
|
||||
NS_IMETHOD StopDocumentLoad();
|
||||
|
||||
NS_IMETHOD EndLoad();
|
||||
|
||||
NS_IMETHOD AddImageMap(nsIDOMHTMLMapElement* aMap);
|
||||
|
|
|
@ -38,8 +38,6 @@ static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);
|
|||
|
||||
class nsXMLCDATASection : public nsIDOMCDATASection,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIContent,
|
||||
public nsITextContent
|
||||
{
|
||||
public:
|
||||
|
@ -61,9 +59,6 @@ public:
|
|||
// nsIScriptObjectOwner
|
||||
NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ class nsIEventListenerManager;
|
|||
class nsIHTMLAttributes;
|
||||
|
||||
class nsXMLElement : public nsIDOMElement,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIXMLContent,
|
||||
public nsIBindableContent,
|
||||
public nsIJSScriptObject
|
||||
|
@ -205,9 +203,6 @@ public:
|
|||
NS_IMETHOD GetBinding(nsIXBLBinding** aResult);
|
||||
NS_IMETHOD GetBaseTag(nsIAtom** aResult);
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
|
||||
|
||||
// nsIJSScriptObject
|
||||
virtual PRBool AddProperty(JSContext *aContext, JSObject *aObj, jsval aID, jsval *aVp) {
|
||||
return mInner.AddProperty(aContext, aObj, aID, aVp);
|
||||
|
|
|
@ -36,7 +36,6 @@ static NS_DEFINE_IID(kIDOMEntityIID, NS_IDOMENTITY_IID);
|
|||
|
||||
class nsXMLEntity : public nsIDOMEntity,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIContent
|
||||
{
|
||||
public:
|
||||
|
@ -59,9 +58,6 @@ public:
|
|||
NS_IMETHOD GetScriptObject(nsIScriptContext* aContext, void** aScriptObject);
|
||||
NS_IMETHOD SetScriptObject(void *aScriptObject);
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
|
@ -138,10 +134,11 @@ nsXMLEntity::QueryInterface(REFNSIID aIID, void** aInstancePtrResult)
|
|||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(kIDOMEventReceiverIID)) {
|
||||
nsIDOMEventReceiver* tmp = this;
|
||||
*aInstancePtrResult = (void*) tmp;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
nsCOMPtr<nsIEventListenerManager> man;
|
||||
if (NS_SUCCEEDED(mInner.GetListenerManager(getter_AddRefs(man)))){
|
||||
return man->QueryInterface(kIDOMEventReceiverIID, (void**)aInstancePtrResult);
|
||||
}
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
if (aIID.Equals(kIScriptObjectOwnerIID)) {
|
||||
nsIScriptObjectOwner* tmp = this;
|
||||
|
|
|
@ -36,7 +36,6 @@ static NS_DEFINE_IID(kIDOMNotationIID, NS_IDOMNOTATION_IID);
|
|||
|
||||
class nsXMLNotation : public nsIDOMNotation,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIContent
|
||||
{
|
||||
public:
|
||||
|
@ -59,9 +58,6 @@ public:
|
|||
NS_IMETHOD GetScriptObject(nsIScriptContext* aContext, void** aScriptObject);
|
||||
NS_IMETHOD SetScriptObject(void *aScriptObject);
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
|
@ -135,10 +131,11 @@ nsXMLNotation::QueryInterface(REFNSIID aIID, void** aInstancePtrResult)
|
|||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(kIDOMEventReceiverIID)) {
|
||||
nsIDOMEventReceiver* tmp = this;
|
||||
*aInstancePtrResult = (void*) tmp;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
nsCOMPtr<nsIEventListenerManager> man;
|
||||
if (NS_SUCCEEDED(mInner.GetListenerManager(getter_AddRefs(man)))){
|
||||
return man->QueryInterface(kIDOMEventReceiverIID, (void**)aInstancePtrResult);
|
||||
}
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
if (aIID.Equals(kIScriptObjectOwnerIID)) {
|
||||
nsIScriptObjectOwner* tmp = this;
|
||||
|
|
|
@ -36,7 +36,6 @@ static NS_DEFINE_IID(kIDOMProcessingInstructionIID, NS_IDOMPROCESSINGINSTRUCTION
|
|||
|
||||
class nsXMLProcessingInstruction : public nsIDOMProcessingInstruction,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIContent
|
||||
{
|
||||
public:
|
||||
|
@ -58,9 +57,6 @@ public:
|
|||
NS_IMETHOD GetScriptObject(nsIScriptContext* aContext, void** aScriptObject);
|
||||
NS_IMETHOD SetScriptObject(void *aScriptObject);
|
||||
|
||||
// nsIDOMEventReceiver
|
||||
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
// nsIContent
|
||||
NS_IMPL_ICONTENT_USING_GENERIC_DOM_DATA(mInner)
|
||||
|
||||
|
@ -130,10 +126,11 @@ nsXMLProcessingInstruction::QueryInterface(REFNSIID aIID, void** aInstancePtrRes
|
|||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(kIDOMEventReceiverIID)) {
|
||||
nsIDOMEventReceiver* tmp = this;
|
||||
*aInstancePtrResult = (void*) tmp;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
nsCOMPtr<nsIEventListenerManager> man;
|
||||
if (NS_SUCCEEDED(mInner.GetListenerManager(getter_AddRefs(man)))){
|
||||
return man->QueryInterface(kIDOMEventReceiverIID, (void**)aInstancePtrResult);
|
||||
}
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
if (aIID.Equals(kIScriptObjectOwnerIID)) {
|
||||
nsIScriptObjectOwner* tmp = this;
|
||||
|
|
|
@ -314,7 +314,6 @@ class nsXULElement : public nsIStyledContent,
|
|||
public nsIBindableContent,
|
||||
public nsIDOMXULElement,
|
||||
public nsIDOMEventReceiver,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIScriptEventHandlerOwner,
|
||||
public nsIJSScriptObject,
|
||||
public nsIStyleRule,
|
||||
|
|
|
@ -751,6 +751,12 @@ nsXULDocument::StartDocumentLoad(const char* aCommand,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULDocument::StopDocumentLoad()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
const nsString*
|
||||
nsXULDocument::GetDocumentTitle() const
|
||||
{
|
||||
|
|
|
@ -89,7 +89,6 @@ class nsXULDocument : public nsIDocument,
|
|||
public nsIDOMNSDocument,
|
||||
public nsIDOMEventCapturer,
|
||||
public nsIJSScriptObject,
|
||||
public nsIScriptObjectOwner,
|
||||
public nsIHTMLContentContainer,
|
||||
public nsIStreamLoaderObserver,
|
||||
public nsSupportsWeakReference
|
||||
|
@ -113,6 +112,8 @@ public:
|
|||
nsISupports* aContainer,
|
||||
nsIStreamListener **aDocListener);
|
||||
|
||||
NS_IMETHOD StopDocumentLoad();
|
||||
|
||||
virtual const nsString* GetDocumentTitle() const;
|
||||
|
||||
virtual nsIURI* GetDocumentURL() const;
|
||||
|
|
|
@ -67,3 +67,5 @@ nsIDOMImage.h
|
|||
nsIDOMNSHTMLButtonElement.h
|
||||
nsIDOMNSHTMLDocument.h
|
||||
nsIDOMOption.h
|
||||
nsIDOMNSHTMLAnchorElement.h
|
||||
nsIDOMNSHTMLAreaElement.h
|
||||
|
|
|
@ -1,104 +0,0 @@
|
|||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = dom
|
||||
|
||||
EXPORTS = \
|
||||
nsIDOMHTMLIFrameElement.h \
|
||||
nsIDOMHTMLAnchorElement.h \
|
||||
nsIDOMHTMLAppletElement.h \
|
||||
nsIDOMHTMLAreaElement.h \
|
||||
nsIDOMHTMLBRElement.h \
|
||||
nsIDOMHTMLBaseElement.h \
|
||||
nsIDOMHTMLBaseFontElement.h \
|
||||
nsIDOMHTMLBodyElement.h \
|
||||
nsIDOMHTMLButtonElement.h \
|
||||
nsIDOMHTMLCollection.h \
|
||||
nsIDOMHTMLDListElement.h \
|
||||
nsIDOMHTMLDirectoryElement.h \
|
||||
nsIDOMHTMLDivElement.h \
|
||||
nsIDOMHTMLDocument.h \
|
||||
nsIDOMHTMLElement.h \
|
||||
nsIDOMHTMLEmbedElement.h \
|
||||
nsIDOMHTMLFieldSetElement.h \
|
||||
nsIDOMHTMLFontElement.h \
|
||||
nsIDOMHTMLFormElement.h \
|
||||
nsIDOMHTMLFormControlList.h \
|
||||
nsIDOMNSHTMLFormElement.h \
|
||||
nsIDOMHTMLFrameElement.h \
|
||||
nsIDOMHTMLFrameSetElement.h \
|
||||
nsIDOMHTMLHRElement.h \
|
||||
nsIDOMHTMLHeadElement.h \
|
||||
nsIDOMHTMLHeadingElement.h \
|
||||
nsIDOMHTMLHtmlElement.h \
|
||||
nsIDOMHTMLImageElement.h \
|
||||
nsIDOMHTMLInputElement.h \
|
||||
nsIDOMNSHTMLInputElement.h \
|
||||
nsIDOMHTMLIsIndexElement.h \
|
||||
nsIDOMHTMLLIElement.h \
|
||||
nsIDOMHTMLLabelElement.h \
|
||||
nsIDOMHTMLLayerElement.h \
|
||||
nsIDOMHTMLLegendElement.h \
|
||||
nsIDOMHTMLLinkElement.h \
|
||||
nsIDOMHTMLMapElement.h \
|
||||
nsIDOMHTMLMenuElement.h \
|
||||
nsIDOMHTMLMetaElement.h \
|
||||
nsIDOMHTMLModElement.h \
|
||||
nsIDOMHTMLOListElement.h \
|
||||
nsIDOMHTMLObjectElement.h \
|
||||
nsIDOMHTMLOptGroupElement.h \
|
||||
nsIDOMHTMLOptionElement.h \
|
||||
nsIDOMNSHTMLOptionCollection.h \
|
||||
nsIDOMHTMLParagraphElement.h \
|
||||
nsIDOMHTMLParamElement.h \
|
||||
nsIDOMHTMLPreElement.h \
|
||||
nsIDOMHTMLQuoteElement.h \
|
||||
nsIDOMHTMLScriptElement.h \
|
||||
nsIDOMHTMLSelectElement.h \
|
||||
nsIDOMNSHTMLSelectElement.h \
|
||||
nsIDOMHTMLStyleElement.h \
|
||||
nsIDOMHTMLTableCaptionElement.h \
|
||||
nsIDOMHTMLTableCellElement.h \
|
||||
nsIDOMHTMLTableColElement.h \
|
||||
nsIDOMHTMLTableElement.h \
|
||||
nsIDOMHTMLTableRowElement.h \
|
||||
nsIDOMHTMLTableSectionElement.h \
|
||||
nsIDOMHTMLTextAreaElement.h \
|
||||
nsIDOMNSHTMLTextAreaElement.h \
|
||||
nsIDOMHTMLTitleElement.h \
|
||||
nsIDOMHTMLUListElement.h \
|
||||
nsIDOMImage.h \
|
||||
nsIDOMNSHTMLButtonElement.h \
|
||||
nsIDOMNSHTMLDocument.h \
|
||||
nsIDOMOption.h \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
@ -94,7 +94,10 @@ EXPORTS2= \
|
|||
nsIDOMImage.h \
|
||||
nsIDOMNSHTMLButtonElement.h \
|
||||
nsIDOMNSHTMLDocument.h \
|
||||
nsIDOMOption.h
|
||||
nsIDOMOption.h \
|
||||
nsIDOMNSHTMLAnchorElement.h \
|
||||
nsIDOMNSHTMLAreaElement.h
|
||||
|
||||
|
||||
MODULE=dom
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ public:
|
|||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex)=0;
|
||||
|
||||
NS_IMETHOD GetType(nsString& aType)=0;
|
||||
NS_IMETHOD SetType(const nsString& aType)=0;
|
||||
|
||||
NS_IMETHOD GetUseMap(nsString& aUseMap)=0;
|
||||
NS_IMETHOD SetUseMap(const nsString& aUseMap)=0;
|
||||
|
@ -135,6 +136,7 @@ public:
|
|||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex); \
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); \
|
||||
NS_IMETHOD GetType(nsString& aType); \
|
||||
NS_IMETHOD SetType(const nsString& aType); \
|
||||
NS_IMETHOD GetUseMap(nsString& aUseMap); \
|
||||
NS_IMETHOD SetUseMap(const nsString& aUseMap); \
|
||||
NS_IMETHOD GetValue(nsString& aValue); \
|
||||
|
@ -179,6 +181,7 @@ public:
|
|||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) { return _to GetTabIndex(aTabIndex); } \
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return _to SetTabIndex(aTabIndex); } \
|
||||
NS_IMETHOD GetType(nsString& aType) { return _to GetType(aType); } \
|
||||
NS_IMETHOD SetType(const nsString& aType) { return _to SetType(aType); } \
|
||||
NS_IMETHOD GetUseMap(nsString& aUseMap) { return _to GetUseMap(aUseMap); } \
|
||||
NS_IMETHOD SetUseMap(const nsString& aUseMap) { return _to SetUseMap(aUseMap); } \
|
||||
NS_IMETHOD GetValue(nsString& aValue) { return _to GetValue(aValue); } \
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
/* AUTO-GENERATED. DO NOT EDIT!!! */
|
||||
|
||||
#ifndef nsIDOMNSHTMLAnchorElement_h__
|
||||
#define nsIDOMNSHTMLAnchorElement_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIScriptContext.h"
|
||||
|
||||
|
||||
#define NS_IDOMNSHTMLANCHORELEMENT_IID \
|
||||
{ 0xa6cf911c, 0x15b3, 0x11d2, \
|
||||
{ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
|
||||
|
||||
class nsIDOMNSHTMLAnchorElement : public nsISupports {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_IDOMNSHTMLANCHORELEMENT_IID; return iid; }
|
||||
|
||||
NS_IMETHOD GetProtocol(nsString& aProtocol)=0;
|
||||
|
||||
NS_IMETHOD GetHost(nsString& aHost)=0;
|
||||
|
||||
NS_IMETHOD GetHostname(nsString& aHostname)=0;
|
||||
|
||||
NS_IMETHOD GetPathname(nsString& aPathname)=0;
|
||||
|
||||
NS_IMETHOD GetSearch(nsString& aSearch)=0;
|
||||
|
||||
NS_IMETHOD GetPort(nsString& aPort)=0;
|
||||
|
||||
NS_IMETHOD GetHash(nsString& aHash)=0;
|
||||
|
||||
NS_IMETHOD GetText(nsString& aText)=0;
|
||||
};
|
||||
|
||||
|
||||
#define NS_DECL_IDOMNSHTMLANCHORELEMENT \
|
||||
NS_IMETHOD GetProtocol(nsString& aProtocol); \
|
||||
NS_IMETHOD GetHost(nsString& aHost); \
|
||||
NS_IMETHOD GetHostname(nsString& aHostname); \
|
||||
NS_IMETHOD GetPathname(nsString& aPathname); \
|
||||
NS_IMETHOD GetSearch(nsString& aSearch); \
|
||||
NS_IMETHOD GetPort(nsString& aPort); \
|
||||
NS_IMETHOD GetHash(nsString& aHash); \
|
||||
NS_IMETHOD GetText(nsString& aText); \
|
||||
|
||||
|
||||
|
||||
#define NS_FORWARD_IDOMNSHTMLANCHORELEMENT(_to) \
|
||||
NS_IMETHOD GetProtocol(nsString& aProtocol) { return _to GetProtocol(aProtocol); } \
|
||||
NS_IMETHOD GetHost(nsString& aHost) { return _to GetHost(aHost); } \
|
||||
NS_IMETHOD GetHostname(nsString& aHostname) { return _to GetHostname(aHostname); } \
|
||||
NS_IMETHOD GetPathname(nsString& aPathname) { return _to GetPathname(aPathname); } \
|
||||
NS_IMETHOD GetSearch(nsString& aSearch) { return _to GetSearch(aSearch); } \
|
||||
NS_IMETHOD GetPort(nsString& aPort) { return _to GetPort(aPort); } \
|
||||
NS_IMETHOD GetHash(nsString& aHash) { return _to GetHash(aHash); } \
|
||||
NS_IMETHOD GetText(nsString& aText) { return _to GetText(aText); } \
|
||||
|
||||
|
||||
#endif // nsIDOMNSHTMLAnchorElement_h__
|
|
@ -0,0 +1,77 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
/* AUTO-GENERATED. DO NOT EDIT!!! */
|
||||
|
||||
#ifndef nsIDOMNSHTMLAreaElement_h__
|
||||
#define nsIDOMNSHTMLAreaElement_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIScriptContext.h"
|
||||
|
||||
|
||||
#define NS_IDOMNSHTMLAREAELEMENT_IID \
|
||||
{ 0xa6cf911b, 0x15b3, 0x11d2, \
|
||||
{ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
|
||||
|
||||
class nsIDOMNSHTMLAreaElement : public nsISupports {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_IDOMNSHTMLAREAELEMENT_IID; return iid; }
|
||||
|
||||
NS_IMETHOD GetProtocol(nsString& aProtocol)=0;
|
||||
|
||||
NS_IMETHOD GetHost(nsString& aHost)=0;
|
||||
|
||||
NS_IMETHOD GetHostname(nsString& aHostname)=0;
|
||||
|
||||
NS_IMETHOD GetPathname(nsString& aPathname)=0;
|
||||
|
||||
NS_IMETHOD GetSearch(nsString& aSearch)=0;
|
||||
|
||||
NS_IMETHOD GetPort(nsString& aPort)=0;
|
||||
|
||||
NS_IMETHOD GetHash(nsString& aHash)=0;
|
||||
};
|
||||
|
||||
|
||||
#define NS_DECL_IDOMNSHTMLAREAELEMENT \
|
||||
NS_IMETHOD GetProtocol(nsString& aProtocol); \
|
||||
NS_IMETHOD GetHost(nsString& aHost); \
|
||||
NS_IMETHOD GetHostname(nsString& aHostname); \
|
||||
NS_IMETHOD GetPathname(nsString& aPathname); \
|
||||
NS_IMETHOD GetSearch(nsString& aSearch); \
|
||||
NS_IMETHOD GetPort(nsString& aPort); \
|
||||
NS_IMETHOD GetHash(nsString& aHash); \
|
||||
|
||||
|
||||
|
||||
#define NS_FORWARD_IDOMNSHTMLAREAELEMENT(_to) \
|
||||
NS_IMETHOD GetProtocol(nsString& aProtocol) { return _to GetProtocol(aProtocol); } \
|
||||
NS_IMETHOD GetHost(nsString& aHost) { return _to GetHost(aHost); } \
|
||||
NS_IMETHOD GetHostname(nsString& aHostname) { return _to GetHostname(aHostname); } \
|
||||
NS_IMETHOD GetPathname(nsString& aPathname) { return _to GetPathname(aPathname); } \
|
||||
NS_IMETHOD GetSearch(nsString& aSearch) { return _to GetSearch(aSearch); } \
|
||||
NS_IMETHOD GetPort(nsString& aPort) { return _to GetPort(aPort); } \
|
||||
NS_IMETHOD GetHash(nsString& aHash) { return _to GetHash(aHash); } \
|
||||
|
||||
|
||||
#endif // nsIDOMNSHTMLAreaElement_h__
|
|
@ -1,19 +0,0 @@
|
|||
interface HTMLAnchorElement : HTMLElement {
|
||||
/* IID: { 0xa6cf90aa, 0x15b3, 0x11d2, \
|
||||
{ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */
|
||||
|
||||
attribute DOMString accessKey;
|
||||
attribute DOMString charset;
|
||||
attribute DOMString coords;
|
||||
attribute DOMString href;
|
||||
attribute DOMString hreflang;
|
||||
attribute DOMString name;
|
||||
attribute DOMString rel;
|
||||
attribute DOMString rev;
|
||||
attribute DOMString shape;
|
||||
attribute long tabIndex;
|
||||
attribute DOMString target;
|
||||
attribute DOMString type;
|
||||
void blur();
|
||||
void focus();
|
||||
};
|
|
@ -1,13 +0,0 @@
|
|||
interface HTMLAreaElement : HTMLElement {
|
||||
/* IID: { 0xa6cf90b0, 0x15b3, 0x11d2, \
|
||||
{ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */
|
||||
|
||||
attribute DOMString accessKey;
|
||||
attribute DOMString alt;
|
||||
attribute DOMString coords;
|
||||
attribute DOMString href;
|
||||
attribute boolean noHref;
|
||||
attribute DOMString shape;
|
||||
attribute long tabIndex;
|
||||
attribute DOMString target;
|
||||
};
|
|
@ -17,7 +17,7 @@
|
|||
attribute DOMString size;
|
||||
attribute DOMString src;
|
||||
attribute long tabIndex;
|
||||
readonly attribute DOMString type;
|
||||
attribute DOMString type;
|
||||
attribute DOMString useMap;
|
||||
attribute DOMString value;
|
||||
attribute DOMString autocomplete;
|
||||
|
|
|
@ -684,6 +684,21 @@ enum nsDOMProp {
|
|||
NS_DOM_PROP_NSDOCUMENT_HEIGHT,
|
||||
NS_DOM_PROP_NSDOCUMENT_STYLESHEETS,
|
||||
NS_DOM_PROP_NSDOCUMENT_WIDTH,
|
||||
NS_DOM_PROP_NSHTMLANCHORELEMENT_PROTOCOL,
|
||||
NS_DOM_PROP_NSHTMLANCHORELEMENT_HOST,
|
||||
NS_DOM_PROP_NSHTMLANCHORELEMENT_HOSTNAME,
|
||||
NS_DOM_PROP_NSHTMLANCHORELEMENT_PATHNAME,
|
||||
NS_DOM_PROP_NSHTMLANCHORELEMENT_SEARCH,
|
||||
NS_DOM_PROP_NSHTMLANCHORELEMENT_PORT,
|
||||
NS_DOM_PROP_NSHTMLANCHORELEMENT_HASH,
|
||||
NS_DOM_PROP_NSHTMLANCHORELEMENT_TEXT,
|
||||
NS_DOM_PROP_NSHTMLAREAELEMENT_PROTOCOL,
|
||||
NS_DOM_PROP_NSHTMLAREAELEMENT_HOST,
|
||||
NS_DOM_PROP_NSHTMLAREAELEMENT_HOSTNAME,
|
||||
NS_DOM_PROP_NSHTMLAREAELEMENT_PATHNAME,
|
||||
NS_DOM_PROP_NSHTMLAREAELEMENT_SEARCH,
|
||||
NS_DOM_PROP_NSHTMLAREAELEMENT_PORT,
|
||||
NS_DOM_PROP_NSHTMLAREAELEMENT_HASH,
|
||||
NS_DOM_PROP_NSHTMLBUTTONELEMENT_BLUR,
|
||||
NS_DOM_PROP_NSHTMLBUTTONELEMENT_FOCUS,
|
||||
NS_DOM_PROP_NSHTMLDOCUMENT_ALINKCOLOR,
|
||||
|
|
|
@ -683,6 +683,21 @@
|
|||
"nsdocument.height", \
|
||||
"nsdocument.stylesheets", \
|
||||
"nsdocument.width", \
|
||||
"nshtmlanchorelement.protocol", \
|
||||
"nshtmlanchorelement.host", \
|
||||
"nshtmlanchorelement.hostname", \
|
||||
"nshtmlanchorelement.pathname", \
|
||||
"nshtmlanchorelement.search", \
|
||||
"nshtmlanchorelement.port", \
|
||||
"nshtmlanchorelement.hash", \
|
||||
"nshtmlanchorelement.text", \
|
||||
"nshtmlareaelement.protocol", \
|
||||
"nshtmlareaelement.host", \
|
||||
"nshtmlareaelement.hostname", \
|
||||
"nshtmlareaelement.pathname", \
|
||||
"nshtmlareaelement.search", \
|
||||
"nshtmlareaelement.port", \
|
||||
"nshtmlareaelement.hash", \
|
||||
"nshtmlbuttonelement.blur", \
|
||||
"nshtmlbuttonelement.focus", \
|
||||
"nshtmldocument.alinkcolor", \
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#define nsIJSScriptObject_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIScriptObjectOwner.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
#define NS_IJSSCRIPTOBJECT_IID \
|
||||
|
@ -39,7 +40,7 @@
|
|||
* <P>
|
||||
* It is used by the script runtime to collect information about an object
|
||||
*/
|
||||
class nsIJSScriptObject : public nsISupports {
|
||||
class nsIJSScriptObject : public nsIScriptObjectOwner {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_IJSSCRIPTOBJECT_IID; return iid; }
|
||||
virtual PRBool AddProperty(JSContext *aContext, JSObject *aObj, jsval aID,
|
||||
|
|
|
@ -3265,8 +3265,10 @@ NS_IMETHODIMP GlobalWindowImpl::ClearTimeoutOrInterval(PRInt32 aTimerID)
|
|||
nsTimeoutImpl **top, *timeout;
|
||||
|
||||
public_id = (PRUint32)aTimerID;
|
||||
if(!public_id) /* id of zero is reserved for internal use */
|
||||
return NS_ERROR_FAILURE;
|
||||
if(!public_id) { /* id of zero is reserved for internal use */
|
||||
/* return silently for compatibility (see bug 30700) */
|
||||
return NS_OK;
|
||||
}
|
||||
for(top = &mTimeouts; (timeout = *top) != NULL; top = &timeout->next)
|
||||
{
|
||||
if(timeout->public_id == public_id)
|
||||
|
|
|
@ -70,8 +70,7 @@ class HistoryImpl;
|
|||
//*****************************************************************************
|
||||
// GlobalWindowImpl: Global Object for Scripting
|
||||
//*****************************************************************************
|
||||
class GlobalWindowImpl : public nsIScriptObjectOwner,
|
||||
public nsIScriptGlobalObject,
|
||||
class GlobalWindowImpl : public nsIScriptGlobalObject,
|
||||
public nsIDOMWindow,
|
||||
public nsIJSScriptObject,
|
||||
public nsIScriptObjectPrincipal,
|
||||
|
@ -276,8 +275,7 @@ class nsIURI;
|
|||
// LocationImpl: Script "location" object
|
||||
//*****************************************************************************
|
||||
|
||||
class LocationImpl : public nsIScriptObjectOwner,
|
||||
public nsIDOMLocation,
|
||||
class LocationImpl : public nsIDOMLocation,
|
||||
public nsIDOMNSLocation,
|
||||
public nsIJSScriptObject
|
||||
{
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче