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

Unified Diff: third_party/WebKit/LayoutTests/transforms/3d/general/cssmatrix-3d-zoom.html

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/LayoutTests/transforms/3d/general/cssmatrix-3d-zoom.html
diff --git a/third_party/WebKit/LayoutTests/transforms/3d/general/cssmatrix-3d-zoom.html b/third_party/WebKit/LayoutTests/transforms/3d/general/cssmatrix-3d-zoom.html
index ccf106db578b7b7e07087a90624ee4186c06902e..ffbac59434c481183a08f9376aa5f02531c46125 100644
--- a/third_party/WebKit/LayoutTests/transforms/3d/general/cssmatrix-3d-zoom.html
+++ b/third_party/WebKit/LayoutTests/transforms/3d/general/cssmatrix-3d-zoom.html
@@ -17,7 +17,7 @@ body {
}
.translate {
- transform: translate(100px, 50px);
+ transform: perspective(200px) translate3d(100px, 50px, 25px) rotateY(45deg);
background-color: red;
}
@@ -41,7 +41,8 @@ function runTest() {
var y2 = element2.getBoundingClientRect().top;
var resultString = '';
- if (x1 == x2 && y1 == y2) {
+ var tolerance = 1e-2;
+ if (Math.abs(x1 - x2) < tolerance && Math.abs(y1 - y2) < tolerance) {
resultString += "PASS - Element " + id1 + " and Element " + id2 + " had identical positions";
} else {
resultString += "FAIL - Element " + id1 + " and Element " + id2 + " had different positions";
@@ -60,7 +61,7 @@ function runTest() {
<div id='b' class="box matrix"></div>
<script>
- document.getElementById('b').style.webkitTransform = new WebKitCSSMatrix('matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 50, 0, 1)');
+ document.getElementById('b').style.webkitTransform = new WebKitCSSMatrix('matrix3d(0.707107, 0, -0.707107, 0.00353553, 0, 1, 0, 0, 0.707107, 0, 0.707107, -0.00353553, 100, 50, 25, 0.875)');
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698