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

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

Issue 2324963003: Store custom properties specified in element.animate() (Closed)
Patch Set: Rebased Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/AnimationInputHelpersTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/AnimationInputHelpersTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698