Bug 1331296 : Part 4 - Remove CSS parser support of -moz-calc(). draft
authorAstley Chen <aschen@mozilla.com>
Tue, 17 Jan 2017 13:12:11 +0800
changeset 462358 65e1dfb7d2c93694e19c608a1258bad061de95e3
parent 462357 222897007898e30435b9117130fa7961933b13cf
child 462359 0526cabe6d5ac2704dde956e6dc7b61944045066
push id41713
push useraschen@mozilla.com
push dateTue, 17 Jan 2017 05:13:04 +0000
bugs1331296
milestone53.0a1
Bug 1331296 : Part 4 - Remove CSS parser support of -moz-calc(). MozReview-Commit-ID: GesAUYnHHjv
layout/style/nsCSSParser.cpp
--- 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)) {