Bug 1295866 : remove special handling for easing "function (a){return a}" r?birtles draft
authorSatoshi Kojima <skoji@mac.com>
Sat, 27 Aug 2016 12:01:16 +0900
changeset 406375 e66670a76405890642d7682caeea9b2e66f41379
parent 406374 c724ae8bb7b867b6bc65efa1049c0322457ff4b0
child 529637 62bfbfda46ac39fee1f7cbe28bd402e2ec924862
push id27704
push userbmo:skoji@mac.com
push dateSat, 27 Aug 2016 03:54:50 +0000
reviewersbirtles
bugs1295866
milestone51.0a1
Bug 1295866 : remove special handling for easing "function (a){return a}" r?birtles MozReview-Commit-ID: GKUkslGGcDl
dom/animation/TimingParams.cpp
--- a/dom/animation/TimingParams.cpp
+++ b/dom/animation/TimingParams.cpp
@@ -157,33 +157,16 @@ TimingParams::ParseEasing(const nsAStrin
     case eCSSUnit_TokenStream:
     case eCSSUnit_Null:
       break;
     default:
       MOZ_ASSERT_UNREACHABLE("unexpected animation-timing-function unit");
       break;
   }
 
-  // Bug 1247004
-  //
-  // The Web Animations polyfill had a bug that translated 'linear' into
-  // the string 'function (a){return a}'. This bug has been fixed but older
-  // versions of the polyfill are still widely used. Google are collecting
-  // usage data on this but for now we need to *not* throw on
-  // 'function (a){return a}' or else a lot of sites will break.
-  //
-  // Instead, we should treat this string as equivalent to 'linear' and
-  // return Nothing().
-  //
-  // Chromium has a similar special case path for this string.
-  // See: https://bugs.chromium.org/p/chromium/issues/detail?id=601672
-  if (aEasing == NS_LITERAL_STRING("function (a){return a}")) {
-    return Nothing();
-  }
-
   aRv.ThrowTypeError<dom::MSG_INVALID_EASING_ERROR>(aEasing);
   return Nothing();
 }
 
 bool
 TimingParams::operator==(const TimingParams& aOther) const
 {
   return mDuration == aOther.mDuration &&