Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: third_party/WebKit/Source/core/css/cssom/CSSRotation.h

Issue 2943303002: [CSS Typed OM] Refactor is2D handling in CSSTransformComponents to match new spec (Closed)
Patch Set: rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 ea573efe14a9d34471a55d9cec6fcc0a902363dd..818bba79b5bf1f546aabbdad0a79f241dc36b279 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSRotation.h
+++ b/third_party/WebKit/Source/core/css/cssom/CSSRotation.h
@@ -22,10 +22,7 @@ class CORE_EXPORT CSSRotation final : public CSSTransformComponent {
public:
// Constructors defined in the IDL.
- static CSSRotation* Create(CSSNumericValue* angle,
- ExceptionState& exception_state) {
- return Create(0, 0, 1, angle, exception_state);
- }
+ static CSSRotation* Create(CSSNumericValue* angle, ExceptionState&);
static CSSRotation* Create(double x,
double y,
double z,
@@ -33,9 +30,7 @@ class CORE_EXPORT CSSRotation final : public CSSTransformComponent {
ExceptionState&);
// Blink-internal ways of creating CSSRotations.
- static CSSRotation* Create(CSSNumericValue* angle) {
- return Create(0, 0, 1, angle);
- }
+ static CSSRotation* Create(CSSNumericValue* angle);
static CSSRotation* Create(double x,
double y,
double z,
@@ -53,9 +48,7 @@ class CORE_EXPORT CSSRotation final : public CSSTransformComponent {
void setZ(double z) { z_ = z; }
// Internal methods - from CSSTransformComponent.
- TransformComponentType GetType() const final {
- return z_ == 1 ? kRotationType : kRotation3DType;
- }
+ TransformComponentType GetType() const final { return kRotationType; }
DOMMatrix* AsMatrix() const final {
return nullptr;
// TODO(meade): Implement.
@@ -74,8 +67,8 @@ class CORE_EXPORT CSSRotation final : public CSSTransformComponent {
}
private:
- CSSRotation(double x, double y, double z, CSSNumericValue* angle)
- : angle_(angle), x_(x), y_(y), z_(z) {}
+ CSSRotation(double x, double y, double z, CSSNumericValue* angle, bool is2D)
+ : CSSTransformComponent(is2D), angle_(angle), x_(x), y_(y), z_(z) {}
Member<CSSNumericValue> angle_;
double x_;
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSPerspective.h ('k') | third_party/WebKit/Source/core/css/cssom/CSSRotation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698