Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp

Issue 2129783003: Remove linear-function easing TypeError exemption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 76e5d74c956724c413a41b1c75808ca0908ffa5d..efee1088b2d1538a71cbbfbbb2bc666c2589f82d 100644
--- a/third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp
+++ b/third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp
@@ -213,7 +213,6 @@ PassRefPtr<TimingFunction> AnimationInputHelpers::parseTimingFunction(const Stri
const CSSValue* value = CSSParser::parseSingleValue(CSSPropertyTransitionTimingFunction, string);
if (!value || !value->isValueList()) {
DCHECK(!value || value->isCSSWideKeyword());
- bool throwTypeError = true;
if (document) {
if (string.startsWith("function")) {
// Due to a bug in old versions of the web-animations-next
@@ -227,23 +226,12 @@ PassRefPtr<TimingFunction> AnimationInputHelpers::parseTimingFunction(const Stri
// linear case is special because 'linear' is the default value
// for easing. See http://crbug.com/601672
if (string == "function (a){return a}") {
- Deprecation::countDeprecation(*document, UseCounter::WebAnimationsEasingAsFunctionLinear);
- throwTypeError = false;
+ UseCounter::count(*document, UseCounter::WebAnimationsEasingAsFunctionLinear);
} else {
UseCounter::count(*document, UseCounter::WebAnimationsEasingAsFunctionOther);
}
}
}
-
- // TODO(suzyh): This return clause exists so that the special linear
- // function case above is exempted from causing TypeErrors. The
- // throwTypeError bool and this if-statement should be removed after the
- // M53 branch point in July 2016, so that this case will also throw
- // TypeErrors from M54 onward.
- if (!throwTypeError) {
- return Timing::defaults().timingFunction;
- }
-
exceptionState.throwTypeError("'" + string + "' is not a valid value for easing");
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698