Use overload methods to implement [Optional] parameters in AudioNode.idl
Created attachment 120826 [details] Patch
Comment on attachment 120826 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120826&action=review Looks great! Thanks. > Source/WebCore/webaudio/AudioNode.h:122 > + void connect(AudioNode*, ExceptionCode&); > + void connect(AudioNode*, unsigned outputIndex, ExceptionCode&); > + void connect(AudioNode*, unsigned outputIndex, unsigned inputIndex, ExceptionCode&); > + void disconnect(ExceptionCode&); > + void disconnect(unsigned outputIndex, ExceptionCode&); You can use [Optional=CallWithDefaultValue] if you don't want to create all these symbols.
(In reply to comment #2) > > > Source/WebCore/webaudio/AudioNode.h:122 > > + void connect(AudioNode*, ExceptionCode&); > > + void connect(AudioNode*, unsigned outputIndex, ExceptionCode&); > > + void connect(AudioNode*, unsigned outputIndex, unsigned inputIndex, ExceptionCode&); > > + void disconnect(ExceptionCode&); > > + void disconnect(unsigned outputIndex, ExceptionCode&); > > You can use [Optional=CallWithDefaultValue] if you don't want to create all these symbols. Oh,really! That's great, I will update the patch
Comment on attachment 120826 [details] Patch Attachment 120826 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10954356 New failing tests: webaudio/mediaelementaudiosourcenode.html webaudio/audionode.html
(In reply to comment #4) > (From update of attachment 120826 [details]) > Attachment 120826 [details] did not pass chromium-ews (chromium-xvfb): > Output: http://queues.webkit.org/results/10954356 > > New failing tests: > webaudio/mediaelementaudiosourcenode.html > webaudio/audionode.html hmm, it seems that the connect function can take a 0 for destination, so that disconnect will utilize it. While it won't take a 0 for destination from JS space as the test page try to verify. But the Web Audio Spec don't specify that destination node should not be 0. But anyway, to try to find a solution for this...
Created attachment 120839 [details] Patch
Failed to set up Layout test env locally ( can not link the DumpRenderTree on my ubuntu 11.10 ...). But managed to load all the LayoutTest/webaudio/ test pages manually. It seems the test been passed. While I also observe that, some test page will pass and fail randomly from time to time ( not related to connect, mainly pages related to offline context creation, and failed at the point of create context, if one fails, all the other similar pages fail. If one success, all the others success too) either with or without this patch. Strange. Maybe it's my local env's issue?
> Strange. Maybe it's my local env's issue? Not sure. I don't know much about web audio.
Comment on attachment 120839 [details] Patch Clearing flags on attachment: 120839 Committed r103882: <http://trac.webkit.org/changeset/103882>
All reviewed patches have been landed. Closing bug.