Title: [265443] trunk
Revision
265443
Author
[email protected]
Date
2020-08-10 12:39:26 -0700 (Mon, 10 Aug 2020)

Log Message

Add AudioProcessingEvent Constructor
https://bugs.webkit.org/show_bug.cgi?id=215237

Patch by Clark Wang <[email protected]> on 2020-08-10
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Re-baselined existing tests that now pass.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam-expected.txt:

Source/WebCore:

Added constructor according to spec: https://bugs.webkit.org/show_bug.cgi?id=215237.
Added in AudioProcessingEventInit files.

Test: webaudio/audioprocessingevent-constructor.html

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webaudio/AudioProcessingEvent.cpp:
(WebCore::AudioProcessingEvent::create):
(WebCore::AudioProcessingEvent::AudioProcessingEvent):
* Modules/webaudio/AudioProcessingEvent.h:
* Modules/webaudio/AudioProcessingEvent.idl:
* Modules/webaudio/AudioProcessingEventInit.h: Added.
* Modules/webaudio/AudioProcessingEventInit.idl: Added.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Added new file to test AudioProcessingEvent constructor.

* webaudio/audioprocessingevent-constructor-expected.txt: Added.
* webaudio/audioprocessingevent-constructor.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (265442 => 265443)


--- trunk/LayoutTests/ChangeLog	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/LayoutTests/ChangeLog	2020-08-10 19:39:26 UTC (rev 265443)
@@ -1,3 +1,15 @@
+2020-08-10  Clark Wang  <[email protected]>
+
+        Add AudioProcessingEvent Constructor
+        https://bugs.webkit.org/show_bug.cgi?id=215237
+
+        Reviewed by Chris Dumez.
+
+        Added new file to test AudioProcessingEvent constructor.
+
+        * webaudio/audioprocessingevent-constructor-expected.txt: Added.
+        * webaudio/audioprocessingevent-constructor.html: Added.
+
 2020-08-10  Wenson Hsieh  <[email protected]>
 
         Add more logging to diagnose editing/selection/ios/select-all-non-editable-text-using-keyboard.html

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (265442 => 265443)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-08-10 19:39:26 UTC (rev 265443)
@@ -1,3 +1,15 @@
+2020-08-10  Clark Wang  <[email protected]>
+
+        Add AudioProcessingEvent Constructor
+        https://bugs.webkit.org/show_bug.cgi?id=215237
+
+        Reviewed by Chris Dumez.
+
+        Re-baselined existing tests that now pass.
+
+        * web-platform-tests/webaudio/idlharness.https.window-expected.txt:
+        * web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam-expected.txt:
+
 2020-08-10  Chris Dumez  <[email protected]>
 
         Align existing AudioParam API with the specification

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/idlharness.https.window-expected.txt (265442 => 265443)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/idlharness.https.window-expected.txt	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/idlharness.https.window-expected.txt	2020-08-10 19:39:26 UTC (rev 265443)
@@ -433,7 +433,7 @@
 PASS AudioListener interface: context.listener must inherit property "setOrientation(float, float, float, float, float, float)" with the proper type 
 PASS AudioListener interface: calling setOrientation(float, float, float, float, float, float) on context.listener with too few arguments must throw TypeError 
 PASS AudioProcessingEvent interface: existence and properties of interface object 
-FAIL AudioProcessingEvent interface object length assert_equals: wrong value for AudioProcessingEvent.length expected 2 but got 0
+PASS AudioProcessingEvent interface object length 
 PASS AudioProcessingEvent interface object name 
 PASS AudioProcessingEvent interface: existence and properties of interface prototype object 
 PASS AudioProcessingEvent interface: existence and properties of interface prototype object's "constructor" property 
@@ -441,31 +441,21 @@
 PASS AudioProcessingEvent interface: attribute playbackTime 
 PASS AudioProcessingEvent interface: attribute inputBuffer 
 PASS AudioProcessingEvent interface: attribute outputBuffer 
