Add an IID for nsGenericHTMLElement so that QI behaves as expected. This should fix the startup test bustage.

This commit is contained in:
bryner%brianryner.com 2005-01-13 01:31:42 +00:00
parent f5935fad8b
commit 815fafdbf9
2 changed files with 13 additions and 0 deletions

View File

@ -231,6 +231,10 @@ NS_INTERFACE_MAP_END_AGGREGATED(mElement)
static nsICSSOMFactory* gCSSOMFactory = nsnull;
static NS_DEFINE_CID(kCSSOMFactoryCID, NS_CSSOMFACTORY_CID);
NS_INTERFACE_MAP_BEGIN(nsGenericHTMLElement)
NS_INTERFACE_MAP_ENTRY(nsGenericHTMLElement)
NS_INTERFACE_MAP_END_INHERITING(nsGenericElement)
NS_IMPL_INT_ATTR(nsGenericHTMLElement, TabIndex, tabindex)
nsresult

View File

@ -71,6 +71,9 @@ typedef void (*nsMapRuleToAttributesFunc)(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
#define NS_GENERICHTMLELEMENT_IID \
{0x362256e8,0x64fa,0x11d9,{0x9f,0x6b,0x00,0x0a,0x95,0xd5,0x35,0xfa}}
/**
* A common superclass for HTML elements
*/
@ -82,6 +85,9 @@ public:
{
}
/* Support QI directly to this class. */
NS_DEFINE_STATIC_IID_ACCESSOR(NS_GENERICHTMLELEMENT_IID)
/** Typesafe, non-refcounting cast from nsIContent. Cheaper than QI. **/
static nsGenericHTMLElement* FromContent(nsIContent *aContent)
{
@ -93,6 +99,9 @@ public:
/** Call on shutdown to release globals */
static void Shutdown();
// nsISupports
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
/**
* Handle QI for the standard DOM interfaces (DOMNode, DOMElement,
* DOMHTMLElement) and handles tearoffs for other standard interfaces.