Bug 1078262 - Only use the fixed epsilon for the translation components. r=roc, a=lmandel
authorMarkus Stange <mstange@themasta.com>
Thu, 16 Oct 2014 12:37:09 +0200
changeset 234789 4026969d82f45e3f4440d9eea270cf2e081fb6ec
parent 234788 1a848854d46458ec7f49c917befd65670a890863
child 234790 e203a2376b264e371515e4b405b235cd81ac6854
push id611
push userraliiev@mozilla.com
push dateMon, 05 Jan 2015 23:23:16 +0000
treeherdermozilla-release@345cd3b9c445 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, lmandel
bugs1078262
milestone35.0a2
Bug 1078262 - Only use the fixed epsilon for the translation components. r=roc, a=lmandel
gfx/2d/Matrix.h
gfx/thebes/gfx3DMatrix.cpp
layout/reftests/bugs/1078262-1.html
layout/reftests/bugs/reftest.list
--- a/gfx/2d/Matrix.h
+++ b/gfx/2d/Matrix.h
@@ -832,29 +832,29 @@ public:
     Float __33 = _12*_24*_41 - _14*_22*_41 +
                 _14*_21*_42 - _11*_24*_42 -
                 _12*_21*_44 + _11*_22*_44;
     return (__33 * det) < 0;
   }
 
   Matrix4x4 &NudgeToIntegersFixedEpsilon()
   {
+    NudgeToInteger(&_11);
+    NudgeToInteger(&_12);
+    NudgeToInteger(&_13);
+    NudgeToInteger(&_14);
+    NudgeToInteger(&_21);
+    NudgeToInteger(&_22);
+    NudgeToInteger(&_23);
+    NudgeToInteger(&_24);
+    NudgeToInteger(&_31);
+    NudgeToInteger(&_32);
+    NudgeToInteger(&_33);
+    NudgeToInteger(&_34);
     static const float error = 1e-5f;
-    NudgeToInteger(&_11, error);
-    NudgeToInteger(&_12, error);
-    NudgeToInteger(&_13, error);
-    NudgeToInteger(&_14, error);
-    NudgeToInteger(&_21, error);
-    NudgeToInteger(&_22, error);
-    NudgeToInteger(&_23, error);
-    NudgeToInteger(&_24, error);
-    NudgeToInteger(&_31, error);
-    NudgeToInteger(&_32, error);
-    NudgeToInteger(&_33, error);
-    NudgeToInteger(&_34, error);
     NudgeToInteger(&_41, error);
     NudgeToInteger(&_42, error);
     NudgeToInteger(&_43, error);
     NudgeToInteger(&_44, error);
     return *this;
   }
 
   Point4D TransposedVector(int aIndex) const
--- a/gfx/thebes/gfx3DMatrix.cpp
+++ b/gfx/thebes/gfx3DMatrix.cpp
@@ -763,26 +763,26 @@ void gfx3DMatrix::NudgeToIntegers(void)
   NudgeToInteger(&_41);
   NudgeToInteger(&_42);
   NudgeToInteger(&_43);
   NudgeToInteger(&_44);
 }
 
 void gfx3DMatrix::NudgeToIntegersFixedEpsilon(void)
 {
+  NudgeToInteger(&_11);
+  NudgeToInteger(&_12);
+  NudgeToInteger(&_13);
+  NudgeToInteger(&_14);
+  NudgeToInteger(&_21);
+  NudgeToInteger(&_22);
+  NudgeToInteger(&_23);
+  NudgeToInteger(&_24);
+  NudgeToInteger(&_31);
+  NudgeToInteger(&_32);
+  NudgeToInteger(&_33);
+  NudgeToInteger(&_34);
   static const float error = 1e-5;
-  NudgeToInteger(&_11, error);
-  NudgeToInteger(&_12, error);
-  NudgeToInteger(&_13, error);
-  NudgeToInteger(&_14, error);
-  NudgeToInteger(&_21, error);
-  NudgeToInteger(&_22, error);
-  NudgeToInteger(&_23, error);
-  NudgeToInteger(&_24, error);
-  NudgeToInteger(&_31, error);
-  NudgeToInteger(&_32, error);
-  NudgeToInteger(&_33, error);
-  NudgeToInteger(&_34, error);
   NudgeToInteger(&_41, error);
   NudgeToInteger(&_42, error);
   NudgeToInteger(&_43, error);
   NudgeToInteger(&_44, error);
 }
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1078262-1.html
@@ -0,0 +1,34 @@
+<!-- Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/ -->
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Test for bug 1078262</title>
+
+<style>
+#outer {
+  perspective: 10000px;
+  width: 200px;
+  height: 4000px;
+  margin-top: -3800px;
+  background: red;
+  box-shadow: inset 0 0 0 2px white;
+}
+#inner {
+  width: 200px;
+  height: 4000px;
+  background: white;
+  box-sizing: border-box;
+  border: 1px solid white;
+  transform-origin: 50% 100% 0;
+  animation: active-rotation 5s linear infinite;
+}
+@keyframes active-rotation {
+  from { transform: rotateX(10.01deg); }
+  to { transform: rotateX(10.00deg); }
+}
+</style>
+
+<div id="outer">
+  <div id="inner"></div>
+</div>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1829,9 +1829,10 @@ pref(browser.display.use_document_fonts,
 == 1053035-1-flex.html 1053035-1-ref.html
 test-pref(layout.css.grid.enabled,true) == 1053035-1-grid.html 1053035-1-ref.html
 == 1059167-1.html 1059167-1-ref.html
 == 1059498-1.html 1059498-1-ref.html
 == 1059498-2.html 1059498-1-ref.html
 == 1059498-3.html 1059498-1-ref.html
 test-pref(dom.webcomponents.enabled,true) == 1066554-1.html 1066554-1-ref.html
 == 1069716-1.html 1069716-1-ref.html
+== 1078262-1.html about:blank
 == 1081072-1.html 1081072-1-ref.html