Bug 157017

Summary: [Web IDL] Specify default values for optional parameters of TypedArray types
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Severity: Normal CC: commit-queue, darin, sam, youennf
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch none

Description Chris Dumez 2016-04-25 20:01:28 PDT
Specify default values for optional parameters of TypedArray types and let the bindings generator use WTF::Optional<> for the ones that do not have a default value.
Comment 1 Chris Dumez 2016-04-25 20:40:50 PDT
Created attachment 277320 [details]
Comment 2 Darin Adler 2016-04-26 08:21:03 PDT
Comment on attachment 277320 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=277320&action=review

> Source/WebCore/html/HTMLMediaElement.idl:102
> +    [Conditional=ENCRYPTED_MEDIA, RaisesException] void webkitGenerateKeyRequest(DOMString? keySystem, optional Uint8Array initData = null);
> +    [Conditional=ENCRYPTED_MEDIA, RaisesException] void webkitAddKey(DOMString? keySystem, Uint8Array key, optional Uint8Array initData = null, optional DOMString sessionId = null);

This seems a little peculiar. Given that the argument isn’t nullable, I’m not entirely sure that a default of “null” makes logical sense. Anyway, seems a fine practical way to leave the code for now.
Comment 3 WebKit Commit Bot 2016-04-26 09:11:53 PDT
Comment on attachment 277320 [details]

Clearing flags on attachment: 277320

Committed r200088: <http://trac.webkit.org/changeset/200088>
Comment 4 WebKit Commit Bot 2016-04-26 09:11:57 PDT
All reviewed patches have been landed.  Closing bug.