Bug 920146 - Rename NODE_IS_ANONYMOUS to NODE_IS_ANONYMOUS_ROOT to avoid misinterpretation and for symmetry with NODE_IS_NATIVE_ANONYMOUS_ROOT. r=bz

--HG--
extra : rebase_source : ea8c2377f1f85248239a3f6b0f6f64bfe40e44ea
This commit is contained in:
Jonathan Watt 2013-09-24 20:28:32 +01:00
parent d03891dc56
commit 8ee1e8e7cf
5 changed files with 11 additions and 11 deletions

View File

@ -170,7 +170,7 @@ public:
bool IsRootOfNativeAnonymousSubtree() const
{
NS_ASSERTION(!HasFlag(NODE_IS_NATIVE_ANONYMOUS_ROOT) ||
(HasFlag(NODE_IS_ANONYMOUS) &&
(HasFlag(NODE_IS_ANONYMOUS_ROOT) &&
HasFlag(NODE_IS_IN_ANONYMOUS_SUBTREE)),
"Some flags seem to be missing!");
return HasFlag(NODE_IS_NATIVE_ANONYMOUS_ROOT);
@ -188,7 +188,7 @@ public:
*/
void SetNativeAnonymous()
{
SetFlags(NODE_IS_ANONYMOUS | NODE_IS_IN_ANONYMOUS_SUBTREE |
SetFlags(NODE_IS_ANONYMOUS_ROOT | NODE_IS_IN_ANONYMOUS_SUBTREE |
NODE_IS_NATIVE_ANONYMOUS_ROOT);
}
@ -210,7 +210,7 @@ public:
"to binding parent");
NS_ASSERTION(!GetParent() ||
((GetBindingParent() == GetParent()) ==
HasFlag(NODE_IS_ANONYMOUS)) ||
HasFlag(NODE_IS_ANONYMOUS_ROOT)) ||
// Unfortunately default content for XBL insertion points is
// anonymous content that is bound with the parent of the
// insertion point as the parent but the bound element for the
@ -218,10 +218,10 @@ public:
// the assert a bit here.
(GetBindingParent() &&
(GetBindingParent() == GetParent()->GetBindingParent()) ==
HasFlag(NODE_IS_ANONYMOUS)),
HasFlag(NODE_IS_ANONYMOUS_ROOT)),
"For nodes with parent, flag and GetBindingParent() check "
"should match");
return HasFlag(NODE_IS_ANONYMOUS);
return HasFlag(NODE_IS_ANONYMOUS_ROOT);
}
/**

View File

@ -83,7 +83,7 @@ enum {
// XBL-generated ones, will do. This flag is set-once: once a node has it,
// it must not be removed.
// NOTE: Should only be used on nsIContent nodes
NODE_IS_ANONYMOUS = NODE_FLAG_BIT(2),
NODE_IS_ANONYMOUS_ROOT = NODE_FLAG_BIT(2),
// Whether the node has some ancestor, possibly itself, that is native
// anonymous. This includes ancestors crossing XBL scopes, in cases when an
@ -910,7 +910,7 @@ public:
void SetFlags(uint32_t aFlagsToSet)
{
NS_ASSERTION(!(aFlagsToSet & (NODE_IS_ANONYMOUS |
NS_ASSERTION(!(aFlagsToSet & (NODE_IS_ANONYMOUS_ROOT |
NODE_IS_NATIVE_ANONYMOUS_ROOT |
NODE_IS_IN_ANONYMOUS_SUBTREE |
NODE_ATTACH_BINDING_ON_POSTCREATE |
@ -925,7 +925,7 @@ public:
void UnsetFlags(uint32_t aFlagsToUnset)
{
NS_ASSERTION(!(aFlagsToUnset &
(NODE_IS_ANONYMOUS |
(NODE_IS_ANONYMOUS_ROOT |
NODE_IS_IN_ANONYMOUS_SUBTREE |
NODE_IS_NATIVE_ANONYMOUS_ROOT)),
"Trying to unset write-only flags");

View File

@ -1180,7 +1180,7 @@ nsINode::GetOwnerGlobal()
bool
nsINode::UnoptimizableCCNode() const
{
const uintptr_t problematicFlags = (NODE_IS_ANONYMOUS |
const uintptr_t problematicFlags = (NODE_IS_ANONYMOUS_ROOT |
NODE_IS_IN_ANONYMOUS_SUBTREE |
NODE_IS_NATIVE_ANONYMOUS_ROOT |
NODE_MAY_BE_IN_BINDING_MNGR);

View File

@ -256,7 +256,7 @@ nsXBLBinding::InstallAnonymousContent(nsIContent* aAnonParent, nsIContent* aElem
return;
}
child->SetFlags(NODE_IS_ANONYMOUS);
child->SetFlags(NODE_IS_ANONYMOUS_ROOT);
#ifdef MOZ_XUL
// To make XUL templates work (and other goodies that happen when

View File

@ -3765,7 +3765,7 @@ nsCSSFrameConstructor::GetAnonymousContent(nsIContent* aParent,
// least-surprise CSS binding until we do the SVG specified
// cascading rules for <svg:use> - bug 265894
if (aParentFrame->GetType() == nsGkAtoms::svgUseFrame) {
content->SetFlags(NODE_IS_ANONYMOUS);
content->SetFlags(NODE_IS_ANONYMOUS_ROOT);
} else {
content->SetNativeAnonymous();
}