Bug 15265 - Canvas shadows not rendered unless shadowBlur/OffsetX/OffsetY set
Summary: Canvas shadows not rendered unless shadowBlur/OffsetX/OffsetY set
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows Server 2003
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-23 14:53 PDT by Philip Taylor
Modified: 2010-08-21 05:39 PDT (History)
1 user (show)

See Also:


Attachments
test case (425 bytes, text/html)
2007-09-23 14:56 PDT, Philip Taylor
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Taylor 2007-09-23 14:53:26 PDT
When shadowColor is set to some colour and a shape is rendered, the shadow is not drawn iff shadowBlur = shadowOffsetX = shadowOffsetY = 0.
Comment 1 Philip Taylor 2007-09-23 14:56:25 PDT
Created attachment 16363 [details]
test case

This should draw the shadow first, then draw the rectangle on top, with the XOR compositing resulting in a transparent canvas.

If you set shadowBlur or shadowOffset{X,Y} before drawing the shadow, then it works as expected.
Comment 2 Eric Seidel (no email) 2008-09-30 20:30:58 PDT
What does the HTML5 spec say about this?
Comment 3 Andreas Kling 2010-08-21 05:39:12 PDT
Quoth HTML5:

"Shadows are only drawn if the opacity component of the alpha component of the color of shadowColor is non-zero and either the shadowBlur is non-zero, or the shadowOffsetX is non-zero, or the shadowOffsetY is non-zero."

http://www.whatwg.org/specs/web-apps/current-work/#shadows