Backed out changeset 7ab2fdaadd1a (bug 1078337) for crashes and reftest failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Sun, 12 Oct 2014 20:39:44 -0400
changeset 210050 f547cf19d10415162339116376904b94241874ca
parent 210049 43f4a2c51d8aafb71fef6f90dc40532319219e17
child 210051 c033be95eb1f218b60182b9613c905b3f46a6450
child 210077 3577deeda15644cc343ccbd4c5b13dd0b7ba008c
child 210085 9073de653345e909e885fb83f2146ca524f16380
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs1078337
milestone35.0a1
backs out7ab2fdaadd1a2bbd368ac961c98d786cf4ac084d
Backed out changeset 7ab2fdaadd1a (bug 1078337) for crashes and reftest failures.
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -5328,23 +5328,25 @@ nsLayoutUtils::DrawSingleImage(nsRenderi
     image = ImageOps::Clip(aImage, subRect);
   } else {
     nscoord appUnitsPerCSSPixel = nsDeviceContext::AppUnitsPerCSSPixel();
     source.SizeTo(imageSize.width*appUnitsPerCSSPixel,
                   imageSize.height*appUnitsPerCSSPixel);
     image = aImage;
   }
 
+  nsRect dest = nsLayoutUtils::GetWholeImageDestination(imageSize, source,
+                                                        aDest);
   // Ensure that only a single image tile is drawn. If aSourceArea extends
   // outside the image bounds, we want to honor the aSourceArea-to-aDest
   // transform but we don't want to actually tile the image.
   nsRect fill;
-  fill.IntersectRect(aDest, aDest);
-  return DrawImageInternal(aRenderingContext, aPresContext, image,
-                           aGraphicsFilter, aDest, fill, fill.TopLeft(),
+  fill.IntersectRect(aDest, dest);
+  return DrawImageInternal(aRenderingContext, aPresContext, aImage,
+                           aGraphicsFilter, dest, fill, fill.TopLeft(),
                            aDirty, aSVGContext, aImageFlags);
 }
 
 /* static */ void
 nsLayoutUtils::ComputeSizeForDrawing(imgIContainer *aImage,
                                      nsIntSize&     aImageSize, /*outparam*/
                                      nsSize&        aIntrinsicRatio, /*outparam*/
                                      bool&          aGotWidth,  /*outparam*/