NS_INTERFACE_MAP_BEGIN(nsComputedDOMStyle) NS_INTERFACE_MAP_ENTRY(nsIComputedDOMStyle) NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleDeclaration) NS_INTERFACE_MAP_ENTRY(nsIScriptObjectOwner) NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIComputedDOMStyle) NS_INTERFACE_MAP_END
nsComputedDOMStyle::QueryInterface(REFNSIID aIID, void** aInstancePtr) { if (!aInstancePtr) { NS_ERROR("QueryInterface requires a non-NULL destination!"); return NS_ERROR_NULL_POINTER; }  nsISupports* inst;  if (aIID.Equals(NS_GET_IID(nsIComputedDOMStyle))) { inst = NS_STATIC_CAST(nsIComputedDOMStyle*, this); } else if (aIID.Equals(NS_GET_IID(nsIDOMCSSStyleDeclaration))) { inst = NS_STATIC_CAST(nsIDOMCSSStyleDeclaration*, this); } else if (aIID.Equals(NS_GET_IID(nsIDOMCSS2Properties))) { if (!mInner) { mInner = new CSS2PropertiesTearoff(this); NS_ENSURE_TRUE(mInner, NS_ERROR_OUT_OF_MEMORY); } inst = NS_STATIC_CAST(nsIDOMCSS2Properties*, NS_STATIC_CAST(nsISupports*, mInner)); } else if (aIID.Equals(NS_GET_IID(nsIDOMNSCSS2Properties))) { if (!mInner) { mInner = new CSS2PropertiesTearoff(this); NS_ENSURE_TRUE(mInner, NS_ERROR_OUT_OF_MEMORY); } inst = NS_STATIC_CAST(nsIDOMNSCSS2Properties*, NS_STATIC_CAST(nsISupports*, mInner)); } else if (aIID.Equals(NS_GET_IID(nsISupports))) { inst = NS_STATIC_CAST(nsISupports*, NS_STATIC_CAST(nsIComputedDOMStyle*, this)); } else if (aIID.Equals(NS_GET_IID(nsIClassInfo))) { inst = nsContentUtils::GetClassInfoInstance(eDOMClassInfo_ComputedCSSStyleDeclaration_id); NS_ENSURE_TRUE(inst, NS_ERROR_OUT_OF_MEMORY); } else { inst = nsnull; }  nsresult rv; if (!inst) { rv = NS_NOINTERFACE; } else { NS_ADDREF(inst); rv = NS_OK; }  *aInstancePtr = inst; return rv; }
NS_INTERFACE_MAP_BEGIN(nsComputedDOMStyle)   NS_INTERFACE_MAP_ENTRY(nsIComputedDOMStyle)   NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleDeclaration)   NS_INTERFACE_MAP_ENTRY(nsIScriptObjectOwner)   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIComputedDOMStyle)NS_INTERFACE_MAP_END