| Index: third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp b/third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp
|
| index 532cd58c4c39e71b101bb16206f6383603285b0a..21ad87c2d92a3d1c6933c3ad4e8f804440c820c2 100644
|
| --- a/third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp
|
| @@ -202,7 +202,7 @@ const QualifiedName* AnimationInputHelpers::keyframeAttributeToSVGAttribute(cons
|
| return iter->value;
|
| }
|
|
|
| -PassRefPtr<TimingFunction> AnimationInputHelpers::parseTimingFunction(const String& string)
|
| +PassRefPtr<TimingFunction> AnimationInputHelpers::parseTimingFunction(const String& string, Document* document)
|
| {
|
| if (string.isEmpty())
|
| return nullptr;
|
| @@ -210,6 +210,24 @@ PassRefPtr<TimingFunction> AnimationInputHelpers::parseTimingFunction(const Stri
|
| CSSValue* value = CSSParser::parseSingleValue(CSSPropertyTransitionTimingFunction, string);
|
| if (!value || !value->isValueList()) {
|
| ASSERT(!value || value->isCSSWideKeyword());
|
| + if (document) {
|
| + if (string.startsWith("function")) {
|
| + // Due to a bug in old versions of the web-animations-next
|
| + // polyfill, in some circumstances the string passed in here
|
| + // may be a Javascript function instead of the allowed values
|
| + // from the spec
|
| + // (http://w3c.github.io/web-animations/#dom-animationeffecttimingreadonly-easing)
|
| + // This bug was fixed in
|
| + // https://github.com/web-animations/web-animations-next/pull/423
|
| + // and we want to track how often it is still being hit. The
|
| + // linear case is special because 'linear' is the default value
|
| + // for easing.
|
| + if (string == "function (a){return a}")
|
| + UseCounter::count(*document, UseCounter::WebAnimationsEasingAsFunctionLinear);
|
| + else
|
| + UseCounter::count(*document, UseCounter::WebAnimationsEasingAsFunctionOther);
|
| + }
|
| + }
|
| return nullptr;
|
| }
|
| CSSValueList* valueList = toCSSValueList(value);
|
|
|