-FAIL AudioProcessingEvent must be primary interface of new AudioProcessingEvent('', {
+PASS AudioProcessingEvent must be primary interface of new AudioProcessingEvent('', {
         playbackTime: 0, inputBuffer: buffer, outputBuffer: buffer
-      }) assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new AudioProcessingEvent('', {
+      }) 
+PASS Stringification of new AudioProcessingEvent('', {
         playbackTime: 0, inputBuffer: buffer, outputBuffer: buffer
-      })')"
-FAIL Stringification of new AudioProcessingEvent('', {
+      }) 
+PASS AudioProcessingEvent interface: new AudioProcessingEvent('', {
         playbackTime: 0, inputBuffer: buffer, outputBuffer: buffer
-      }) assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new AudioProcessingEvent('', {
+      }) must inherit property "playbackTime" with the proper type 
+PASS AudioProcessingEvent interface: new AudioProcessingEvent('', {
         playbackTime: 0, inputBuffer: buffer, outputBuffer: buffer
-      })')"
-FAIL AudioProcessingEvent interface: new AudioProcessingEvent('', {
+      }) must inherit property "inputBuffer" with the proper type 
+PASS AudioProcessingEvent interface: new AudioProcessingEvent('', {
         playbackTime: 0, inputBuffer: buffer, outputBuffer: buffer
-      }) must inherit property "playbackTime" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new AudioProcessingEvent('', {
-        playbackTime: 0, inputBuffer: buffer, outputBuffer: buffer
-      })')"
-FAIL AudioProcessingEvent interface: new AudioProcessingEvent('', {
-        playbackTime: 0, inputBuffer: buffer, outputBuffer: buffer
-      }) must inherit property "inputBuffer" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new AudioProcessingEvent('', {
-        playbackTime: 0, inputBuffer: buffer, outputBuffer: buffer
-      })')"
-FAIL AudioProcessingEvent interface: new AudioProcessingEvent('', {
-        playbackTime: 0, inputBuffer: buffer, outputBuffer: buffer
-      }) must inherit property "outputBuffer" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new AudioProcessingEvent('', {
-        playbackTime: 0, inputBuffer: buffer, outputBuffer: buffer
-      })')"
+      }) must inherit property "outputBuffer" with the proper type 
 PASS BiquadFilterNode interface: existence and properties of interface object 
 PASS BiquadFilterNode interface object length 
 PASS BiquadFilterNode interface object name 

Added: trunk/LayoutTests/webaudio/audioprocessingevent-constructor-expected.txt (0 => 265443)


