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

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

Issue 1418193007: Web Animations: Add SVGNumberOptionalNumberInterpolationType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_svgIntegerInterpolationType
Patch Set: neutralKeyframe Created 5 years, 1 month 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/NumberOptionalNumberSVGInterpolation.h
diff --git a/third_party/WebKit/Source/core/animation/NumberOptionalNumberSVGInterpolation.h b/third_party/WebKit/Source/core/animation/NumberOptionalNumberSVGInterpolation.h
deleted file mode 100644
index 18b26c6af5c451883d9388340806b21ee1373637..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/animation/NumberOptionalNumberSVGInterpolation.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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.
-
-#ifndef NumberOptionalNumberSVGInterpolation_h
-#define NumberOptionalNumberSVGInterpolation_h
-
-#include "core/animation/SVGInterpolation.h"
-#include "core/svg/SVGNumber.h"
-#include "core/svg/SVGNumberOptionalNumber.h"
-
-namespace blink {
-
-class SVGNumberOptionalNumber;
-
-class NumberOptionalNumberSVGInterpolation : public SVGInterpolation {
-public:
- static PassRefPtr<NumberOptionalNumberSVGInterpolation> create(SVGPropertyBase* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute)
- {
- return adoptRef(new NumberOptionalNumberSVGInterpolation(toInterpolableValue(start), toInterpolableValue(end), attribute));
- }
-
- PassRefPtrWillBeRawPtr<SVGPropertyBase> interpolatedValue(SVGElement&) const final
- {
- return fromInterpolableValue(*m_cachedValue);
- }
-
-private:
- NumberOptionalNumberSVGInterpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<InterpolableValue> end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute)
- : SVGInterpolation(start, end, attribute)
- {
- }
-
- static PassOwnPtr<InterpolableValue> toInterpolableValue(SVGPropertyBase* value)
- {
- RefPtrWillBeRawPtr<SVGNumberOptionalNumber> numberOptionalNumber = toSVGNumberOptionalNumber(value);
- OwnPtr<InterpolableList> result = InterpolableList::create(2);
- result->set(0, InterpolableNumber::create(numberOptionalNumber->firstNumber()->value()));
- result->set(1, InterpolableNumber::create(numberOptionalNumber->secondNumber()->value()));
- return result.release();
- }
-
- static PassRefPtrWillBeRawPtr<SVGNumberOptionalNumber> fromInterpolableValue(const InterpolableValue& value)
- {
- const InterpolableList& list = toInterpolableList(value);
- return SVGNumberOptionalNumber::create(
- SVGNumber::create(toInterpolableNumber(list.get(0))->value()),
- SVGNumber::create(toInterpolableNumber(list.get(1))->value()));
- }
-};
-
-}
-
-#endif // NumberOptionalNumberSVGInterpolation_h

Powered by Google App Engine
This is Rietveld 408576698