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

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

Issue 942553002: Make element.style["color"] work in Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Add back removeProperty 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/AnimationNodeTiming.h ('k') | sky/engine/core/animation/Timing.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/animation/AnimationNodeTiming.cpp
diff --git a/sky/engine/core/animation/AnimationNodeTiming.cpp b/sky/engine/core/animation/AnimationNodeTiming.cpp
index b2a6e482c3bb9fa0c016d2b012bfeb58c170d5d5..85434841f9f68efa1b5679beb811d6b239161b6c 100644
--- a/sky/engine/core/animation/AnimationNodeTiming.cpp
+++ b/sky/engine/core/animation/AnimationNodeTiming.cpp
@@ -60,21 +60,15 @@ double AnimationNodeTiming::iterations()
return m_parent->specifiedTiming().iterationCount;
}
-// This logic was copied from the example in bindings/tests/idls/TestInterface.idl
-// and bindings/tests/results/V8TestInterface.cpp.
-// FIXME: It might be possible to have 'duration' defined as an attribute in the idl.
-// If possible, fix will be in a follow-up patch.
-void AnimationNodeTiming::getDuration(String propertyName, Nullable<double>& element0, String& element1)
+String AnimationNodeTiming::getDuration(String propertyName)
{
if (propertyName != "duration")
- return;
+ return String();
- if (std::isnan(m_parent->specifiedTiming().iterationDuration)) {
- element1 = "auto";
- return;
- }
- element0.set(m_parent->specifiedTiming().iterationDuration * 1000);
- return;
+ if (std::isnan(m_parent->specifiedTiming().iterationDuration))
+ return "auto";
+
+ return String::number(m_parent->specifiedTiming().iterationDuration * 1000);
}
double AnimationNodeTiming::playbackRate()
« no previous file with comments | « sky/engine/core/animation/AnimationNodeTiming.h ('k') | sky/engine/core/animation/Timing.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698