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

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

Issue 1771733002: Web Animations: Use of hyphens is no longer supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid Windows Release failure Created 4 years, 9 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 4c79bcb8fad539034f51a033e088159a5f897b27..3d8f0549126e78275efa29703f9438fdb0dad806 100644
--- a/third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp
+++ b/third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp
@@ -36,10 +36,15 @@ CSSPropertyID AnimationInputHelpers::keyframeAttributeToCSSProperty(const String
return CSSPropertyInvalid;
if (property == "cssFloat")
return CSSPropertyFloat;
+
StringBuilder builder;
for (size_t i = 0; i < property.length(); ++i) {
- if (property[i] == '-')
- Deprecation::countDeprecation(document, UseCounter::WebAnimationHyphenatedProperty);
+ // Disallow hyphenated properties.
+ if (property[i] == '-') {
+ if (cssPropertyID(property) != CSSPropertyInvalid)
+ Deprecation::countDeprecation(document, UseCounter::WebAnimationHyphenatedProperty);
+ return CSSPropertyInvalid;
+ }
if (isASCIIUpper(property[i]))
builder.append('-');
builder.append(property[i]);

Powered by Google App Engine
This is Rietveld 408576698