From 433d08b80a88d4a8e7d10b6f22982fc67e67ef13 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Tue, 7 Sep 2010 15:20:34 -0700 Subject: [PATCH] Don't throw away the subpixel part of the border-radius. (Bug 459144, patch 4) r=roc a2.0=blocking:beta6+ --- layout/base/nsCSSRendering.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index 8d8b3eb85a1c..7fb27f3d2773 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -485,12 +485,12 @@ ComputePixelRadii(const nscoord *aTwipsRadii, gfxFloat radii[8]; NS_FOR_CSS_HALF_CORNERS(corner) - radii[corner] = twipsRadii[corner] / twipsPerPixel; + radii[corner] = gfxFloat(twipsRadii[corner]) / twipsPerPixel; // css3-background specifies this algorithm for reducing // corner radii when they are too big. - gfxFloat maxWidth = outerRect.width / twipsPerPixel; - gfxFloat maxHeight = outerRect.height / twipsPerPixel; + gfxFloat maxWidth = gfxFloat(outerRect.width) / twipsPerPixel; + gfxFloat maxHeight = gfxFloat(outerRect.height) / twipsPerPixel; gfxFloat f = 1.0f; NS_FOR_CSS_SIDES(side) { PRUint32 hc1 = NS_SIDE_TO_HALF_CORNER(side, PR_FALSE, PR_TRUE);