Remove canvas shadow quirk that was recently removed from the spec. (Bug 600428) r=roc a2.0=blocking2.0:beta8

This commit is contained in:
L. David Baron 2010-10-09 09:34:58 -07:00
parent f5e65555c1
commit f3487dd947

View File

@ -1907,7 +1907,7 @@ nsCanvasRenderingContext2D::GetShadowColor(nsAString& color)
return NS_OK;
}
static const gfxFloat SIGMA_MAX = 25;
static const gfxFloat SIGMA_MAX = 100;
gfxContext*
nsCanvasRenderingContext2D::ShadowInitialize(const gfxRect& extents, gfxAlphaBoxBlur& blur)
@ -1915,7 +1915,7 @@ nsCanvasRenderingContext2D::ShadowInitialize(const gfxRect& extents, gfxAlphaBox
gfxIntSize blurRadius;
float shadowBlur = CurrentState().shadowBlur;
gfxFloat sigma = shadowBlur > 8 ? sqrt(shadowBlur * 2) : (shadowBlur / 2);
gfxFloat sigma = shadowBlur / 2;
// limit to avoid overly huge temp images
if (sigma > SIGMA_MAX)
sigma = SIGMA_MAX;