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 @@ +
Hello
diff --git a/layout/reftests/box-shadow/boxshadow-rounding.html b/layout/reftests/box-shadow/boxshadow-rounding.html new file mode 100644 index 00000000000..4325163d936 --- /dev/null +++ b/layout/reftests/box-shadow/boxshadow-rounding.html @@ -0,0 +1 @@ +
Hello
diff --git a/layout/reftests/box-shadow/reftest.list b/layout/reftests/box-shadow/reftest.list index e486887dc28..bcb978fe69a 100644 --- a/layout/reftests/box-shadow/reftest.list +++ b/layout/reftests/box-shadow/reftest.list @@ -5,3 +5,4 @@ == tableboxshadow-basic.html tableboxshadow-basic-ref.html == tableboxshadow-trshadow.html tableboxshadow-trshadow-ref.html == tableboxshadow-tdshadow.html tableboxshadow-tdshadow-ref.html +== boxshadow-rounding.html boxshadow-rounding-ref.html