--- trunk/LayoutTests/webaudio/audioprocessingevent-constructor-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/webaudio/audioprocessingevent-constructor-expected.txt	2020-08-10 19:39:26 UTC (rev 265443)
@@ -0,0 +1,34 @@
+Tests the AudioProcessingEvent constructor
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS event = new AudioProcessingEvent; threw exception TypeError: Not enough arguments.
+PASS event = new AudioProcessingEvent('foo'); threw exception TypeError: Not enough arguments.
+PASS iBuffer = context.createBuffer(3, 200, 47000); did not throw exception.
+PASS oBuffer = context.createBuffer(2, 100, 46000); did not throw exception.
+PASS wrongBuffer = context.createBufferSource(); did not throw exception.
+PASS event = new AudioProcessingEvent('foo', { inputBuffer: iBuffer, outputBuffer: oBuffer }); threw exception TypeError: Member AudioProcessingEventInit.playbackTime is required and must be an instance of double.
+PASS event = new AudioProcessingEvent('foo', { playbackTime: 5, inputBuffer: iBuffer }); threw exception TypeError: Member AudioProcessingEventInit.outputBuffer is required and must be an instance of AudioBuffer.
+PASS event = new AudioProcessingEvent('foo', { playbackTime: 5, outputBuffer: oBuffer }); threw exception TypeError: Member AudioProcessingEventInit.inputBuffer is required and must be an instance of AudioBuffer.
+PASS event = new AudioProcessingEvent('foo', { playbackTime: 5, inputBuffer: null, outputBuffer: oBuffer }); threw exception TypeError: Type error.
+PASS event = new AudioProcessingEvent('foo', { playbackTime: 5, inputBuffer: iBuffer, outputBuffer: null }); threw exception TypeError: Type error.
+PASS event = new AudioProcessingEvent('foo', { playbackTime: 5, inputBuffer: wrongBuffer, outputBuffer: oBuffer }); threw exception TypeError: Type error.
+PASS event = new AudioProcessingEvent('foo', { playbackTime: 5, inputBuffer: iBuffer, outputBuffer: wrongBuffer }); threw exception TypeError: Type error.
+PASS event = new AudioProcessingEvent('foo', { playbackTime: 5, inputBuffer: iBuffer, outputBuffer: oBuffer, bubbles: true }); did not throw exception.
+PASS event.type is "foo"
+PASS event.bubbles is true
+PASS event.cancelable is false
+PASS event.composed is false
+PASS event.isTrusted is false
+PASS event.playbackTime is 5
+PASS event.inputBuffer.length is iBuffer.length
+PASS event.inputBuffer.duration is iBuffer.duration
+PASS event.inputBuffer.sampleRate is iBuffer.sampleRate
+PASS event.outputBuffer.length is oBuffer.length
+PASS event.outputBuffer.duration is oBuffer.duration
+PASS event.outputBuffer.sampleRate is oBuffer.sampleRate
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/webaudio/audioprocessingevent-constructor.html (0 => 265443)


--- trunk/LayoutTests/webaudio/audioprocessingevent-constructor.html	                        (rev 0)
+++ trunk/LayoutTests/webaudio/audioprocessingevent-constructor.html	2020-08-10 19:39:26 UTC (rev 265443)
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script>
+description("Tests the AudioProcessingEvent constructor");
+
+shouldThrowErrorName("event = new AudioProcessingEvent;", "TypeError");
+shouldThrowErrorName("event = new AudioProcessingEvent('foo');", "TypeError");
+
+let context = new AudioContext;
+shouldNotThrow("iBuffer = context.createBuffer(3, 200, 47000);");
+shouldNotThrow("oBuffer = context.createBuffer(2, 100, 46000);");
+shouldNotThrow("wrongBuffer = context.createBufferSource();");
+
+shouldThrowErrorName("event = new AudioProcessingEvent('foo', { inputBuffer: iBuffer, outputBuffer: oBuffer });", "TypeError");
+shouldThrowErrorName("event = new AudioProcessingEvent('foo', { playbackTime: 5, inputBuffer: iBuffer });", "TypeError");
+shouldThrowErrorName("event = new AudioProcessingEvent('foo', { playbackTime: 5, outputBuffer: oBuffer });", "TypeError");
+shouldThrowErrorName("event = new AudioProcessingEvent('foo', { playbackTime: 5, inputBuffer: null, outputBuffer: oBuffer });", "TypeError");
+shouldThrowErrorName("event = new AudioProcessingEvent('foo', { playbackTime: 5, inputBuffer: iBuffer, outputBuffer: null });", "TypeError");
+shouldThrowErrorName("event = new AudioProcessingEvent('foo', { playbackTime: 5, inputBuffer: wrongBuffer, outputBuffer: oBuffer });", "TypeError");
+shouldThrowErrorName("event = new AudioProcessingEvent('foo', { playbackTime: 5, inputBuffer: iBuffer, outputBuffer: wrongBuffer });", "TypeError");
+
+shouldNotThrow("event = new AudioProcessingEvent('foo', { playbackTime: 5, inputBuffer: iBuffer, outputBuffer: oBuffer, bubbles: true });");
+shouldBeEqualToString("event.type", "foo");
+shouldBeTrue("event.bubbles");
+shouldBeFalse("event.cancelable");
+shouldBeFalse("event.composed");
+shouldBeFalse("event.isTrusted");
+shouldBe("event.playbackTime", "5");
+shouldBe("event.inputBuffer.length", "iBuffer.length");
+shouldBe("event.inputBuffer.duration", "iBuffer.duration");
+shouldBe("event.inputBuffer.sampleRate", "iBuffer.sampleRate");
+shouldBe("event.outputBuffer.length", "oBuffer.length");
+shouldBe("event.outputBuffer.duration", "oBuffer.duration");
+shouldBe("event.outputBuffer.sampleRate", "oBuffer.sampleRate");
+
+</script>
+</body>
+</html>

