OLD | NEW |
1 // Copyright 2016 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 LengthUnitsChecker_h | 5 #ifndef LengthUnitsChecker_h |
6 #define LengthUnitsChecker_h | 6 #define LengthUnitsChecker_h |
7 | 7 |
| 8 #include <memory> |
8 #include "core/animation/InterpolationType.h" | 9 #include "core/animation/InterpolationType.h" |
9 #include "core/css/CSSPrimitiveValue.h" | 10 #include "core/css/CSSPrimitiveValue.h" |
10 #include "core/css/resolver/StyleResolverState.h" | 11 #include "core/css/resolver/StyleResolverState.h" |
11 #include "wtf/PtrUtil.h" | 12 #include "wtf/PtrUtil.h" |
12 #include <memory> | |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class LengthUnitsChecker : public InterpolationType::ConversionChecker { | 16 class LengthUnitsChecker : public InterpolationType::ConversionChecker { |
17 public: | 17 public: |
18 static std::unique_ptr<LengthUnitsChecker> maybeCreate( | 18 static std::unique_ptr<LengthUnitsChecker> maybeCreate( |
19 CSSLengthArray&& lengthArray, | 19 CSSLengthArray&& lengthArray, |
20 const StyleResolverState& state) { | 20 const StyleResolverState& state) { |
21 bool create = false; | 21 bool create = false; |
22 size_t lastIndex = 0; | 22 size_t lastIndex = 0; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 size_t lastIndex) | 59 size_t lastIndex) |
60 : m_lengthArray(std::move(lengthArray)), m_lastIndex(lastIndex) {} | 60 : m_lengthArray(std::move(lengthArray)), m_lastIndex(lastIndex) {} |
61 | 61 |
62 const CSSLengthArray m_lengthArray; | 62 const CSSLengthArray m_lengthArray; |
63 const size_t m_lastIndex; | 63 const size_t m_lastIndex; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace blink | 66 } // namespace blink |
67 | 67 |
68 #endif // LengthUnitsChecker_h | 68 #endif // LengthUnitsChecker_h |
OLD | NEW |