Bug 1315353 - Part1. Fix the wrong image size of border-image-repeat while the content is SVG. r=dbaron. a=gchang
authorEthan Lin <ethlin@mozilla.com>
Mon, 14 Nov 2016 11:41:32 +0800
changeset 439958 1f41acac2aa680a42c0dc85062a0c0ff70c9b80f
parent 439957 4e97dee28c6941a78f5ec342fbe95ce5e6a012b1
child 439959 36f945043957d096b5085599dc65c3c91866f067
push id36143
push userjkingston@mozilla.com
push dateWed, 16 Nov 2016 22:20:38 +0000
reviewersdbaron, gchang
bugs1315353
milestone51.0a2
Bug 1315353 - Part1. Fix the wrong image size of border-image-repeat while the content is SVG. r=dbaron. a=gchang
layout/base/nsCSSRendering.cpp
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -5761,18 +5761,17 @@ nsImageRenderer::DrawBorderImageComponen
                                             aFill, aDirtyRect,
                                             nullptr,
                                             drawFlags);
     }
 
     nsSize repeatSize;
     nsRect fillRect(aFill);
     nsRect tile = ComputeTile(fillRect, aHFill, aVFill, aUnitSize, repeatSize);
-    CSSIntSize imageSize(nsPresContext::AppUnitsToIntCSSPixels(srcRect.width),
-                         nsPresContext::AppUnitsToIntCSSPixels(srcRect.height));
+    CSSIntSize imageSize(srcRect.width, srcRect.height);
     return nsLayoutUtils::DrawBackgroundImage(*aRenderingContext.ThebesContext(),
                                               aPresContext,
                                               subImage, imageSize, samplingFilter,
                                               tile, fillRect, repeatSize,
                                               tile.TopLeft(), aDirtyRect,
                                               drawFlags,
                                               ExtendMode::CLAMP);
   }