[whatwg] Proposal to remove a paragraph from canvas spec

Robert O'Callahan robert at ocallahan.org
Tue May 3 20:49:15 PDT 2011


On Wed, May 4, 2011 at 2:08 PM, Matthew Delaney <mdelaney at apple.com> wrote:

> Since:
> 1) This behavior is obviously not ideal (see the linked animation above)
> and is really just a bug
>

See the thread "<canvas> shadow compositing oddities" from July 2008. In
that thread, Eric Butler points out that always drawing shadows has problems
with operators other than dest-atop. For example, with source-in, always
drawing a fully transparent shadow would mean that source-in acts just like
clear!

So as well as being compatible with CG, this behavior was thought to be
desirable because it provides a simple way for shadows to be completely
disabled by default, without requiring authors having to explicitly enable
shadows.

So here are some options:
1) leave the spec as-is
2) introduce explicit API to enable/disable shadows (would break a lot of
Web content at this point, probably not realistic)
3) remove the no-shadow special case, as you suggest (breaks some operators,
probably not a good idea)
4) remove the no-shadow special case, but add a special case to not draw
shadows for operators other than source-over

I think I prefer #4. I have yet to hear of any use-case that needs shadows
with an operator other than source-over, and it would probably simplify the
spec and implementations a little bit.

Rob
-- 
"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]



More information about the whatwg mailing list