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

Unified Diff: third_party/WebKit/Source/core/animation/LengthInterpolationFunctions.h

Issue 2283783002: Move static methods out of CSSLengthInterpolationType to LengthInterpolationFunctions (Closed)
Patch Set: Fix compile Created 4 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
Index: third_party/WebKit/Source/core/animation/LengthInterpolationFunctions.h
diff --git a/third_party/WebKit/Source/core/animation/LengthInterpolationFunctions.h b/third_party/WebKit/Source/core/animation/LengthInterpolationFunctions.h
new file mode 100644
index 0000000000000000000000000000000000000000..cfa65d6e40a5b6eae8ea822069b3abb3fb0d8bcb
--- /dev/null
+++ b/third_party/WebKit/Source/core/animation/LengthInterpolationFunctions.h
@@ -0,0 +1,36 @@
+// Copyright 2016 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.
+
+#ifndef LengthInterpolationFunctions_h
+#define LengthInterpolationFunctions_h
+
+#include "core/animation/InterpolationValue.h"
+#include "core/animation/PairwiseInterpolationValue.h"
+#include "platform/Length.h"
+#include <memory>
+
+namespace blink {
+
+class CSSToLengthConversionData;
+
+class LengthInterpolationFunctions {
+ STATIC_ONLY(LengthInterpolationFunctions);
+public:
+ static std::unique_ptr<InterpolableValue> createInterpolablePixels(double pixels);
+ static InterpolationValue createInterpolablePercent(double percent);
+ static std::unique_ptr<InterpolableList> createNeutralInterpolableValue();
+
+ static InterpolationValue maybeConvertCSSValue(const CSSValue&);
+ static InterpolationValue maybeConvertLength(const Length&, float zoom);
+ static PairwiseInterpolationValue mergeSingles(InterpolationValue&& start, InterpolationValue&& end);
+ static bool nonInterpolableValuesAreCompatible(const NonInterpolableValue*, const NonInterpolableValue*);
+ static void composite(std::unique_ptr<InterpolableValue>&, RefPtr<NonInterpolableValue>&, double underlyingFraction, const InterpolableValue&, const NonInterpolableValue*);
+ static Length createLength(const InterpolableValue&, const NonInterpolableValue*, const CSSToLengthConversionData&, ValueRange);
+
+ static void subtractFromOneHundredPercent(InterpolationValue& result);
+};
+
+} // namespace blink
+
+#endif // LengthInterpolationFunctions_h

Powered by Google App Engine
This is Rietveld 408576698