Backout Bug 691646 for causing reftest failures on Linux
authorRobert Longson <longsonr@gmail.com>
Tue, 04 Oct 2011 11:00:32 +0100
changeset 78727 8dac1be4c4c1566320b4de994512aa502bd951e0
parent 78726 9c7b5bdb4f04139e0913b22183ef13e0884cd327
child 78728 6ec6521b81046c2b25177b8677ded29be833e418
push id506
push userclegnitto@mozilla.com
push dateWed, 09 Nov 2011 02:03:18 +0000
treeherdermozilla-aurora@63587fc7bb93 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs691646
milestone10.0a1
Backout Bug 691646 for causing reftest failures on Linux
layout/reftests/svg/pattern-scale-01-ref.svg
layout/reftests/svg/pattern-scale-01.svg
layout/reftests/svg/reftest.list
layout/svg/base/src/nsSVGPatternFrame.cpp
deleted file mode 100644
--- a/layout/reftests/svg/pattern-scale-01-ref.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<svg xmlns="http://www.w3.org/2000/svg">
-  <circle cx="100" cy="100" r="100" fill="lime"/>
-</svg>
deleted file mode 100644
--- a/layout/reftests/svg/pattern-scale-01.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<svg xmlns="http://www.w3.org/2000/svg">
-  <defs>
-    <pattern id="pattern" width="5" height="5" patternUnits="userSpaceOnUse" patternTransform="scale(-40)">
-      <circle cx="2.5" cy="2.5" r="2.5" fill="lime" />
-    </pattern>
-  </defs>
-  <rect width="200" height="200" fill="url(#pattern)"/>
-</svg>
--- a/layout/reftests/svg/reftest.list
+++ b/layout/reftests/svg/reftest.list
@@ -171,17 +171,16 @@ fails-if(Android&&layersOpenGL) == outer
 fails-if(Android&&layersOpenGL) == path-04.svg pass.svg
 == path-05.svg pass.svg
 == pathLength-01.svg pass.svg
 == pathLength-02.svg pass.svg
 == pattern-invalid-01.svg pattern-invalid-01-ref.svg
 == pattern-live-01a.svg pattern-live-01-ref.svg
 == pattern-live-01b.svg pattern-live-01-ref.svg
 == pattern-live-01c.svg pattern-live-01-ref.svg
-== pattern-scale-01.svg pattern-scale-01-ref.svg
 == pattern-transform-presence-01.svg pattern-transform-presence-01-ref.svg
 == polygon-marker-01.svg pass.svg
 == polygon-points-negative-01.svg pass.svg
 == polyline-points-invalid-01.svg pass.svg
 == pseudo-classes-01.svg pass.svg
 # This test depends on :visited styles (which are asynchronous), so we run
 # it in layout/style/test/test_visited_reftests.html instead of using the
 # reftest harness.
--- a/layout/svg/base/src/nsSVGPatternFrame.cpp
+++ b/layout/svg/base/src/nsSVGPatternFrame.cpp
@@ -256,20 +256,18 @@ nsSVGPatternFrame::PaintPattern(gfxASurf
 
   // Now that we have all of the necessary geometries, we can
   // create our surface.
   float patternWidth = bbox.Width();
   float patternHeight = bbox.Height();
 
   bool resultOverflows;
   gfxIntSize surfaceSize =
-    nsSVGUtils::ConvertToSurfaceSize(
-      gfxSize(patternWidth * fabs(patternMatrix->xx),
-              patternHeight * fabs(patternMatrix->yy)),
-      &resultOverflows);
+    nsSVGUtils::ConvertToSurfaceSize(gfxSize(patternWidth, patternHeight),
+                                     &resultOverflows);
 
   // 0 disables rendering, < 0 is an error
   if (surfaceSize.width <= 0 || surfaceSize.height <= 0)
     return NS_ERROR_FAILURE;
 
   if (resultOverflows ||
       patternWidth != surfaceSize.width ||
       patternHeight != surfaceSize.height) {