Use NS_LITERAL_STRING instead of an nsAutoString to avoid copy/inflate on platforms that support two-byte wchar_t. r=attinasi

This commit is contained in:
waterson@netscape.com
2000-06-20 05:45:07 +00:00
parent 9ad2e24c8c
commit 3900cd6cc7
3 changed files with 3 additions and 12 deletions

View File

@@ -3826,13 +3826,10 @@ PRBool IsSimpleXlink(nsIContent *aContent, nsString &aHREF)
// first see if we have an XML element
nsCOMPtr<nsIXMLContent> xml(do_QueryInterface(aContent));
if (xml) {
nsAutoString strSimple;
strSimple.AssignWithConversion("simple");
// see if it is type=simple (we don't deal with other types)
nsAutoString val;
aContent->GetAttribute(kNameSpaceID_XLink, nsHTMLAtoms::type, val);
if (val == strSimple) {
if (val == NS_LITERAL_STRING("simple")) {
// see if there is an xlink namespace'd href attribute:
// - get it if there is, if not no big deal, it is not required for xlinks
aContent->GetAttribute(kNameSpaceID_XLink, nsHTMLAtoms::href, aHREF);