Bug 1269975 part 2 - Rename nsCSSParser::PropertyEnabledState() to EnabledState(). r=heycam

MozReview-Commit-ID: 4JESxsOYN4w

--HG--
extra : rebase_source : 14ba06f00d51f51309367b99039d7c5a4c5d8f9a
extra : source : b52bff89c494a5411557e8a2ab7332862736c0b5
This commit is contained in:
Xidorn Quan 2016-05-10 18:44:05 +10:00
parent fa7ba2cb82
commit 7b7ddfc469

View File

@ -356,7 +356,7 @@ public:
mParsingMode == css::eUserSheetFeatures;
}
CSSEnabledState PropertyEnabledState() const {
CSSEnabledState EnabledState() const {
static_assert(int(CSSEnabledState::eForAllContent) == 0,
"CSSEnabledState::eForAllContent should be zero for "
"this bitfield to work");
@ -371,7 +371,7 @@ public:
}
nsCSSProperty LookupEnabledProperty(const nsAString& aProperty) {
return nsCSSProps::LookupProperty(aProperty, PropertyEnabledState());
return nsCSSProps::LookupProperty(aProperty, EnabledState());
}
protected:
@ -1905,7 +1905,7 @@ CSSParserImpl::ParseTransformProperty(const nsAString& aPropValue,
if (parsedOK) {
declaration->ExpandTo(&mData);
changed = mData.TransferFromBlock(mTempData, eCSSProperty_transform,
PropertyEnabledState(), false,
EnabledState(), false,
true, false, declaration,
GetDocument());
declaration->CompressFrom(&mData);
@ -1952,7 +1952,7 @@ CSSParserImpl::ParseProperty(const nsCSSProperty aPropID,
// Check for unknown or preffed off properties
if (eCSSProperty_UNKNOWN == aPropID ||
!nsCSSProps::IsEnabled(aPropID, PropertyEnabledState())) {
!nsCSSProps::IsEnabled(aPropID, EnabledState())) {
NS_ConvertASCIItoUTF16 propName(nsCSSProps::GetStringValue(aPropID));
REPORT_UNEXPECTED_P(PEUnknownProperty, propName);
REPORT_UNEXPECTED(PEDeclDropped);
@ -1987,7 +1987,7 @@ CSSParserImpl::ParseProperty(const nsCSSProperty aPropID,
// Do it the slow way
aDeclaration->ExpandTo(&mData);
*aChanged = mData.TransferFromBlock(mTempData, aPropID,
PropertyEnabledState(), aIsImportant,
EnabledState(), aIsImportant,
true, false, aDeclaration,
GetDocument());
aDeclaration->CompressFrom(&mData);
@ -3262,7 +3262,7 @@ CSSParserImpl::ParseAtRule(RuleAppendFunc aAppendFunc,
newSection = eCSSSection_General;
} else if ((nsCSSProps::IsEnabled(eCSSPropertyAlias_MozAnimation,
PropertyEnabledState()) &&
EnabledState()) &&
mToken.mIdent.LowerCaseEqualsLiteral("-moz-keyframes")) ||
(nsCSSProps::IsEnabled(eCSSPropertyAlias_WebkitAnimation) &&
mToken.mIdent.LowerCaseEqualsLiteral("-webkit-keyframes")) ||
@ -7378,8 +7378,7 @@ CSSParserImpl::ParseDeclaration(css::Declaration* aDeclaration,
aDeclaration->AddVariableDeclaration(varName, variableType, variableValue,
status == ePriority_Important, false);
} else {
*aChanged |= mData.TransferFromBlock(mTempData, propID,
PropertyEnabledState(),
*aChanged |= mData.TransferFromBlock(mTempData, propID, EnabledState(),
status == ePriority_Important,
false, aMustCallValueAppended,
aDeclaration, GetDocument());
@ -11385,8 +11384,7 @@ CSSParserImpl::ParseProperty(nsCSSProperty aPropID)
if (nsCSSProps::IsShorthand(aPropID)) {
// If this is a shorthand property, we store the token stream on each
// of its corresponding longhand properties.
CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(p, aPropID,
PropertyEnabledState()) {
CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(p, aPropID, EnabledState()) {
nsCSSValueTokenStream* tokenStream = new nsCSSValueTokenStream;
tokenStream->mPropertyID = *p;
tokenStream->mShorthandPropertyID = aPropID;