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

Side by Side Diff: third_party/WebKit/Source/core/animation/CSSTranslateInterpolationType.h

Issue 1644883002: Add additive animation support for CSS property translate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_propertyInterpolationTypesMapping
Patch Set: Rebased Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CSSNumberInterpolationType_h 5 #ifndef CSSTranslateInterpolationType_h
6 #define CSSNumberInterpolationType_h 6 #define CSSTranslateInterpolationType_h
7 7
8 #include "core/animation/CSSInterpolationType.h" 8 #include "core/animation/CSSInterpolationType.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class CSSNumberInterpolationType : public CSSInterpolationType { 12 class CSSTranslateInterpolationType : public CSSInterpolationType {
13 public: 13 public:
14 CSSNumberInterpolationType(CSSPropertyID property) 14 CSSTranslateInterpolationType(CSSPropertyID property)
15 : CSSInterpolationType(property) 15 : CSSInterpolationType(property)
16 { } 16 {
17 ASSERT(property == CSSPropertyTranslate);
18 }
17 19
18 InterpolationValue maybeConvertUnderlyingValue(const InterpolationEnvironmen t&) const final; 20 InterpolationValue maybeConvertUnderlyingValue(const InterpolationEnvironmen t&) const final;
19 void apply(const InterpolableValue&, const NonInterpolableValue*, Interpolat ionEnvironment&) const final; 21 void apply(const InterpolableValue&, const NonInterpolableValue*, Interpolat ionEnvironment&) const final;
20 22
21 private: 23 private:
22 InterpolationValue createNumberValue(double number) const;
23 InterpolationValue maybeConvertNeutral(const InterpolationValue& underlying, ConversionCheckers&) const final; 24 InterpolationValue maybeConvertNeutral(const InterpolationValue& underlying, ConversionCheckers&) const final;
24 InterpolationValue maybeConvertInitial() const final; 25 InterpolationValue maybeConvertInitial() const final;
25 InterpolationValue maybeConvertInherit(const StyleResolverState&, Conversion Checkers&) const final; 26 InterpolationValue maybeConvertInherit(const StyleResolverState&, Conversion Checkers&) const final;
26 InterpolationValue maybeConvertValue(const CSSValue&, const StyleResolverSta te&, ConversionCheckers&) const final; 27 InterpolationValue maybeConvertValue(const CSSValue&, const StyleResolverSta te&, ConversionCheckers&) const final;
28
27 }; 29 };
28 30
29 } // namespace blink 31 } // namespace blink
30 32
31 #endif // CSSNumberInterpolationType_h 33 #endif // CSSTranslateInterpolationType_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698