mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 986730 - Add a dynamic accessor to determine whether a node is in an anonymous subtree. r=smaug
This commit is contained in:
parent
cd810d2973
commit
e0121ab8a2
@ -440,6 +440,10 @@ public:
|
||||
* IsContent() is true. This is defined inline in nsIContent.h.
|
||||
*/
|
||||
nsIContent* AsContent();
|
||||
const nsIContent* AsContent() const
|
||||
{
|
||||
return const_cast<nsINode*>(this)->AsContent();
|
||||
}
|
||||
|
||||
virtual nsIDOMNode* AsDOMNode() = 0;
|
||||
|
||||
@ -1005,6 +1009,8 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
bool IsInAnonymousSubtree() const;
|
||||
|
||||
// True for native anonymous content and for XBL content if the binging
|
||||
// has chromeOnlyContent="true".
|
||||
bool ChromeOnlyAccess() const
|
||||
|
@ -365,6 +365,16 @@ nsINode::CheckNotNativeAnonymous() const
|
||||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
nsINode::IsInAnonymousSubtree() const
|
||||
{
|
||||
if (!IsContent()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return AsContent()->IsInAnonymousSubtree();
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsINode::GetParentNode(nsIDOMNode** aParentNode)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user