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

Unified Diff: third_party/WebKit/Source/core/css/cssom/CSSTranslation.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/CSSTranslation.h
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTranslation.h b/third_party/WebKit/Source/core/css/cssom/CSSTranslation.h
index 23513ca1a24773aed3ea8dc820dae824cdd8b3ae..069919b08be86b365a53ca621a4f8eb892aef4c0 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSTranslation.h
+++ b/third_party/WebKit/Source/core/css/cssom/CSSTranslation.h
@@ -31,9 +31,7 @@ class CORE_EXPORT CSSTranslation final : public CSSTransformComponent {
ExceptionState&);
static CSSTranslation* Create(CSSNumericValue* x,
CSSNumericValue* y,
- ExceptionState& exception_state) {
- return Create(x, y, nullptr, exception_state);
- }
+ ExceptionState&);
// Blink-internal ways of creating CSSTranslations.
static CSSTranslation* FromCSSValue(const CSSFunctionValue& value) {
@@ -49,9 +47,7 @@ class CORE_EXPORT CSSTranslation final : public CSSTransformComponent {
void setZ(CSSNumericValue* z, ExceptionState&);
// Internal methods - from CSSTransformComponent.
- TransformComponentType GetType() const final {
- return Is2D() ? kTranslationType : kTranslation3DType;
- }
+ TransformComponentType GetType() const final { return kTranslationType; }
// TODO: Implement AsMatrix for CSSTranslation.
DOMMatrix* AsMatrix() const final { return nullptr; }
CSSFunctionValue* ToCSSValue() const final;
@@ -64,10 +60,11 @@ class CORE_EXPORT CSSTranslation final : public CSSTransformComponent {
}
private:
- CSSTranslation(CSSNumericValue* x, CSSNumericValue* y, CSSNumericValue* z)
- : CSSTransformComponent(), x_(x), y_(y), z_(z) {}
-
- bool Is2D() const { return !z_; }
+ CSSTranslation(CSSNumericValue* x,
+ CSSNumericValue* y,
+ CSSNumericValue* z,
+ bool is2D)
+ : CSSTransformComponent(is2D), x_(x), y_(y), z_(z) {}
Member<CSSNumericValue> x_;
Member<CSSNumericValue> y_;

Powered by Google App Engine
This is Rietveld 408576698