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

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

Issue 1682083004: Add additive animation support for CSS property transform-origin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_radiusInterpolationType
Patch Set: Rebased Created 4 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CSSTransformOriginInterpolationType_h
6 #define CSSTransformOriginInterpolationType_h
7
8 #include "core/animation/CSSLengthInterpolationType.h"
9 #include "core/animation/CSSLengthListInterpolationType.h"
10 #include "core/animation/CSSPositionAxisListInterpolationType.h"
11 #include "core/animation/ListInterpolationFunctions.h"
12 #include "core/css/CSSValueList.h"
13
14 namespace blink {
15
16 class CSSTransformOriginInterpolationType : public CSSLengthListInterpolationTyp e {
17 public:
18 CSSTransformOriginInterpolationType(CSSPropertyID property)
19 : CSSLengthListInterpolationType(property)
20 { }
21
22 private:
23 InterpolationValue maybeConvertValue(const CSSValue& value, const StyleResol verState&, ConversionCheckers&) const final
24 {
25 const CSSValueList& list = toCSSValueList(value);
26 ASSERT(list.length() == 3);
27 return ListInterpolationFunctions::createList(list.length(), [&list](siz e_t index) {
28 const CSSValue& item = *list.item(index);
29 if (index < 2)
30 return CSSPositionAxisListInterpolationType::convertPositionAxis CSSValue(item);
31 return CSSLengthInterpolationType::maybeConvertCSSValue(item);
32 });
33 }
34 };
35
36 } // namespace blink
37
38 #endif // CSSTransformOriginInterpolationType_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698