W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2011

[whatwg] Proposal to remove a paragraph from canvas spec

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 4 May 2011 15:49:15 +1200
Message-ID: <BANLkTi=RBptXVV-RQ5dAHpq0ZzXR+Ttv_Q@mail.gmail.com>
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]
Received on Tuesday, 3 May 2011 20:49:15 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:32 UTC