From 2a81aed4d19d7c30b5c6680b5b926939b2571032 Mon Sep 17 00:00:00 2001 From: "peterl%netscape.com" Date: Wed, 6 Jan 1999 01:20:54 +0000 Subject: [PATCH] changed DOM attribute methods to return the return value from the underlying attribute mechanism --- content/base/src/nsGenericElement.cpp | 12 ++++++------ layout/base/src/nsGenericElement.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/content/base/src/nsGenericElement.cpp b/content/base/src/nsGenericElement.cpp index 81c5d78e231..56ecd4b2b37 100644 --- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -765,9 +765,9 @@ nsGenericElement::GetDOMAttribute(const nsString& aName, nsString& aReturn) // XXX need to parse namespace from name // XXX need to uppercase name if HTML namespace nsIAtom* nameAtom = NS_NewAtom(aName); - mContent->GetAttribute(kNameSpaceID_None, nameAtom, aReturn); + nsresult rv = mContent->GetAttribute(kNameSpaceID_None, nameAtom, aReturn); NS_RELEASE(nameAtom); - return NS_OK; + return rv; } nsresult @@ -777,9 +777,9 @@ nsGenericElement::SetDOMAttribute(const nsString& aName, // XXX need to parse namespace from name // XXX need to uppercase name if HTML namespace nsIAtom* nameAtom = NS_NewAtom(aName); - mContent->SetAttribute(kNameSpaceID_None, nameAtom, aValue, PR_TRUE); + nsresult rv = mContent->SetAttribute(kNameSpaceID_None, nameAtom, aValue, PR_TRUE); NS_RELEASE(nameAtom); - return NS_OK; + return rv; } nsresult @@ -788,9 +788,9 @@ nsGenericElement::RemoveAttribute(const nsString& aName) // XXX need to parse namespace from name // XXX need to uppercase name if HTML namespace nsIAtom* nameAtom = NS_NewAtom(aName); - mContent->UnsetAttribute(kNameSpaceID_None, nameAtom, PR_TRUE); + nsresult rv = mContent->UnsetAttribute(kNameSpaceID_None, nameAtom, PR_TRUE); NS_RELEASE(nameAtom); - return NS_OK; + return rv; } nsresult diff --git a/layout/base/src/nsGenericElement.cpp b/layout/base/src/nsGenericElement.cpp index 81c5d78e231..56ecd4b2b37 100644 --- a/layout/base/src/nsGenericElement.cpp +++ b/layout/base/src/nsGenericElement.cpp @@ -765,9 +765,9 @@ nsGenericElement::GetDOMAttribute(const nsString& aName, nsString& aReturn) // XXX need to parse namespace from name // XXX need to uppercase name if HTML namespace nsIAtom* nameAtom = NS_NewAtom(aName); - mContent->GetAttribute(kNameSpaceID_None, nameAtom, aReturn); + nsresult rv = mContent->GetAttribute(kNameSpaceID_None, nameAtom, aReturn); NS_RELEASE(nameAtom); - return NS_OK; + return rv; } nsresult @@ -777,9 +777,9 @@ nsGenericElement::SetDOMAttribute(const nsString& aName, // XXX need to parse namespace from name // XXX need to uppercase name if HTML namespace nsIAtom* nameAtom = NS_NewAtom(aName); - mContent->SetAttribute(kNameSpaceID_None, nameAtom, aValue, PR_TRUE); + nsresult rv = mContent->SetAttribute(kNameSpaceID_None, nameAtom, aValue, PR_TRUE); NS_RELEASE(nameAtom); - return NS_OK; + return rv; } nsresult @@ -788,9 +788,9 @@ nsGenericElement::RemoveAttribute(const nsString& aName) // XXX need to parse namespace from name // XXX need to uppercase name if HTML namespace nsIAtom* nameAtom = NS_NewAtom(aName); - mContent->UnsetAttribute(kNameSpaceID_None, nameAtom, PR_TRUE); + nsresult rv = mContent->UnsetAttribute(kNameSpaceID_None, nameAtom, PR_TRUE); NS_RELEASE(nameAtom); - return NS_OK; + return rv; } nsresult