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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 19037003: Re-use CSSParser logic to parse keyframe keys (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 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 | « Source/core/css/CSSParser-in.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index dfc94a4e4c6d5328bfd437135ae719c3ca909ceb..0d972d274337b10c8bd7f3a163de43b4d8a9dded 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -744,8 +744,7 @@ void StyleResolver::keyframeStylesForAnimation(Element* e, const RenderStyle* el
keyframeValue.addProperties(keyframe->properties());
// Add this keyframe style to all the indicated key times
- Vector<double> keys;
- keyframe->getKeys(keys);
+ const Vector<double>& keys = keyframe->keys();
for (size_t keyIndex = 0; keyIndex < keys.size(); ++keyIndex) {
keyframeValue.setKey(keys[keyIndex]);
list.insert(keyframeValue);
@@ -792,8 +791,7 @@ void StyleResolver::resolveKeyframes(const Element* element, const RenderStyle*
for (size_t i = 0; i < styleKeyframes.size(); ++i) {
const StyleKeyframe* styleKeyframe = styleKeyframes[i].get();
RefPtr<RenderStyle> keyframeStyle = styleForKeyframe(0, style, styleKeyframe);
- Vector<double> offsets;
- styleKeyframe->getKeys(offsets);
+ const Vector<double>& offsets = styleKeyframe->keys();
RefPtr<Keyframe> firstOffsetKeyframe;
for (size_t j = 0; j < offsets.size(); ++j) {
RefPtr<Keyframe> keyframe = Keyframe::create();
« no previous file with comments | « Source/core/css/CSSParser-in.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698