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

Unified Diff: third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp

Issue 1777613002: Add localToAbsoluteTransform and localToAncestorTransform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments to LayoutObject.h Created 4 years, 9 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/platform/transforms/TransformationMatrix.cpp
diff --git a/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp b/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp
index 541a68bc09cbc63701912c262f1d5b0e394260be..f013a3f35f9a8031ad283e9ef993044fa5282d7b 100644
--- a/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp
+++ b/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp
@@ -1398,6 +1398,17 @@ AffineTransform TransformationMatrix::toAffineTransform() const
m_matrix[1][1], m_matrix[3][0], m_matrix[3][1]);
}
+void TransformationMatrix::flattenTo2d()
+{
+ m_matrix[2][0] = 0;
+ m_matrix[2][1] = 0;
+ m_matrix[0][2] = 0;
+ m_matrix[1][2] = 0;
+ m_matrix[2][2] = 1;
+ m_matrix[3][2] = 0;
+ m_matrix[2][3] = 0;
+}
+
static inline void blendFloat(double& from, double to, double progress)
{
if (from != to)

Powered by Google App Engine
This is Rietveld 408576698