Bug 661746 - Part of part 2: Introduce a const AsElement(). r=bzbarsky

This commit is contained in:
David Zbarsky 2012-06-23 08:57:57 +02:00
Родитель 6cd4867e71
Коммит 29b8d2fca9
2 изменённых файлов: 7 добавлений и 0 удалений

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

@ -265,4 +265,10 @@ inline mozilla::dom::Element* nsINode::AsElement()
return static_cast<mozilla::dom::Element*>(this);
}
inline const mozilla::dom::Element* nsINode::AsElement() const
{
MOZ_ASSERT(IsElement());
return static_cast<const mozilla::dom::Element*>(this);
}
#endif // mozilla_dom_Element_h__

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

@ -373,6 +373,7 @@ public:
* for which IsElement() is true. This is defined inline in Element.h.
*/
mozilla::dom::Element* AsElement();
const mozilla::dom::Element* AsElement() const;
/**
* Return this node as nsIContent. Should only be used for nodes for which