Fixing bug 108321. Don't waste time using the component manager when creating an nsHTMLAttributes when setting attributes on an element, call NS_NewHTMLAttributes() directly in stead. Also doing some cleaning up in nsHTMLStyleSheet.cpp. r=dbaron@fas.harvard.edu, sr=hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107237 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1575,20 +1575,15 @@ void HTMLAttributesImpl::SizeOf(nsISizeOfHandler* aSizer, PRUint32 &aResult)
|
||||
}
|
||||
#endif
|
||||
|
||||
extern NS_EXPORT nsresult
|
||||
NS_NewHTMLAttributes(nsIHTMLAttributes** aInstancePtrResult)
|
||||
nsresult
|
||||
NS_NewHTMLAttributes(nsIHTMLAttributes** aInstancePtrResult)
|
||||
{
|
||||
if (aInstancePtrResult == nsnull) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
*aInstancePtrResult = new HTMLAttributesImpl();
|
||||
NS_ENSURE_TRUE(*aInstancePtrResult, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
HTMLAttributesImpl *it = new HTMLAttributesImpl();
|
||||
NS_ADDREF(*aInstancePtrResult);
|
||||
|
||||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
return it->QueryInterface(NS_GET_IID(nsIHTMLAttributes), (void **) aInstancePtrResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user