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

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

Issue 2482753002: Fix matrix3d transform under page zoom (Closed)
Patch Set: Add a comment for zoom Created 4 years, 1 month 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.h
diff --git a/third_party/WebKit/Source/platform/transforms/TransformationMatrix.h b/third_party/WebKit/Source/platform/transforms/TransformationMatrix.h
index f9ae7d853bdd323278b4909a6db8639a0afe2669..f2bc7d9785f98169614cbf0bc219b1dd653b091d 100644
--- a/third_party/WebKit/Source/platform/transforms/TransformationMatrix.h
+++ b/third_party/WebKit/Source/platform/transforms/TransformationMatrix.h
@@ -337,6 +337,16 @@ class PLATFORM_EXPORT TransformationMatrix {
return applyTransformOrigin(origin.x(), origin.y(), origin.z());
}
+ // Changes the transform to:
+ //
+ // scale3d(z, z, z) * mat * scale3d(1/z, 1/z, 1/z)
+ //
+ // Useful for mapping zoomed points to their zoomed transformed result:
+ //
+ // new_mat * (scale3d(z, z, z) * x) == scale3d(z, z, z) * (mat * x)
+ //
alancutter (OOO until 2018) 2016/11/10 06:50:03 Nice comment! I'd even put this in the description
+ TransformationMatrix& zoom(double zoomFactor);
+
bool isInvertible() const;
// This method returns the identity matrix if it is not invertible.

Powered by Google App Engine
This is Rietveld 408576698