Bug 748725 - nsINode::GetParentElement() should return dom::Element*; r=smaug

This commit is contained in:
Aryeh Gregor 2012-04-27 16:21:12 +03:00
parent 5adbfba70a
commit dd030b3a1e

View File

@ -402,7 +402,7 @@ public:
/** /**
* Return this node as an Element. Should only be used for nodes * Return this node as an Element. Should only be used for nodes
* for which IsElement() is true. * for which IsElement() is true. This is defined inline in Element.h.
*/ */
mozilla::dom::Element* AsElement(); mozilla::dom::Element* AsElement();
@ -755,9 +755,9 @@ public:
* Get the parent nsINode for this node if it is an Element. * Get the parent nsINode for this node if it is an Element.
* @return the parent node * @return the parent node
*/ */
nsINode* GetElementParent() const mozilla::dom::Element* GetElementParent() const
{ {
return mParent && mParent->IsElement() ? mParent : nsnull; return mParent && mParent->IsElement() ? mParent->AsElement() : nsnull;
} }
/** /**