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 a422897c58ea9204ccc865b543ac33f15fc0545e..39876cc817126b13bb58cdd4fe094fbef5e4fcb8 100644 |
--- a/third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp |
+++ b/third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp |
@@ -8,6 +8,7 @@ |
#include "core/SVGNames.h" |
#include "core/css/CSSValueList.h" |
#include "core/css/parser/CSSParser.h" |
+#include "core/css/parser/CSSVariableParser.h" |
#include "core/css/resolver/CSSToStyleMap.h" |
#include "core/frame/Deprecation.h" |
#include "core/svg/SVGElement.h" |
@@ -32,10 +33,13 @@ static String removeSVGPrefix(const String& property) |
CSSPropertyID AnimationInputHelpers::keyframeAttributeToCSSProperty(const String& property, const Document& document) |
{ |
- // TODO(crbug.com/644148): Allow custom properties that begin with "--". |
+ if (CSSVariableParser::isValidVariableName(property)) |
+ return CSSPropertyVariable; |
// Disallow prefixed properties. |
- if (property[0] == '-' || isASCIIUpper(property[0])) |
+ if (property[0] == '-') |
+ return CSSPropertyInvalid; |
+ if (isASCIIUpper(property[0])) |
return CSSPropertyInvalid; |
if (property == "cssFloat") |
return CSSPropertyFloat; |