Bug 445741. Round rects consistently to avoid a gap between an element and its shadow. r+sr=roc

--HG--
extra : rebase_source : dbb4ae33812db8167650dcc218f0bd4a3e0f3dc2
This commit is contained in:
Michael Ventnor 2009-01-05 13:41:01 +13:00
parent 7b82035873
commit 2d49b62ed7
4 changed files with 5 additions and 1 deletions

View File

@ -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.

View File

@ -0,0 +1 @@
<div style="width: 100px; height: 200px; -moz-box-shadow: 3px 3px 2px black; background-color: green;">Hello</div>

View File

@ -0,0 +1 @@
<div style="width: 100.2px; height: 200.2px; -moz-box-shadow: 3px 3px 2px black; background-color: green;">Hello</div>

View File

@ -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