209583 - Fix a regression where XMLDocument.getElementByID() was broken
r+sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@143774 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -742,19 +742,19 @@ nsXMLElement::GetScriptObject(nsIScriptContext* aContext, void** aScriptObject)
|
||||
// nsIStyledContent implementation
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLElement::GetID(nsIAtom*& aResult) const
|
||||
nsXMLElement::GetID(nsIAtom** aResult) const
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIAtom> atom;
|
||||
rv = mNodeInfo->GetIDAttributeAtom(getter_AddRefs(atom));
|
||||
|
||||
aResult = nsnull;
|
||||
nsresult rv = mNodeInfo->GetIDAttributeAtom(getter_AddRefs(atom));
|
||||
|
||||
*aResult = nsnull;
|
||||
if (NS_SUCCEEDED(rv) && atom) {
|
||||
nsAutoString value;
|
||||
rv = nsGenericContainerElement::GetAttr(kNameSpaceID_Unknown, atom,
|
||||
value);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
aResult = NS_NewAtom(value);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
*aResult = NS_NewAtom(value);
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
NS_IMETHOD GetXMLBaseURI(nsIURI **aURI);
|
||||
|
||||
// nsIStyledContent
|
||||
NS_IMETHOD GetID(nsIAtom*& aResult) const;
|
||||
NS_IMETHOD GetID(nsIAtom** aResult) const;
|
||||
|
||||
// nsIContent
|
||||
NS_IMETHOD SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
||||
|
||||
Reference in New Issue
Block a user