Modified: trunk/Source/WebCore/CMakeLists.txt (265442 => 265443)


--- trunk/Source/WebCore/CMakeLists.txt	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/Source/WebCore/CMakeLists.txt	2020-08-10 19:39:26 UTC (rev 265443)
@@ -462,6 +462,7 @@
     Modules/webaudio/AudioNodeOptions.idl
     Modules/webaudio/AudioParam.idl
     Modules/webaudio/AudioProcessingEvent.idl
+    Modules/webaudio/AudioProcessingEventInit.idl
     Modules/webaudio/AudioScheduledSourceNode.idl
     Modules/webaudio/BaseAudioContext.idl
     Modules/webaudio/BiquadFilterNode.idl

Modified: trunk/Source/WebCore/ChangeLog (265442 => 265443)


--- trunk/Source/WebCore/ChangeLog	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/Source/WebCore/ChangeLog	2020-08-10 19:39:26 UTC (rev 265443)
@@ -1,3 +1,29 @@
+2020-08-10  Clark Wang  <[email protected]>
+
+        Add AudioProcessingEvent Constructor
+        https://bugs.webkit.org/show_bug.cgi?id=215237
+
+        Reviewed by Chris Dumez.
+
+        Added constructor according to spec: https://bugs.webkit.org/show_bug.cgi?id=215237.
+        Added in AudioProcessingEventInit files.
+
+        Test: webaudio/audioprocessingevent-constructor.html
+
+        * CMakeLists.txt:
+        * DerivedSources-input.xcfilelist:
+        * DerivedSources-output.xcfilelist:
+        * DerivedSources.make:
+        * Modules/webaudio/AudioProcessingEvent.cpp:
+        (WebCore::AudioProcessingEvent::create):
+        (WebCore::AudioProcessingEvent::AudioProcessingEvent):
+        * Modules/webaudio/AudioProcessingEvent.h:
+        * Modules/webaudio/AudioProcessingEvent.idl:
+        * Modules/webaudio/AudioProcessingEventInit.h: Added.
+        * Modules/webaudio/AudioProcessingEventInit.idl: Added.
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+
 2020-08-10  Chris Dumez  <[email protected]>
 
         Align existing AudioParam API with the specification

Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (265442 => 265443)


--- trunk/Source/WebCore/DerivedSources-input.xcfilelist	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist	2020-08-10 19:39:26 UTC (rev 265443)
@@ -311,6 +311,7 @@
 $(PROJECT_DIR)/Modules/webaudio/AudioNodeOptions.idl
 $(PROJECT_DIR)/Modules/webaudio/AudioParam.idl
 $(PROJECT_DIR)/Modules/webaudio/AudioProcessingEvent.idl
+$(PROJECT_DIR)/Modules/webaudio/AudioProcessingEventInit.idl
 $(PROJECT_DIR)/Modules/webaudio/AudioScheduledSourceNode.idl
 $(PROJECT_DIR)/Modules/webaudio/BaseAudioContext.idl
 $(PROJECT_DIR)/Modules/webaudio/BiquadFilterNode.idl

Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (265442 => 265443)


