Add constructor according to spec: https://www.w3.org/TR/webaudio/#audioprocessingevent
Created attachment 406123 [details] Patch
Comment on attachment 406123 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=406123&action=review > Source/WebCore/Modules/webaudio/AudioProcessingEvent.cpp:56 > + : Event(eventType, CanBubble::Yes, IsCancelable::No) You need to be calling this other Event constructor: Event(eventType, eventInitDict, IsTrusted::No) AudioProcessingEventInit subclasses EventInit which allows the client to set bubbles / cancelable to something else. Note that this indicates you don't have enough test coverage, please add a test. > Source/WebCore/Modules/webaudio/AudioProcessingEvent.h:46 > static Ref<AudioProcessingEvent> createForBindings() I don't think we need this one. > Source/WebCore/Modules/webaudio/AudioProcessingEvent.h:60 > AudioProcessingEvent(); I don't think we need this constructor. > Source/WebCore/Modules/webaudio/AudioProcessingEvent.idl:30 > readonly attribute unrestricted double playbackTime; You can remove unrestricted.
Created attachment 406297 [details] Patch
Comment on attachment 406297 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=406297&action=review > LayoutTests/webaudio/audioprocessingevent-constructor.html:10 > +shouldThrowErrorName("event = new AudioProcessingEvent('foo', { renderedBuffer: null });", "TypeError"); renderedBuffer is not part of your dictionary. Please add more checks for cases that are supposed to throw. For example: - playbackTime is missing (but other members are present) - inputBuffer is missing (but other members are present) - outputBuffer is missing (but other members are present) - inputBuffer/outputBuffer is null - inputBuffer/outputBuffer has wrong type > LayoutTests/webaudio/audioprocessingevent-constructor.html:19 > +shouldBeFalse("event.composed"); Please add shouldBeFalse("event.isTrusted");
Created attachment 406307 [details] Patch
(In reply to Chris Dumez from comment #4) > Comment on attachment 406297 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=406297&action=review > > > LayoutTests/webaudio/audioprocessingevent-constructor.html:10 > > +shouldThrowErrorName("event = new AudioProcessingEvent('foo', { renderedBuffer: null });", "TypeError"); > > renderedBuffer is not part of your dictionary. Please add more checks for > cases that are supposed to throw. For example: > - playbackTime is missing (but other members are present) > - inputBuffer is missing (but other members are present) > - outputBuffer is missing (but other members are present) > - inputBuffer/outputBuffer is null > - inputBuffer/outputBuffer has wrong type > > > LayoutTests/webaudio/audioprocessingevent-constructor.html:19 > > +shouldBeFalse("event.composed"); > > Please add shouldBeFalse("event.isTrusted"); Added these test cases, thanks.
Looks like your patch failed to apply.
Created attachment 406308 [details] Patch
(In reply to Chris Dumez from comment #7) > Looks like your patch failed to apply. Just rebased, hopefully works now.
Committed r265443: <https://trac.webkit.org/changeset/265443> All reviewed patches have been landed. Closing bug and clearing flags on attachment 406308 [details].
<rdar://problem/66794462>