| Index: third_party/WebKit/Source/core/css/cssom/CSSRotation.h
|
| diff --git a/third_party/WebKit/Source/core/css/cssom/CSSRotation.h b/third_party/WebKit/Source/core/css/cssom/CSSRotation.h
|
| index eed7e981bc0e246b1f44980ac13746c1de74d82c..25628f056f96999f93f44f79587253e8737f15e2 100644
|
| --- a/third_party/WebKit/Source/core/css/cssom/CSSRotation.h
|
| +++ b/third_party/WebKit/Source/core/css/cssom/CSSRotation.h
|
| @@ -16,26 +16,24 @@ class CORE_EXPORT CSSRotation final : public CSSTransformComponent {
|
| DEFINE_WRAPPERTYPEINFO();
|
|
|
| public:
|
| - static CSSRotation* create(double angle) { return new CSSRotation(angle); }
|
| -
|
| static CSSRotation* create(const CSSAngleValue* angleValue) {
|
| - return new CSSRotation(angleValue->degrees());
|
| - }
|
| -
|
| - static CSSRotation* create(double x, double y, double z, double angle) {
|
| - return new CSSRotation(x, y, z, angle);
|
| + return new CSSRotation(angleValue);
|
| }
|
|
|
| static CSSRotation* create(double x,
|
| double y,
|
| double z,
|
| const CSSAngleValue* angleValue) {
|
| - return new CSSRotation(x, y, z, angleValue->degrees());
|
| + return new CSSRotation(x, y, z, angleValue);
|
| }
|
|
|
| static CSSRotation* fromCSSValue(const CSSFunctionValue&);
|
|
|
| - double angle() const { return m_angle; }
|
| + // Bindings requires returning non-const pointers. This is safe because
|
| + // CSSAngleValues are immutable.
|
| + CSSAngleValue* angle() const {
|
| + return const_cast<CSSAngleValue*>(m_angle.get());
|
| + }
|
| double x() const { return m_x; }
|
| double y() const { return m_y; }
|
| double z() const { return m_z; }
|
| @@ -45,24 +43,29 @@ class CORE_EXPORT CSSRotation final : public CSSTransformComponent {
|
| }
|
|
|
| CSSMatrixTransformComponent* asMatrix() const override {
|
| - return m_is2D
|
| - ? CSSMatrixTransformComponent::rotate(m_angle)
|
| - : CSSMatrixTransformComponent::rotate3d(m_angle, m_x, m_y, m_z);
|
| + return m_is2D ? CSSMatrixTransformComponent::rotate(m_angle->degrees())
|
| + : CSSMatrixTransformComponent::rotate3d(m_angle->degrees(),
|
| + m_x, m_y, m_z);
|
| }
|
|
|
| CSSFunctionValue* toCSSValue() const override;
|
|
|
| + DEFINE_INLINE_VIRTUAL_TRACE() {
|
| + visitor->trace(m_angle);
|
| + CSSTransformComponent::trace(visitor);
|
| + }
|
| +
|
| private:
|
| - CSSRotation(double angle)
|
| - : m_x(0), m_y(0), m_z(1), m_angle(angle), m_is2D(true) {}
|
| + CSSRotation(const CSSAngleValue* angle)
|
| + : m_angle(angle), m_x(0), m_y(0), m_z(1), m_is2D(true) {}
|
|
|
| - CSSRotation(double x, double y, double z, double angle)
|
| - : m_x(x), m_y(y), m_z(z), m_angle(angle), m_is2D(false) {}
|
| + CSSRotation(double x, double y, double z, const CSSAngleValue* angle)
|
| + : m_angle(angle), m_x(x), m_y(y), m_z(z), m_is2D(false) {}
|
|
|
| + Member<const CSSAngleValue> m_angle;
|
| double m_x;
|
| double m_y;
|
| double m_z;
|
| - double m_angle;
|
| bool m_is2D;
|
| };
|
|
|
|
|