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

Unified Diff: Source/core/animation/KeyframeEffectModel.cpp

Issue 194733002: Web Animations: Use StringKeyframes for element.animate() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More comments Created 6 years, 8 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 | « Source/core/animation/KeyframeEffectModel.h ('k') | Source/core/animation/StringKeyframe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/KeyframeEffectModel.cpp
diff --git a/Source/core/animation/KeyframeEffectModel.cpp b/Source/core/animation/KeyframeEffectModel.cpp
index 00e88fddf6a64ea70700e1e434f2422b0f66d152..5b245d7d0c8c3b1579250298b1a10761a51630cc 100644
--- a/Source/core/animation/KeyframeEffectModel.cpp
+++ b/Source/core/animation/KeyframeEffectModel.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "core/animation/KeyframeEffectModel.h"
+#include "StylePropertyShorthand.h"
#include "core/animation/TimedItem.h"
#include "wtf/text/StringHash.h"
@@ -144,6 +145,7 @@ void KeyframeEffectModelBase::ensureKeyframeGroups() const
PropertySet keyframeProperties = keyframe->properties();
for (PropertySet::const_iterator propertyIter = keyframeProperties.begin(); propertyIter != keyframeProperties.end(); ++propertyIter) {
CSSPropertyID property = *propertyIter;
+ ASSERT_WITH_MESSAGE(!isExpandedShorthand(property), "Web Animations: Encountered shorthand CSS property (%d) in normalized keyframes.", property);
KeyframeGroupMap::iterator groupIter = m_keyframeGroups->find(property);
PropertySpecificKeyframeGroup* group;
if (groupIter == m_keyframeGroups->end())
@@ -163,7 +165,7 @@ void KeyframeEffectModelBase::ensureKeyframeGroups() const
}
}
-void KeyframeEffectModelBase::ensureInterpolationEffect() const
+void KeyframeEffectModelBase::ensureInterpolationEffect(Element* element) const
{
if (m_interpolationEffect)
return;
@@ -179,7 +181,7 @@ void KeyframeEffectModelBase::ensureInterpolationEffect() const
if (applyTo == 1)
applyTo = std::numeric_limits<double>::infinity();
- m_interpolationEffect->addInterpolation(keyframes[i]->createInterpolation(iter->key, keyframes[i + 1].get()),
+ m_interpolationEffect->addInterpolation(keyframes[i]->createInterpolation(iter->key, keyframes[i + 1].get(), element),
keyframes[i]->easing(), keyframes[i]->offset(), keyframes[i + 1]->offset(), applyFrom, applyTo);
}
}
« no previous file with comments | « Source/core/animation/KeyframeEffectModel.h ('k') | Source/core/animation/StringKeyframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698