W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2013

Re: [whatwg] proposal: Add support for masking to canvas

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 30 Jan 2013 07:28:50 +0000 (UTC)
To: Boris Zbarsky <bzbarsky@MIT.EDU>
Message-ID: <Pine.LNX.4.64.1301300725150.6293@ps20323.dreamhostps.com>
Cc: Cameron McCormack <cam@mcc.id.au>, WHATWG <whatwg@lists.whatwg.org>
On Wed, 30 Jan 2013, Boris Zbarsky wrote:
> On 1/30/13 12:55 AM, Rik Cabanier wrote:
> >        void maskImage(optional MaskOptions options);
> > 
> > Why is it optional?
> 
> Because http://dev.w3.org/2006/webapi/WebIDL/#idl-operations says (if you
> scroll down a ways):
> 
>   If the type of an argument is a dictionary type or a union type that
>   has a dictionary type as one of its flattened member types, and this
>   argument is either the final argument or is followed by an optional
>   argument, then the argument MUST be specified as optional.  Such
>   arguments are always considered to have a default value of an empty
>   dictionary, unless otherwise specified.

That's weird. heycam, can you elaborate on this? The addHitRegion() case 
in particular never makes sense to be called without a dictionary 
containing at least one member. Do we have to allow it?

(The webidl checker doesn't seem to catch this particular bug, by the way.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 30 January 2013 07:29:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:12 GMT