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

Unified Diff: sky/engine/core/animation/TimingInput.cpp

Issue 922893002: Merge the Sky Engine changes from the SkyDart branch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/engine/core/animation/ElementAnimation.idl ('k') | sky/engine/core/animation/TimingInputTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/animation/TimingInput.cpp
diff --git a/sky/engine/core/animation/TimingInput.cpp b/sky/engine/core/animation/TimingInput.cpp
index 4f00b9c63eb93016b0c4f76bca22d627b40784b6..9c99d330fd6062e4742af20181a9bbf3e0fb93ca 100644
--- a/sky/engine/core/animation/TimingInput.cpp
+++ b/sky/engine/core/animation/TimingInput.cpp
@@ -5,7 +5,6 @@
#include "sky/engine/config.h"
#include "sky/engine/core/animation/TimingInput.h"
-#include "sky/engine/bindings/core/v8/Dictionary.h"
#include "sky/engine/core/css/parser/BisonCSSParser.h"
#include "sky/engine/core/css/resolver/CSSToStyleMap.h"
@@ -95,55 +94,6 @@ void TimingInput::setTimingFunction(Timing& timing, const String& timingFunction
timing.timingFunction = Timing::defaults().timingFunction;
}
-Timing TimingInput::convert(const Dictionary& timingInputDictionary)
-{
- Timing result;
-
- // FIXME: This method needs to be refactored to handle invalid
- // null, NaN, Infinity values better.
- // See: http://www.w3.org/TR/WebIDL/#es-double
- double startDelay = Timing::defaults().startDelay;
- DictionaryHelper::get(timingInputDictionary, "delay", startDelay);
- setStartDelay(result, startDelay);
-
- double endDelay = Timing::defaults().endDelay;
- DictionaryHelper::get(timingInputDictionary, "endDelay", endDelay);
- setEndDelay(result, endDelay);
-
- String fillMode;
- DictionaryHelper::get(timingInputDictionary, "fill", fillMode);
- setFillMode(result, fillMode);
-
- double iterationStart = Timing::defaults().iterationStart;
- DictionaryHelper::get(timingInputDictionary, "iterationStart", iterationStart);
- setIterationStart(result, iterationStart);
-
- double iterationCount = Timing::defaults().iterationCount;
- DictionaryHelper::get(timingInputDictionary, "iterations", iterationCount);
- setIterationCount(result, iterationCount);
-
- double iterationDuration = 0;
- if (DictionaryHelper::get(timingInputDictionary, "duration", iterationDuration)) {
- setIterationDuration(result, iterationDuration);
- }
-
- double playbackRate = Timing::defaults().playbackRate;
- DictionaryHelper::get(timingInputDictionary, "playbackRate", playbackRate);
- setPlaybackRate(result, playbackRate);
-
- String direction;
- DictionaryHelper::get(timingInputDictionary, "direction", direction);
- setPlaybackDirection(result, direction);
-
- String timingFunctionString;
- DictionaryHelper::get(timingInputDictionary, "easing", timingFunctionString);
- setTimingFunction(result, timingFunctionString);
-
- result.assertValid();
-
- return result;
-}
-
Timing TimingInput::convert(double duration)
{
Timing result;
« no previous file with comments | « sky/engine/core/animation/ElementAnimation.idl ('k') | sky/engine/core/animation/TimingInputTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698