Speed up mapping HTML tag enums to atoms by using an array of static atoms, indexed by enum value. This avoids a UTF16 to UTF8 conversion and atom table lookup for each tag. Add a CString version of nsINodeInfoManager::GetNodeInfo(), convert literal string callers to use that version, and remove some unused variants of GetNodeInfo(). Bug 223595, r=axel@pike.org, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@148857 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -903,6 +903,17 @@ CViewSourceHTML::IntTagToStringTag(PRInt32 aIntTag) const
|
||||
return str_ptr;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsIAtom *)
|
||||
CViewSourceHTML::IntTagToAtom(PRInt32 aIntTag) const
|
||||
{
|
||||
nsIAtom *atom = nsHTMLTags::GetAtom((nsHTMLTag)aIntTag);
|
||||
|
||||
NS_ASSERTION(atom, "Bad tag enum passed to COtherDTD::IntTagToAtom()"
|
||||
"!!");
|
||||
|
||||
return atom;
|
||||
}
|
||||
|
||||
PRBool CViewSourceHTML::IsBlockElement(PRInt32 aTagID,PRInt32 aParentID) const {
|
||||
PRBool result=PR_FALSE;
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user