Bug 1331296 : Part 4 - Remove CSS parser support of -moz-calc().
MozReview-Commit-ID: k5ENlCAXZf
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -7847,18 +7847,17 @@ CSSParserImpl::ParseOneOrLargerVariant(n
}
return result;
}
static bool
IsCSSTokenCalcFunction(const nsCSSToken& aToken)
{
return aToken.mType == eCSSToken_Function &&
- (aToken.mIdent.LowerCaseEqualsLiteral("calc") ||
- aToken.mIdent.LowerCaseEqualsLiteral("-moz-calc"));
+ aToken.mIdent.LowerCaseEqualsLiteral("calc");
}
// Assigns to aValue iff it returns CSSParseResult::Ok.
CSSParseResult
CSSParserImpl::ParseVariant(nsCSSValue& aValue,
uint32_t aVariantMask,
const KTableEntry aKeywordTable[])
{
@@ -10659,18 +10658,17 @@ CSSParserImpl::IsLegacyGradientLine(cons
switch (aType) {
case eCSSToken_Percentage:
case eCSSToken_Number:
case eCSSToken_Dimension:
haveGradientLine = true;
break;
case eCSSToken_Function:
- if (aId.LowerCaseEqualsLiteral("calc") ||
- aId.LowerCaseEqualsLiteral("-moz-calc")) {
+ if (aId.LowerCaseEqualsLiteral("calc")) {
haveGradientLine = true;
break;
}
MOZ_FALLTHROUGH;
case eCSSToken_ID:
case eCSSToken_Hash:
// this is a color
break;
@@ -12608,18 +12606,17 @@ CSSParserImpl::ParseImageLayersItem(
aTable[nsStyleImageLayers::image]) !=
CSSParseResult::Ok) {
return false;
}
} else if (tt == eCSSToken_Dimension ||
tt == eCSSToken_Number ||
tt == eCSSToken_Percentage ||
(tt == eCSSToken_Function &&
- (mToken.mIdent.LowerCaseEqualsLiteral("calc") ||
- mToken.mIdent.LowerCaseEqualsLiteral("-moz-calc")))) {
+ mToken.mIdent.LowerCaseEqualsLiteral("calc"))) {
if (havePositionAndSize)
return false;
havePositionAndSize = true;
if (!ParsePositionValueSeparateCoords(aState.mPositionX->mValue,
aState.mPositionY->mValue)) {
return false;
}
if (ExpectSymbol('/', true)) {