--- trunk/Source/WebCore/DerivedSources-output.xcfilelist	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/Source/WebCore/DerivedSources-output.xcfilelist	2020-08-10 19:39:26 UTC (rev 265443)
@@ -179,6 +179,8 @@
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAudioParam.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAudioProcessingEvent.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAudioProcessingEvent.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAudioProcessingEventInit.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAudioProcessingEventInit.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAudioScheduledSourceNode.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAudioScheduledSourceNode.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAudioTrack.cpp

Modified: trunk/Source/WebCore/DerivedSources.make (265442 => 265443)


--- trunk/Source/WebCore/DerivedSources.make	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/Source/WebCore/DerivedSources.make	2020-08-10 19:39:26 UTC (rev 265443)
@@ -394,6 +394,7 @@
     $(WebCore)/Modules/webaudio/AudioNodeOptions.idl \
     $(WebCore)/Modules/webaudio/AudioParam.idl \
     $(WebCore)/Modules/webaudio/AudioProcessingEvent.idl \
+    $(WebCore)/Modules/webaudio/AudioProcessingEventInit.idl \
     $(WebCore)/Modules/webaudio/AudioScheduledSourceNode.idl \
     $(WebCore)/Modules/webaudio/BaseAudioContext.idl \
     $(WebCore)/Modules/webaudio/BiquadFilterNode.idl \

Modified: trunk/Source/WebCore/Modules/webaudio/AudioProcessingEvent.cpp (265442 => 265443)


--- trunk/Source/WebCore/Modules/webaudio/AudioProcessingEvent.cpp	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/Source/WebCore/Modules/webaudio/AudioProcessingEvent.cpp	2020-08-10 19:39:26 UTC (rev 265443)
@@ -29,6 +29,7 @@
 #include "AudioProcessingEvent.h"
 
 #include "AudioBuffer.h"
+#include "AudioProcessingEventInit.h"
 #include "EventNames.h"
 #include <wtf/IsoMallocInlines.h>
 
@@ -36,7 +37,12 @@
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(AudioProcessingEvent);
 
-AudioProcessingEvent::AudioProcessingEvent() = default;
+Ref<AudioProcessingEvent> AudioProcessingEvent::create(const AtomString& eventType, AudioProcessingEventInit&& eventInitDict)
+{
+    RELEASE_ASSERT(eventInitDict.inputBuffer);
+    RELEASE_ASSERT(eventInitDict.outputBuffer);
+    return adoptRef(*new AudioProcessingEvent(eventType, WTFMove(eventInitDict)));
+}
 
 AudioProcessingEvent::AudioProcessingEvent(RefPtr<AudioBuffer>&& inputBuffer, RefPtr<AudioBuffer>&& outputBuffer, double playbackTime)
     : Event(eventNames().audioprocessEvent, CanBubble::Yes, IsCancelable::No)
@@ -46,6 +52,14 @@
 {
 }
 
+AudioProcessingEvent::AudioProcessingEvent(const AtomString& eventType, AudioProcessingEventInit&& eventInitDict)
+    : Event(eventType, eventInitDict, IsTrusted::No)
+    , m_inputBuffer(eventInitDict.inputBuffer.releaseNonNull())
+    , m_outputBuffer(eventInitDict.outputBuffer.releaseNonNull())
+    , m_playbackTime(eventInitDict.playbackTime)
+{
+}
+
 AudioProcessingEvent::~AudioProcessingEvent() = default;
 
 EventInterface AudioProcessingEvent::eventInterface() const

Modified: trunk/Source/WebCore/Modules/webaudio/AudioProcessingEvent.h (265442 => 265443)


