diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index 85a84f731d3..741b9428768 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -1077,6 +1077,7 @@ nsCSSRendering::PaintBoxShadow(nsPresContext* aPresContext, twipsPerPixel, &borderRadii); gfxRect frameGfxRect = RectToGfxRect(frameRect, twipsPerPixel); + frameGfxRect.Round(); gfxRect dirtyGfxRect = RectToGfxRect(aDirtyRect, twipsPerPixel); for (PRUint32 i = styleBorder->mBoxShadow->Length(); i > 0; --i) { @@ -1087,7 +1088,7 @@ nsCSSRendering::PaintBoxShadow(nsPresContext* aPresContext, gfxRect shadowRectPlusBlur = shadowRect; shadowRect.ScaleInverse(twipsPerPixel); - shadowRect.RoundOut(); + shadowRect.Round(); // shadowRect won't include the blur, so make an extra rect here that includes the blur // for use in the even-odd rule below. diff --git a/layout/reftests/box-shadow/boxshadow-rounding-ref.html b/layout/reftests/box-shadow/boxshadow-rounding-ref.html new file mode 100644 index 00000000000..1a56d17ae30 --- /dev/null +++ b/layout/reftests/box-shadow/boxshadow-rounding-ref.html @@ -0,0 +1 @@ +