mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 870845. Correctly check for parse-inaccessible properties in inDOMUtils::GetCSSPropertyNames. r=heycam
This commit is contained in:
parent
e8b1c8fb6a
commit
d501411e13
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user