Bug 1439837: Fix logic to disable pseudo-elements. r=xidorn

Otherwise the test fails on the old style system.

MozReview-Commit-ID: 9wGgFsFvsPf
This commit is contained in:
Emilio Cobos Álvarez 2018-02-21 19:12:38 +01:00
parent 8c233a1c5c
commit af439c8f5d

View File

@ -145,7 +145,7 @@ public:
static bool IsEnabled(Type aType, EnabledState aEnabledState)
{
if (!PseudoElementHasFlags(
if (!PseudoElementHasAnyFlag(
aType, CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME)) {
return true;
}
@ -183,6 +183,12 @@ private:
return (kPseudoElementFlags[size_t(aType)] & aFlags) == aFlags;
}
static bool PseudoElementHasAnyFlag(const Type aType, uint32_t aFlags)
{
MOZ_ASSERT(aType < Type::Count);
return (kPseudoElementFlags[size_t(aType)] & aFlags) != 0;
}
static const uint32_t kPseudoElementFlags[size_t(Type::Count)];
};