Bug 1315353 - Part1. Fix the wrong image size of border-image-repeat while the content is SVG. r=dbaron. a=ritu
authorEthan Lin <ethlin@mozilla.com>
Mon, 14 Nov 2016 11:41:32 +0800
changeset 350937 539929d75bed01a844f4f59b0052e2db08af2fa8
parent 350936 af3acfc3c88bb3d5786a392fadf3d88f6ecc6231
child 350940 623b0925399476b55fbe2d6135eaf62d17679414
push id1291
push userkwierso@gmail.com
push dateTue, 29 Nov 2016 21:54:10 +0000
treeherdermozilla-release@539929d75bed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron, ritu
bugs1315353
milestone50.1.0
Bug 1315353 - Part1. Fix the wrong image size of border-image-repeat while the content is SVG. r=dbaron. a=ritu
layout/base/nsCSSRendering.cpp
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -5759,18 +5759,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);
   }