Fix the static nsCOMPtr<nsIAtom> atom("type"), replacing it with nsHTMLAtoms::type, to fix an assertion on shutdown.

This commit is contained in:
sfraser%netscape.com 2000-05-17 02:23:59 +00:00
Родитель a6004caf58
Коммит 3ca711ff8c
3 изменённых файлов: 3 добавлений и 6 удалений

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

@ -3795,7 +3795,6 @@ PRBool IsSimpleXlink(nsIContent *aContent, nsString &aHREF)
// first see if we have an XML element
nsCOMPtr<nsIXMLContent> xml(do_QueryInterface(aContent));
if (xml) {
static nsCOMPtr<nsIAtom> kTypeAtom = getter_AddRefs(NS_NewAtom("type")); // NOTE: this should be in an atom table but isn't
nsAutoString strSimple;
strSimple.AssignWithConversion("simple");
@ -3804,7 +3803,7 @@ PRBool IsSimpleXlink(nsIContent *aContent, nsString &aHREF)
if (NS_CONTENT_ATTR_HAS_VALUE == attrState) {
// see if it is type=simple (we don't deal with other types)
nsAutoString val;
attrState = aContent->GetAttribute(kNameSpaceID_XLink, kTypeAtom, val);
attrState = aContent->GetAttribute(kNameSpaceID_XLink, nsHTMLAtoms::type, val);
if (val == strSimple) {
rv = PR_TRUE;
}

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

@ -3795,7 +3795,6 @@ PRBool IsSimpleXlink(nsIContent *aContent, nsString &aHREF)
// first see if we have an XML element
nsCOMPtr<nsIXMLContent> xml(do_QueryInterface(aContent));
if (xml) {
static nsCOMPtr<nsIAtom> kTypeAtom = getter_AddRefs(NS_NewAtom("type")); // NOTE: this should be in an atom table but isn't
nsAutoString strSimple;
strSimple.AssignWithConversion("simple");
@ -3804,7 +3803,7 @@ PRBool IsSimpleXlink(nsIContent *aContent, nsString &aHREF)
if (NS_CONTENT_ATTR_HAS_VALUE == attrState) {
// see if it is type=simple (we don't deal with other types)
nsAutoString val;
attrState = aContent->GetAttribute(kNameSpaceID_XLink, kTypeAtom, val);
attrState = aContent->GetAttribute(kNameSpaceID_XLink, nsHTMLAtoms::type, val);
if (val == strSimple) {
rv = PR_TRUE;
}

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

@ -3795,7 +3795,6 @@ PRBool IsSimpleXlink(nsIContent *aContent, nsString &aHREF)
// first see if we have an XML element
nsCOMPtr<nsIXMLContent> xml(do_QueryInterface(aContent));
if (xml) {
static nsCOMPtr<nsIAtom> kTypeAtom = getter_AddRefs(NS_NewAtom("type")); // NOTE: this should be in an atom table but isn't
nsAutoString strSimple;
strSimple.AssignWithConversion("simple");
@ -3804,7 +3803,7 @@ PRBool IsSimpleXlink(nsIContent *aContent, nsString &aHREF)
if (NS_CONTENT_ATTR_HAS_VALUE == attrState) {
// see if it is type=simple (we don't deal with other types)
nsAutoString val;
attrState = aContent->GetAttribute(kNameSpaceID_XLink, kTypeAtom, val);
attrState = aContent->GetAttribute(kNameSpaceID_XLink, nsHTMLAtoms::type, val);
if (val == strSimple) {
rv = PR_TRUE;
}