Bug 1295852 - Part 1: Add nsINode methods for testing whether a node is a ::before/::after generated content container. r=bholley

MozReview-Commit-ID: 662ltv2rv0V

--HG--
extra : rebase_source : 842872351965d66a31cc3827317887e4542c21d7
This commit is contained in:
Cameron McCormack 2016-08-19 11:16:45 +08:00
parent 177446e0ae
commit 039ea8d7a5

View File

@ -327,6 +327,18 @@ public:
GetBindingParent();
}
bool IsGeneratedContentContainerForBefore() const
{
return IsRootOfNativeAnonymousSubtree() &&
mNodeInfo->NameAtom() == nsGkAtoms::mozgeneratedcontentbefore;
}
bool IsGeneratedContentContainerForAfter() const
{
return IsRootOfNativeAnonymousSubtree() &&
mNodeInfo->NameAtom() == nsGkAtoms::mozgeneratedcontentafter;
}
/**
* Set attribute values. All attribute values are assumed to have a
* canonical string representation that can be used for these