Bug 1295866 : remove special handling for easing "function (a){return a}" r=birtles

MozReview-Commit-ID: GKUkslGGcDl

--HG--
extra : rebase_source : 3aa1603dbe33bad5678568c59f6e9ae4dfc3e6c6
This commit is contained in:
Satoshi Kojima 2016-08-27 12:01:16 +09:00
parent 681ce6a486
commit 404d9a3eee

View File

@ -162,23 +162,6 @@ TimingParams::ParseEasing(const nsAString& aEasing,
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();
}