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

Unified Diff: Source/core/rendering/style/KeyframeList.cpp

Issue 24085002: Correctly apply per-keyframe timing functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
« no previous file with comments | « Source/core/rendering/style/KeyframeList.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/KeyframeList.cpp
diff --git a/Source/core/rendering/style/KeyframeList.cpp b/Source/core/rendering/style/KeyframeList.cpp
index dae3eabdfdd2bb5dbaf47d64f418632b0eb10b56..2ed58360ee1f8542bfb6e6bfe7e774503605ef81 100644
--- a/Source/core/rendering/style/KeyframeList.cpp
+++ b/Source/core/rendering/style/KeyframeList.cpp
@@ -42,15 +42,11 @@ void KeyframeValue::addProperties(const StylePropertySet* propertySet)
}
}
-TimingFunction* KeyframeValue::timingFunction(const RenderStyle* keyframeStyle, const AtomicString& name)
+TimingFunction* KeyframeValue::timingFunction(const RenderStyle& keyframeStyle)
{
- ASSERT(keyframeStyle && keyframeStyle->animations());
- for (size_t i = 0; i < keyframeStyle->animations()->size(); i++) {
- if (name == keyframeStyle->animations()->animation(i)->name())
- return keyframeStyle->animations()->animation(i)->timingFunction();
- }
- ASSERT_NOT_REACHED();
- return 0;
+ const CSSAnimationDataList* animations = keyframeStyle.animations();
+ ASSERT(animations && !animations->isEmpty());
+ return animations->animation(0)->timingFunction();
}
KeyframeList::~KeyframeList()
« no previous file with comments | « Source/core/rendering/style/KeyframeList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698