--- trunk/Source/WebCore/Modules/webaudio/AudioProcessingEvent.h	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/Source/WebCore/Modules/webaudio/AudioProcessingEvent.h	2020-08-10 19:39:26 UTC (rev 265443)
@@ -31,6 +31,7 @@
 namespace WebCore {
 
 class AudioBuffer;
+struct AudioProcessingEventInit;
     
 class AudioProcessingEvent final : public Event {
     WTF_MAKE_ISO_ALLOCATED(AudioProcessingEvent);
@@ -39,12 +40,9 @@
     {
         return adoptRef(*new AudioProcessingEvent(WTFMove(inputBuffer), WTFMove(outputBuffer), playbackTime));
     }
-
-    static Ref<AudioProcessingEvent> createForBindings()
-    {
-        return adoptRef(*new AudioProcessingEvent);
-    }
     
+    static Ref<AudioProcessingEvent> create(const AtomString&, AudioProcessingEventInit&&);
+    
     virtual ~AudioProcessingEvent();
 
     AudioBuffer* inputBuffer() { return m_inputBuffer.get(); }
@@ -54,8 +52,8 @@
     EventInterface eventInterface() const override;
 
 private:
-    AudioProcessingEvent();
     AudioProcessingEvent(RefPtr<AudioBuffer>&& inputBuffer, RefPtr<AudioBuffer>&& outputBuffer, double playbackTime);
+    AudioProcessingEvent(const AtomString&, AudioProcessingEventInit&&);
 
     RefPtr<AudioBuffer> m_inputBuffer;
     RefPtr<AudioBuffer> m_outputBuffer;

Modified: trunk/Source/WebCore/Modules/webaudio/AudioProcessingEvent.idl (265442 => 265443)


--- trunk/Source/WebCore/Modules/webaudio/AudioProcessingEvent.idl	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/Source/WebCore/Modules/webaudio/AudioProcessingEvent.idl	2020-08-10 19:39:26 UTC (rev 265443)
@@ -26,7 +26,8 @@
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject
 ] interface AudioProcessingEvent : Event {
-    readonly attribute unrestricted double playbackTime;
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (DOMString type, AudioProcessingEventInit eventInitDict);
+    readonly attribute double playbackTime;
     readonly attribute AudioBuffer inputBuffer;
     readonly attribute AudioBuffer outputBuffer; 
 };

Added: trunk/Source/WebCore/Modules/webaudio/AudioProcessingEventInit.h (0 => 265443)


--- trunk/Source/WebCore/Modules/webaudio/AudioProcessingEventInit.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/webaudio/AudioProcessingEventInit.h	2020-08-10 19:39:26 UTC (rev 265443)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "AudioBuffer.h"
+#include "EventInit.h"
+
+namespace WebCore {
+
+struct AudioProcessingEventInit : EventInit {
+    double playbackTime;
+    RefPtr<AudioBuffer> inputBuffer;
+    RefPtr<AudioBuffer> outputBuffer;
+};
+
+}

Added: trunk/Source/WebCore/Modules/webaudio/AudioProcessingEventInit.idl (0 => 265443)


--- trunk/Source/WebCore/Modules/webaudio/AudioProcessingEventInit.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/webaudio/AudioProcessingEventInit.idl	2020-08-10 19:39:26 UTC (rev 265443)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=WEB_AUDIO,
+] dictionary AudioProcessingEventInit : EventInit {
+    required double playbackTime;
+    required AudioBuffer inputBuffer;
+    required AudioBuffer outputBuffer;
+};

Modified: trunk/Source/WebCore/Sources.txt (265442 => 265443)


--- trunk/Source/WebCore/Sources.txt	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/Source/WebCore/Sources.txt	2020-08-10 19:39:26 UTC (rev 265443)
@@ -2644,6 +2644,7 @@
 JSAudioNodeOptions.cpp
 JSAudioParam.cpp
 JSAudioProcessingEvent.cpp
+JSAudioProcessingEventInit.cpp
 JSAudioScheduledSourceNode.cpp
 JSAudioTrack.cpp
 JSAudioTrackList.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (265442 => 265443)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-08-10 19:36:01 UTC (rev 265442)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-08-10 19:39:26 UTC (rev 265443)
