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
Родитель 7c69c70b1b
Коммит 0abe95456d
3 изменённых файлов: 3 добавлений и 12 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -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);

Просмотреть файл

@ -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);