| 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/CSSRotateInterpolationType.h" | 5 #include "core/animation/CSSRotateInterpolationType.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "core/css/resolver/StyleBuilderConverter.h" | 8 #include "core/css/resolver/StyleBuilderConverter.h" |
| 8 #include "platform/transforms/RotateTransformOperation.h" | 9 #include "platform/transforms/RotateTransformOperation.h" |
| 9 #include "platform/transforms/Rotation.h" | 10 #include "platform/transforms/Rotation.h" |
| 10 #include "wtf/PtrUtil.h" | 11 #include "wtf/PtrUtil.h" |
| 11 #include <memory> | |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class OptionalRotation { | 15 class OptionalRotation { |
| 16 public: | 16 public: |
| 17 OptionalRotation() : m_isNone(true) {} | 17 OptionalRotation() : m_isNone(true) {} |
| 18 | 18 |
| 19 explicit OptionalRotation(Rotation rotation) | 19 explicit OptionalRotation(Rotation rotation) |
| 20 : m_rotation(rotation), m_isNone(false) {} | 20 : m_rotation(rotation), m_isNone(false) {} |
| 21 | 21 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 OptionalRotation rotation = nonInterpolableValue.slerpedRotation(progress); | 258 OptionalRotation rotation = nonInterpolableValue.slerpedRotation(progress); |
| 259 if (rotation.isNone()) { | 259 if (rotation.isNone()) { |
| 260 state.style()->setRotate(nullptr); | 260 state.style()->setRotate(nullptr); |
| 261 return; | 261 return; |
| 262 } | 262 } |
| 263 state.style()->setRotate(RotateTransformOperation::create( | 263 state.style()->setRotate(RotateTransformOperation::create( |
| 264 rotation.rotation(), TransformOperation::Rotate3D)); | 264 rotation.rotation(), TransformOperation::Rotate3D)); |
| 265 } | 265 } |
| 266 | 266 |
| 267 } // namespace blink | 267 } // namespace blink |
| OLD | NEW |