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 33a86eb4054041ab45972dacbd163d496ab3f6c4..f4d1827e411fc9a9954517e186deff093c2ae60d 100644 |
--- a/third_party/WebKit/Source/core/css/cssom/CSSRotation.h |
+++ b/third_party/WebKit/Source/core/css/cssom/CSSRotation.h |
@@ -5,8 +5,8 @@ |
#ifndef CSSRotation_h |
#define CSSRotation_h |
-#include "core/css/cssom/CSSAngleValue.h" |
#include "core/css/cssom/CSSMatrixComponent.h" |
+#include "core/css/cssom/CSSNumericValue.h" |
#include "core/css/cssom/CSSTransformComponent.h" |
namespace blink { |
@@ -16,23 +16,23 @@ class CORE_EXPORT CSSRotation final : public CSSTransformComponent { |
DEFINE_WRAPPERTYPEINFO(); |
public: |
- static CSSRotation* Create(const CSSAngleValue* angle_value) { |
+ static CSSRotation* Create(const CSSNumericValue* angle_value) { |
return new CSSRotation(angle_value); |
} |
static CSSRotation* Create(double x, |
double y, |
double z, |
- const CSSAngleValue* angle_value) { |
+ const CSSNumericValue* angle_value) { |
return new CSSRotation(x, y, z, angle_value); |
} |
static CSSRotation* FromCSSValue(const CSSFunctionValue&); |
// Bindings requires returning non-const pointers. This is safe because |
- // CSSAngleValues are immutable. |
- CSSAngleValue* angle() const { |
- return const_cast<CSSAngleValue*>(angle_.Get()); |
+ // CSSNumericValues are immutable. |
+ CSSNumericValue* angle() const { |
+ return const_cast<CSSNumericValue*>(angle_.Get()); |
} |
double x() const { return x_; } |
double y() const { return y_; } |
@@ -43,8 +43,14 @@ class CORE_EXPORT CSSRotation final : public CSSTransformComponent { |
} |
CSSMatrixComponent* asMatrix() const override { |
- return is2d_ ? CSSMatrixComponent::Rotate(angle_->degrees()) |
- : CSSMatrixComponent::Rotate3d(angle_->degrees(), x_, y_, z_); |
+ return nullptr; |
+ // TODO(meade): Implement. |
+ // return is2d_ |
+ // ? CSSMatrixComponent::Rotate( |
+ // angle_->to(CSSPrimitiveValue::UnitType::kDegrees)->value()) |
+ // : CSSMatrixComponent::Rotate3d( |
+ // angle_->to(CSSPrimitiveValue::UnitType::kDegrees)->value(), |
+ // x_, y_, z_); |
} |
CSSFunctionValue* ToCSSValue() const override; |
@@ -55,13 +61,13 @@ class CORE_EXPORT CSSRotation final : public CSSTransformComponent { |
} |
private: |
- CSSRotation(const CSSAngleValue* angle) |
+ CSSRotation(const CSSNumericValue* angle) |
: angle_(angle), x_(0), y_(0), z_(1), is2d_(true) {} |
- CSSRotation(double x, double y, double z, const CSSAngleValue* angle) |
+ CSSRotation(double x, double y, double z, const CSSNumericValue* angle) |
: angle_(angle), x_(x), y_(y), z_(z), is2d_(false) {} |
- Member<const CSSAngleValue> angle_; |
+ Member<const CSSNumericValue> angle_; |
double x_; |
double y_; |
double z_; |