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

Unified Diff: Source/platform/transforms/TranslateTransformOperation.h

Issue 1158603003: CSS Independent Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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: Source/platform/transforms/TranslateTransformOperation.h
diff --git a/Source/platform/transforms/TranslateTransformOperation.h b/Source/platform/transforms/TranslateTransformOperation.h
index 67c2aeea9dd94ec8b906e31e6e4eece287b522b4..3fd02efe70c98743a054f0af125b2e096391b1de 100644
--- a/Source/platform/transforms/TranslateTransformOperation.h
+++ b/Source/platform/transforms/TranslateTransformOperation.h
@@ -43,6 +43,11 @@ public:
return adoptRef(new TranslateTransformOperation(tx, ty, tz, type));
}
+ static PassRefPtr<TranslateTransformOperation> create(PassRefPtr<TranslateTransformOperation> o)
+ {
+ return adoptRef(new TranslateTransformOperation(*o));
+ }
+
virtual bool canBlendWith(const TransformOperation& other) const;
double x(const FloatSize& borderBoxSize) const { return floatValueForLength(m_x, borderBoxSize.width()); }
@@ -51,9 +56,9 @@ public:
Length x() const { return m_x; }
Length y() const { return m_y; }
double z() const { return m_z; }
+ virtual OperationType type() const override { return m_type; }
private:
- virtual OperationType type() const override { return m_type; }
virtual bool operator==(const TransformOperation& o) const override
{
@@ -84,6 +89,14 @@ private:
ASSERT(type == TranslateX || type == TranslateY || type == TranslateZ || type == Translate || type == Translate3D);
}
+ TranslateTransformOperation(const TranslateTransformOperation& o)
+ : m_x(o.m_x)
+ , m_y(o.m_y)
+ , m_z(o.m_z)
+ , m_type(o.m_type)
+ {
+ }
+
Length m_x;
Length m_y;
double m_z;

Powered by Google App Engine
This is Rietveld 408576698