Enabled nsHTMLFrameElement and nsHTMLIFrameElement to implement the nsIChromeEventHandler interface. r=hyatt

This commit is contained in:
tbogard%aol.net 1999-11-23 09:42:49 +00:00
Родитель 214c6f7a18
Коммит 9de401c5e3
4 изменённых файлов: 100 добавлений и 4 удалений

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

@ -30,13 +30,15 @@
#include "nsIMutableStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsIChromeEventHandler.h"
static NS_DEFINE_IID(kIDOMHTMLFrameElementIID, NS_IDOMHTMLFRAMEELEMENT_IID);
class nsHTMLFrameElement : public nsIDOMHTMLFrameElement,
public nsIScriptObjectOwner,
public nsIDOMEventReceiver,
public nsIHTMLContent
public nsIHTMLContent,
public nsIChromeEventHandler
{
public:
nsHTMLFrameElement(nsIAtom* aTag);
@ -84,6 +86,9 @@ public:
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
// nsIChromeEventHandler
NS_DECL_NSICHROMEEVENTHANDLER
protected:
nsGenericHTMLLeafElement mInner;
};
@ -127,6 +132,11 @@ nsHTMLFrameElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_ADDREF_THIS();
return NS_OK;
}
else if (aIID.Equals(NS_GET_IID(nsIChromeEventHandler))) {
*aInstancePtr = NS_STATIC_CAST(nsIChromeEventHandler*, this);
NS_ADDREF_THIS();
return NS_OK;
}
return NS_NOINTERFACE;
}
@ -252,3 +262,16 @@ nsHTMLFrameElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
return mInner.SizeOf(aSizer, aResult, sizeof(*this));
}
//*****************************************************************************
// nsHTMLFrameElement::nsIChromeEventHandler
//*****************************************************************************
NS_IMETHODIMP nsHTMLFrameElement::HandleChromeEvent(nsIPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent, PRUint32 aFlags,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG(aPresContext);
NS_ENSURE_ARG_POINTER(aEventStatus);
return HandleDOMEvent(*aPresContext, aEvent, aDOMEvent, aFlags,*aEventStatus);
}

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

@ -31,13 +31,15 @@
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsIHTMLAttributes.h"
#include "nsIChromeEventHandler.h"
static NS_DEFINE_IID(kIDOMHTMLIFrameElementIID, NS_IDOMHTMLIFRAMEELEMENT_IID);
class nsHTMLIFrameElement : public nsIDOMHTMLIFrameElement,
public nsIScriptObjectOwner,
public nsIDOMEventReceiver,
public nsIHTMLContent
public nsIHTMLContent,
public nsIChromeEventHandler
{
public:
nsHTMLIFrameElement(nsIAtom* aTag);
@ -89,6 +91,9 @@ public:
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
// nsIChromeEventHandler
NS_DECL_NSICHROMEEVENTHANDLER
protected:
nsGenericHTMLContainerElement mInner;
};
@ -132,6 +137,11 @@ nsHTMLIFrameElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_ADDREF_THIS();
return NS_OK;
}
else if (aIID.Equals(NS_GET_IID(nsIChromeEventHandler))) {
*aInstancePtr = NS_STATIC_CAST(nsIChromeEventHandler*, this);
NS_ADDREF_THIS();
return NS_OK;
}
return NS_NOINTERFACE;
}
@ -311,3 +321,18 @@ nsHTMLIFrameElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
return mInner.SizeOf(aSizer, aResult, sizeof(*this));
}
//*****************************************************************************
// nsHTMLIFrameElement::nsIChromeEventHandler
//*****************************************************************************
NS_IMETHODIMP nsHTMLIFrameElement::HandleChromeEvent(nsIPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent, PRUint32 aFlags,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG(aPresContext);
NS_ENSURE_ARG_POINTER(aEventStatus);
return HandleDOMEvent(*aPresContext, aEvent, aDOMEvent, aFlags,*aEventStatus);
}

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

@ -30,13 +30,15 @@
#include "nsIMutableStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsIChromeEventHandler.h"
static NS_DEFINE_IID(kIDOMHTMLFrameElementIID, NS_IDOMHTMLFRAMEELEMENT_IID);
class nsHTMLFrameElement : public nsIDOMHTMLFrameElement,
public nsIScriptObjectOwner,
public nsIDOMEventReceiver,
public nsIHTMLContent
public nsIHTMLContent,
public nsIChromeEventHandler
{
public:
nsHTMLFrameElement(nsIAtom* aTag);
@ -84,6 +86,9 @@ public:
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
// nsIChromeEventHandler
NS_DECL_NSICHROMEEVENTHANDLER
protected:
nsGenericHTMLLeafElement mInner;
};
@ -127,6 +132,11 @@ nsHTMLFrameElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_ADDREF_THIS();
return NS_OK;
}
else if (aIID.Equals(NS_GET_IID(nsIChromeEventHandler))) {
*aInstancePtr = NS_STATIC_CAST(nsIChromeEventHandler*, this);
NS_ADDREF_THIS();
return NS_OK;
}
return NS_NOINTERFACE;
}
@ -252,3 +262,16 @@ nsHTMLFrameElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
return mInner.SizeOf(aSizer, aResult, sizeof(*this));
}
//*****************************************************************************
// nsHTMLFrameElement::nsIChromeEventHandler
//*****************************************************************************
NS_IMETHODIMP nsHTMLFrameElement::HandleChromeEvent(nsIPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent, PRUint32 aFlags,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG(aPresContext);
NS_ENSURE_ARG_POINTER(aEventStatus);
return HandleDOMEvent(*aPresContext, aEvent, aDOMEvent, aFlags,*aEventStatus);
}

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

@ -31,13 +31,15 @@
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsIHTMLAttributes.h"
#include "nsIChromeEventHandler.h"
static NS_DEFINE_IID(kIDOMHTMLIFrameElementIID, NS_IDOMHTMLIFRAMEELEMENT_IID);
class nsHTMLIFrameElement : public nsIDOMHTMLIFrameElement,
public nsIScriptObjectOwner,
public nsIDOMEventReceiver,
public nsIHTMLContent
public nsIHTMLContent,
public nsIChromeEventHandler
{
public:
nsHTMLIFrameElement(nsIAtom* aTag);
@ -89,6 +91,9 @@ public:
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
// nsIChromeEventHandler
NS_DECL_NSICHROMEEVENTHANDLER
protected:
nsGenericHTMLContainerElement mInner;
};
@ -132,6 +137,11 @@ nsHTMLIFrameElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_ADDREF_THIS();
return NS_OK;
}
else if (aIID.Equals(NS_GET_IID(nsIChromeEventHandler))) {
*aInstancePtr = NS_STATIC_CAST(nsIChromeEventHandler*, this);
NS_ADDREF_THIS();
return NS_OK;
}
return NS_NOINTERFACE;
}
@ -311,3 +321,18 @@ nsHTMLIFrameElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
return mInner.SizeOf(aSizer, aResult, sizeof(*this));
}
//*****************************************************************************
// nsHTMLIFrameElement::nsIChromeEventHandler
//*****************************************************************************
NS_IMETHODIMP nsHTMLIFrameElement::HandleChromeEvent(nsIPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent, PRUint32 aFlags,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG(aPresContext);
NS_ENSURE_ARG_POINTER(aEventStatus);
return HandleDOMEvent(*aPresContext, aEvent, aDOMEvent, aFlags,*aEventStatus);
}