mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
7b82035873
commit
2d49b62ed7
@ -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.
|
||||
|
1
layout/reftests/box-shadow/boxshadow-rounding-ref.html
Normal file
1
layout/reftests/box-shadow/boxshadow-rounding-ref.html
Normal file
@ -0,0 +1 @@
|
||||
<div style="width: 100px; height: 200px; -moz-box-shadow: 3px 3px 2px black; background-color: green;">Hello</div>
|
1
layout/reftests/box-shadow/boxshadow-rounding.html
Normal file
1
layout/reftests/box-shadow/boxshadow-rounding.html
Normal file
@ -0,0 +1 @@
|
||||
<div style="width: 100.2px; height: 200.2px; -moz-box-shadow: 3px 3px 2px black; background-color: green;">Hello</div>
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user