Bug 1078262 - Only use the fixed epsilon for the translation components. r=roc, a=lmandel
authorMarkus Stange <mstange@themasta.com>
Fri, 24 Oct 2014 03:42:00 -0400
changeset 225805 2c49dc84f1a0
parent 225804 78b9d7be1770
child 225806 d9664db594e9
push id4023
push userryanvm@gmail.com
push date2014-10-24 20:40 +0000
treeherdermozilla-beta@184b704568ff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, lmandel
bugs1078262
milestone34.0
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
@@ -685,29 +685,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;
   }
 
   void 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);
   }
 
   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
@@ -1828,8 +1828,9 @@ pref(browser.display.use_document_fonts,
 == 1049499-1.html 1049499-1-ref.html
 == 1050788-1.html about:blank
 == 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
+== 1078262-1.html about:blank