Bug 475864 - Move native anonymous content checks into a wrapper so that quickstubs don't sidestep them. r=jst sr=bzbarsky

This commit is contained in:
Blake Kaplan
2009-04-23 00:21:22 -07:00
parent 1c86fdc7d8
commit 4621e77c5d
20 changed files with 934 additions and 178 deletions

View File

@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 sw=2 et tw=79: */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@@ -446,6 +447,23 @@ nsINode::GetChildNodesList()
return slots->mChildNodes;
}
#ifdef DEBUG
void
nsINode::CheckNotNativeAnonymous() const
{
if (!IsNodeOfType(eCONTENT))
return;
nsIContent* content = static_cast<const nsIContent *>(this)->GetBindingParent();
while (content) {
if (content->IsRootOfNativeAnonymousSubtree()) {
NS_ERROR("Element not marked to be in native anonymous subtree!");
break;
}
content = content->GetBindingParent();
}
}
#endif
nsresult
nsINode::GetParentNode(nsIDOMNode** aParentNode)
{