mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 763283 part 1 - Add new nsINode::AsContent() and nsINode::IsContent() methods; r=mounir
This commit is contained in:
parent
3fcf9b9977
commit
bd2dec6adf
@ -923,4 +923,10 @@ public:
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIContent, NS_ICONTENT_IID)
|
||||
|
||||
inline nsIContent* nsINode::AsContent()
|
||||
{
|
||||
MOZ_ASSERT(IsContent());
|
||||
return static_cast<nsIContent*>(this);
|
||||
}
|
||||
|
||||
#endif /* nsIContent_h___ */
|
||||
|
@ -374,6 +374,19 @@ public:
|
||||
*/
|
||||
mozilla::dom::Element* AsElement();
|
||||
|
||||
/**
|
||||
* Return whether the node is a content node
|
||||
*/
|
||||
bool IsContent() const {
|
||||
return IsNodeOfType(eCONTENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return this node as nsIContent. Should only be used for nodes for which
|
||||
* IsContent() is true. This is defined inline in nsIContent.h.
|
||||
*/
|
||||
nsIContent* AsContent();
|
||||
|
||||
virtual nsIDOMNode* AsDOMNode() = 0;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user