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

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

Issue 1215563002: Implement left property animation on InvalidatableStyleInterpolation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make Windows not crash Created 5 years, 5 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/LengthPropertyFunctions.h ('k') | Source/core/animation/LengthStyleInterpolation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/LengthPropertyFunctions.cpp
diff --git a/Source/core/animation/LengthPropertyFunctions.cpp b/Source/core/animation/LengthPropertyFunctions.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..64d133fc49981883a37d3538c6b4642ae0973772
--- /dev/null
+++ b/Source/core/animation/LengthPropertyFunctions.cpp
@@ -0,0 +1,38 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "core/animation/LengthPropertyFunctions.h"
+
+#include "core/style/ComputedStyle.h"
+
+namespace blink {
+
+// TODO(alancutter): Generate these functions.
+
+ValueRange LengthPropertyFunctions::valueRange(CSSPropertyID property)
+{
+ ASSERT(property == CSSPropertyLeft);
+ return ValueRangeAll;
+}
+
+bool LengthPropertyFunctions::getPixelsForKeyword(CSSPropertyID property, CSSValueID valueID, double& result)
+{
+ ASSERT(property == CSSPropertyLeft);
+ return false;
+}
+
+bool LengthPropertyFunctions::getLength(CSSPropertyID property, const ComputedStyle& style, Length& result)
+{
+ ASSERT(property == CSSPropertyLeft);
+ result = style.left();
+ return true;
+}
+
+bool LengthPropertyFunctions::getInitialLength(CSSPropertyID property, Length& result)
+{
+ return getLength(property, *ComputedStyle::initialStyle(), result);
+}
+
+} // namespace blink
« no previous file with comments | « Source/core/animation/LengthPropertyFunctions.h ('k') | Source/core/animation/LengthStyleInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698