Fixing bug 109400. Removing unnecessary layers of abstraction from nsHTMLTags that does nothing for us except using more memory than we need to use, and makes us slower. This makes nsHTMLTags::LookupTag() 4 times faster. r=harishd@netscape.com, rs=vidur@netscape.com

git-svn-id: svn://10.0.0.236/trunk@109117 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%netscape.com
2001-11-28 06:13:11 +00:00
parent d86dad5995
commit e9bd9a6f04
52 changed files with 2075 additions and 995 deletions

View File

@@ -354,24 +354,23 @@ void nsCParserNode::GetSource(nsString& aString) {
aString.Truncate();
eHTMLTags theTag=(eHTMLTags)mToken->GetTypeID();
aString.AppendWithConversion("<");
const char* theTagName=nsHTMLTags::GetCStringValue(theTag);
aString.Append(PRUnichar('<'));
const PRUnichar* theTagName=nsHTMLTags::GetStringValue(theTag);
if(theTagName) {
aString.AppendWithConversion(theTagName);
aString.Append(theTagName);
}
if(mAttributes) {
nsAutoString theAttrStr;
int index=0;
for(index=0;index<mAttributes->GetSize();index++) {
CAttributeToken *theToken=(CAttributeToken*)mAttributes->ObjectAt(index);
if(theToken) {
theToken->AppendSource(theAttrStr);
aString.AppendWithConversion(" "); //this will get removed...
theToken->AppendSource(aString);
aString.Append(PRUnichar(' ')); //this will get removed...
}
}
aString.Append(theAttrStr);
}
aString.AppendWithConversion(">");
aString.Append(PRUnichar('>'));
}
/** Release all the objects you're holding to.