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

Unified Diff: third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.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/CSSTransformComponent.h
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h b/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h
index ebc67eaf34e896ba93533a60800622de75ee3913..0f258c165d35b51a7db248aad89738e2b25879b2 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h
+++ b/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h
@@ -32,10 +32,6 @@ class CORE_EXPORT CSSTransformComponent
kScaleType,
kSkewType,
kTranslationType,
- kMatrix3DType,
- kRotation3DType,
- kScale3DType,
- kTranslation3DType
};
virtual ~CSSTransformComponent() {}
@@ -44,7 +40,8 @@ class CORE_EXPORT CSSTransformComponent
static CSSTransformComponent* FromCSSValue(const CSSValue&);
// Getters and setters for attributes defined in the IDL.
- bool is2D() const { return Is2DComponentType(GetType()); }
+ bool is2D() const { return is2D_; }
+ virtual void setIs2D(bool is2D) { is2D_ = is2D; }
virtual String toString() const {
const CSSValue* result = ToCSSValue();
// TODO(meade): Remove this once all the number and length types are
@@ -60,15 +57,10 @@ class CORE_EXPORT CSSTransformComponent
DEFINE_INLINE_VIRTUAL_TRACE() {}
protected:
- static bool Is2DComponentType(TransformComponentType transform_type) {
- return transform_type != kMatrix3DType &&
- transform_type != kPerspectiveType &&
- transform_type != kRotation3DType &&
- transform_type != kScale3DType &&
- transform_type != kTranslation3DType;
- }
+ CSSTransformComponent(bool is2D) : is2D_(is2D) {}
- CSSTransformComponent() = default;
+ private:
+ bool is2D_;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSSkew.h ('k') | third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698