Bug 870845. Correctly check for parse-inaccessible properties in inDOMUtils::GetCSSPropertyNames. r=heycam

This commit is contained in:
Boris Zbarsky 2013-05-14 14:20:58 -04:00
parent 90921b63a0
commit d5b9a00b6b
2 changed files with 6 additions and 2 deletions

View File

@ -389,8 +389,8 @@ inDOMUtils::GetCSSPropertyNames(uint32_t aFlags, uint32_t* aCount,
// we've put into props so far.
uint32_t prop = 0, propCount = 0;
for ( ; prop < eCSSProperty_COUNT_no_shorthands; ++prop) {
if (!nsCSSProps::PropHasFlags(nsCSSProperty(prop),
CSS_PROPERTY_PARSE_INACCESSIBLE)) {
if (nsCSSProps::PropertyParseType(nsCSSProperty(prop)) !=
CSS_PROPERTY_PARSE_INACCESSIBLE) {
DO_PROP(prop);
}
}

View File

@ -228,6 +228,10 @@ public:
{
NS_ABORT_IF_FALSE(0 <= aProperty && aProperty < eCSSProperty_COUNT,
"out of range");
MOZ_ASSERT(!(aFlags & CSS_PROPERTY_PARSE_PROPERTY_MASK),
"The CSS_PROPERTY_PARSE_* values are not bitflags; don't pass "
"them to PropHasFlags. You probably want PropertyParseType "
"instead.");
return (nsCSSProps::kFlagsTable[aProperty] & aFlags) == aFlags;
}