Bug 501627. Take out unncessary and harmful surface size check. r=jrmuizelaar
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 10 Nov 2009 14:00:36 +1300
changeset 34709 54adec75b3ef732fd6995780085766e57f44d86d
parent 34708 ac60820aa423fd6244ce1c1f38644182a118dcbb
child 34710 4f811113ea1467d04c74f8306960fc496ea2a15a
push id10197
push userrocallahan@mozilla.com
push dateTue, 10 Nov 2009 01:01:23 +0000
treeherdermozilla-central@ce753b634dd1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizelaar
bugs501627
milestone1.9.3a1pre
Bug 501627. Take out unncessary and harmful surface size check. r=jrmuizelaar
layout/reftests/bugs/501627-1-ref.html
layout/reftests/bugs/501627-1.html
layout/reftests/bugs/reftest.list
modules/libpr0n/src/imgFrame.cpp
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/501627-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="2">
+<body style="overflow:hidden"
+background="data:image/gif;base64,R0lGODlhEgASALMAANbv9////8bp9LXi8aTc7pPV6////////////////////////////////////////ywAAAAAEgASAAAEIlCASaul8uo6tgfdpxHiWF7FaaVqe2YqfIYqfZItrrK7K0YAOw==">
+<div style="height: 2000px;"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/501627-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="2">
+<body style="overflow:hidden"
+background="data:image/gif;base64,R0lGODlhEgASALMAANbv9////8bp9LXi8aTc7pPV6////////////////////////////////////////ywAAAAAEgASAAAEIlCASaul8uo6tgfdpxHiWF7FaaVqe2YqfIYqfZItrrK7K0YAOw==">
+<div style="height: 100000px;"></div>
+</body>
+</html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1295,16 +1295,17 @@ fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") ==
 == 495385-3.html 495385-3-ref.html
 == 495385-4.html 495385-4-ref.html
 == 495385-5.html 495385-5-ref.html
 == 498228-1.xul 498228-1-ref.xul
 == 496032-1.html 496032-1-ref.html
 == 501257-1a.html 501257-1-ref.html
 == 501257-1b.html 501257-1-ref.html
 == 501257-1.xhtml 501257-1-ref.xhtml
+== 501627-1.html 501627-1-ref.html
 == 502288-1.html 502288-1-ref.html
 == 502942-1.html 502942-1-ref.html
 == 502447-1.html 502447-1-ref.html
 == 502795-1.html 502795-1-ref.html
 == 503364-1a.html 503364-1-ref.html
 == 503364-1b.html 503364-1-ref.html
 == 504032-1.html 504032-1-ref.html
 == 505743-1.html about:blank
--- a/modules/libpr0n/src/imgFrame.cpp
+++ b/modules/libpr0n/src/imgFrame.cpp
@@ -459,21 +459,16 @@ void imgFrame::Draw(gfxContext *aContext
   } else {
     NS_ASSERTION(!mSinglePixel, "This should already have been handled");
     surface = ThebesSurface();
     format = mFormat;
   }
   // At this point, we've taken care of mSinglePixel images, images with
   // aPadding, and partially-decoded images.
 
-  if (!AllowedImageSize(fill.size.width + 1, fill.size.height + 1)) {
-    NS_WARNING("Destination area too large, bailing out");
-    return;
-  }
-
   // Compute device-space-to-image-space transform. We need to sanity-
   // check it to work around a pixman bug :-(
   // XXX should we only do this for certain surface types?
   gfxFloat deviceX, deviceY;
   nsRefPtr<gfxASurface> currentTarget =
     aContext->CurrentSurface(&deviceX, &deviceY);
   gfxMatrix currentMatrix = aContext->CurrentMatrix();
   gfxMatrix deviceToUser = currentMatrix;