@@ -5088,6 +5088,7 @@
 		E785D93424B636FF0014DB21 /* ChannelInterpretation.h in Headers */ = {isa = PBXBuildFile; fileRef = E785D93124B636FF0014DB21 /* ChannelInterpretation.h */; };
 		E785D96124B7F7350014DB21 /* AudioContextOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = E785D95F24B7F7340014DB21 /* AudioContextOptions.h */; };
 		E785D96224B7F7350014DB21 /* AudioContextLatencyCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = E785D96024B7F7340014DB21 /* AudioContextLatencyCategory.h */; };
+		E7C8E11B24DCABF30027A27F /* AudioProcessingEventInit.h in Headers */ = {isa = PBXBuildFile; fileRef = E7C8E11824DCABF30027A27F /* AudioProcessingEventInit.h */; };
 		E7CF84A924C6461C00B06B90 /* OfflineAudioContextOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = E7CF84A524C635F400B06B90 /* OfflineAudioContextOptions.h */; };
 		E7E0357224D4E196008DFEFB /* AnalyserOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = E7E0357124D4E191008DFEFB /* AnalyserOptions.h */; };
 		EBE5B226245A26EF003A5A88 /* SQLiteStatementAutoResetScope.h in Headers */ = {isa = PBXBuildFile; fileRef = EBE5B224245A26EE003A5A88 /* SQLiteStatementAutoResetScope.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -15931,6 +15932,8 @@
 		E785D95E24B7F7270014DB21 /* AudioContextLatencyCategory.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AudioContextLatencyCategory.idl; sourceTree = "<group>"; };
 		E785D95F24B7F7340014DB21 /* AudioContextOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioContextOptions.h; sourceTree = "<group>"; };
 		E785D96024B7F7340014DB21 /* AudioContextLatencyCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioContextLatencyCategory.h; sourceTree = "<group>"; };
+		E7C8E11824DCABF30027A27F /* AudioProcessingEventInit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioProcessingEventInit.h; sourceTree = "<group>"; };
+		E7C8E11A24DCABF30027A27F /* AudioProcessingEventInit.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AudioProcessingEventInit.idl; sourceTree = "<group>"; };
 		E7CF848924C0E05700B06B90 /* AudioScheduledSourceNode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AudioScheduledSourceNode.idl; sourceTree = "<group>"; };
 		E7CF84A524C635F400B06B90 /* OfflineAudioContextOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OfflineAudioContextOptions.h; sourceTree = "<group>"; };
 		E7CF84A724C635F400B06B90 /* OfflineAudioContextOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = OfflineAudioContextOptions.idl; sourceTree = "<group>"; };
@@ -29574,6 +29577,8 @@
 				FD315FD512B0267600C1A359 /* AudioProcessingEvent.cpp */,
 				FD315FD612B0267600C1A359 /* AudioProcessingEvent.h */,
 				FD315FD712B0267600C1A359 /* AudioProcessingEvent.idl */,
+				E7C8E11824DCABF30027A27F /* AudioProcessingEventInit.h */,
+				E7C8E11A24DCABF30027A27F /* AudioProcessingEventInit.idl */,
 				FD8C46E9154608E700A5910C /* AudioScheduledSourceNode.cpp */,
 				FD8C46EA154608E700A5910C /* AudioScheduledSourceNode.h */,
 				E7CF848924C0E05700B06B90 /* AudioScheduledSourceNode.idl */,
@@ -30140,6 +30145,7 @@
 				FD31601D12B0267600C1A359 /* AudioParam.h in Headers */,
 				FD359190138DB22000E1EBEC /* AudioParamTimeline.h in Headers */,
 				FD31602012B0267600C1A359 /* AudioProcessingEvent.h in Headers */,
+				E7C8E11B24DCABF30027A27F /* AudioProcessingEventInit.h in Headers */,
 				FD31608412B026F700C1A359 /* AudioProcessor.h in Headers */,
 				FD31608612B026F700C1A359 /* AudioResampler.h in Headers */,
 				FD31608812B026F700C1A359 /* AudioResamplerKernel.h in Headers */,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to