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 #include "core/animation/CSSTranslateInterpolationType.h" | 5 #include "core/animation/CSSTranslateInterpolationType.h" |
6 | 6 |
7 #include "core/animation/LengthInterpolationFunctions.h" | 7 #include "core/animation/LengthInterpolationFunctions.h" |
8 #include "core/css/CSSValueList.h" | 8 #include "core/css/CSSValueList.h" |
9 #include "core/css/resolver/StyleResolverState.h" | 9 #include "core/css/resolver/StyleResolverState.h" |
10 #include "platform/transforms/TranslateTransformOperation.h" | 10 #include "platform/transforms/TranslateTransformOperation.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 if (m_inheritedTranslate == inheritedTranslate) | 40 if (m_inheritedTranslate == inheritedTranslate) |
41 return true; | 41 return true; |
42 if (!m_inheritedTranslate || !inheritedTranslate) | 42 if (!m_inheritedTranslate || !inheritedTranslate) |
43 return false; | 43 return false; |
44 return *m_inheritedTranslate == *inheritedTranslate; | 44 return *m_inheritedTranslate == *inheritedTranslate; |
45 } | 45 } |
46 | 46 |
47 private: | 47 private: |
48 InheritedTranslateChecker( | 48 InheritedTranslateChecker( |
49 PassRefPtr<TranslateTransformOperation> inheritedTranslate) | 49 PassRefPtr<TranslateTransformOperation> inheritedTranslate) |
50 : m_inheritedTranslate(inheritedTranslate) {} | 50 : m_inheritedTranslate(std::move(inheritedTranslate)) {} |
51 | 51 |
52 RefPtr<TransformOperation> m_inheritedTranslate; | 52 RefPtr<TransformOperation> m_inheritedTranslate; |
53 }; | 53 }; |
54 | 54 |
55 enum TranslateComponentIndex : unsigned { | 55 enum TranslateComponentIndex : unsigned { |
56 TranslateX, | 56 TranslateX, |
57 TranslateY, | 57 TranslateY, |
58 TranslateZ, | 58 TranslateZ, |
59 TranslateComponentIndexCount, | 59 TranslateComponentIndexCount, |
60 }; | 60 }; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 *list.get(TranslateZ), nullptr, conversionData, ValueRangeAll) | 204 *list.get(TranslateZ), nullptr, conversionData, ValueRangeAll) |
205 .pixels(); | 205 .pixels(); |
206 | 206 |
207 RefPtr<TranslateTransformOperation> result = | 207 RefPtr<TranslateTransformOperation> result = |
208 TranslateTransformOperation::create(x, y, z, | 208 TranslateTransformOperation::create(x, y, z, |
209 TransformOperation::Translate3D); | 209 TransformOperation::Translate3D); |
210 state.style()->setTranslate(std::move(result)); | 210 state.style()->setTranslate(std::move(result)); |
211 } | 211 } |
212 | 212 |
213 } // namespace blink | 213 } // namespace blink |
OLD | NEW |