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

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

Issue 2524303002: Emit console warning when element.animate() keyframe value fails to parse (Closed)
Patch Set: Review changes Created 4 years, 1 month 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/StringKeyframe.cpp
diff --git a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
index ea298ff2e1d56327c46feabdc38befee435dfe9a..d4c8d723ac9e8c420d61b429999b100d1e901a11 100644
--- a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
+++ b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
@@ -22,22 +22,27 @@ StringKeyframe::StringKeyframe(const StringKeyframe& copyFrom)
copyFrom.m_presentationAttributeMap->mutableCopy()),
m_svgAttributeMap(copyFrom.m_svgAttributeMap) {}
-void StringKeyframe::setCSSPropertyValue(
+MutableStylePropertySet::SetResult StringKeyframe::setCSSPropertyValue(
const AtomicString& propertyName,
const String& value,
StyleSheetContents* styleSheetContents) {
bool isAnimationTainted = true;
- m_cssPropertyMap->setProperty(propertyName, value, false, styleSheetContents,
- isAnimationTainted);
+ return m_cssPropertyMap->setProperty(propertyName, value, false,
+ styleSheetContents, isAnimationTainted);
}
-void StringKeyframe::setCSSPropertyValue(
+MutableStylePropertySet::SetResult StringKeyframe::setCSSPropertyValue(
CSSPropertyID property,
const String& value,
StyleSheetContents* styleSheetContents) {
DCHECK_NE(property, CSSPropertyInvalid);
- if (!CSSAnimations::isAnimationAffectingProperty(property))
- m_cssPropertyMap->setProperty(property, value, false, styleSheetContents);
+ if (CSSAnimations::isAnimationAffectingProperty(property)) {
+ bool didParse = true;
+ bool didChange = false;
+ return MutableStylePropertySet::SetResult{didParse, didChange};
+ }
+ return m_cssPropertyMap->setProperty(property, value, false,
+ styleSheetContents);
}
void StringKeyframe::setCSSPropertyValue(CSSPropertyID property,
« no previous file with comments | « third_party/WebKit/Source/core/animation/StringKeyframe.h ('k') | third_party/WebKit/Source/core/css/DOMWindowCSS.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698