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

Unified Diff: Source/core/rendering/style/TransformOrigin.h

Issue 644953003: Store [-webkit-]transform-origin as a TransformOrigin. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Almost forgot: drop unused ctor. (+ rebase). Created 6 years, 2 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
« no previous file with comments | « Source/core/rendering/style/StyleTransformData.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/TransformOrigin.h
diff --git a/Source/core/rendering/style/TransformOrigin.h b/Source/core/rendering/style/TransformOrigin.h
new file mode 100644
index 0000000000000000000000000000000000000000..1fb798dbb7d19d718ea9c4d78ec03f4b6150e079
--- /dev/null
+++ b/Source/core/rendering/style/TransformOrigin.h
@@ -0,0 +1,28 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TransformOrigin_h
+#define TransformOrigin_h
+
+#include "platform/Length.h"
+
+namespace blink {
+
+class TransformOrigin {
+public:
+ TransformOrigin(const Length& x, const Length& y, float z) : m_x(x), m_y(y), m_z(z) { }
+ bool operator==(const TransformOrigin& o) const { return m_x == o.m_x && m_y == o.m_y && m_z == o.m_z; }
+ bool operator!=(const TransformOrigin& o) const { return !(*this == o); }
+ const Length& x() const { return m_x; }
+ const Length& y() const { return m_y; }
+ float z() const { return m_z; }
+private:
+ Length m_x;
+ Length m_y;
+ float m_z;
+};
+
+} // namespace blink
+
+#endif // TransformOrigin_h
« no previous file with comments | « Source/core/rendering/style/StyleTransformData.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698