<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[265221] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/265221">265221</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2020-08-03 14:49:41 -0700 (Mon, 03 Aug 2020)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add constructor to DelayNode
https://bugs.webkit.org/show_bug.cgi?id=215083

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/ctor-delay-expected.txt:

Source/WebCore:

Add constructor to DelayNode:
- https://www.w3.org/TR/webaudio/#DelayNode

No new tests, rebaselined existing tests.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::createDelay):
* Modules/webaudio/DelayDSPKernel.cpp:
(WebCore::DelayDSPKernel::process):
* Modules/webaudio/DelayNode.cpp:
(WebCore::DelayNode::DelayNode):
(WebCore::DelayNode::create):
(WebCore::DelayNode::delayTime):
* Modules/webaudio/DelayNode.h:
* Modules/webaudio/DelayNode.idl:
* Modules/webaudio/DelayOptions.h: Copied from Source/WebCore/Modules/webaudio/DelayNode.idl.
* Modules/webaudio/DelayOptions.idl: Copied from Source/WebCore/Modules/webaudio/DelayNode.idl.
* Modules/webaudio/DelayProcessor.cpp:
(WebCore::DelayProcessor::DelayProcessor):
* Modules/webaudio/DelayProcessor.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebaudioidlharnesshttpswindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/idlharness.https.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebaudiotheaudioapithedelaynodeinterfacectordelayexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/ctor-delay-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesinputxcfilelist">trunk/Source/WebCore/DerivedSources-input.xcfilelist</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesoutputxcfilelist">trunk/Source/WebCore/DerivedSources-output.xcfilelist</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioBaseAudioContextcpp">trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioDelayDSPKernelcpp">trunk/Source/WebCore/Modules/webaudio/DelayDSPKernel.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioDelayNodecpp">trunk/Source/WebCore/Modules/webaudio/DelayNode.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioDelayNodeh">trunk/Source/WebCore/Modules/webaudio/DelayNode.h</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioDelayNodeidl">trunk/Source/WebCore/Modules/webaudio/DelayNode.idl</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioDelayProcessorcpp">trunk/Source/WebCore/Modules/webaudio/DelayProcessor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioDelayProcessorh">trunk/Source/WebCore/Modules/webaudio/DelayProcessor.h</a></li>
<li><a href="#trunkSourceWebCoreSourcestxt">trunk/Source/WebCore/Sources.txt</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModuleswebaudioDelayOptionsh">trunk/Source/WebCore/Modules/webaudio/DelayOptions.h</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioDelayOptionsidl">trunk/Source/WebCore/Modules/webaudio/DelayOptions.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/LayoutTests/imported/w3c/ChangeLog    2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2020-08-03  Chris Dumez  <cdumez@apple.com>
+
+        Add constructor to DelayNode
+        https://bugs.webkit.org/show_bug.cgi?id=215083
+
+        Reviewed by Eric Carlson.
+
+        Rebaseline WPT tests now that more checks are passing.
+
+        * web-platform-tests/webaudio/idlharness.https.window-expected.txt:
+        * web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/ctor-delay-expected.txt:
+
</ins><span class="cx"> 2020-08-03  Clark Wang  <clark_wang@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Added AudioBuffer Constructor
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebaudioidlharnesshttpswindowexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/idlharness.https.window-expected.txt (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/idlharness.https.window-expected.txt  2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/idlharness.https.window-expected.txt     2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -646,38 +646,38 @@
</span><span class="cx"> FAIL AudioNode interface: new ConvolverNode(context) must inherit property "channelCountMode" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ConvolverNode(context)')"
</span><span class="cx"> FAIL AudioNode interface: new ConvolverNode(context) must inherit property "channelInterpretation" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new ConvolverNode(context)')"
</span><span class="cx"> PASS DelayNode interface: existence and properties of interface object 
</span><del>-FAIL DelayNode interface object length assert_equals: wrong value for DelayNode.length expected 1 but got 0
</del><ins>+PASS DelayNode interface object length 
</ins><span class="cx"> PASS DelayNode interface object name 
</span><span class="cx"> PASS DelayNode interface: existence and properties of interface prototype object 
</span><span class="cx"> PASS DelayNode interface: existence and properties of interface prototype object's "constructor" property 
</span><span class="cx"> PASS DelayNode interface: existence and properties of interface prototype object's @@unscopables property 
</span><span class="cx"> PASS DelayNode interface: attribute delayTime 
</span><del>-FAIL DelayNode must be primary interface of new DelayNode(context) assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL Stringification of new DelayNode(context) assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL DelayNode interface: new DelayNode(context) must inherit property "delayTime" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "connect(AudioNode, optional unsigned long, optional unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: calling connect(AudioNode, optional unsigned long, optional unsigned long) on new DelayNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "connect(AudioParam, optional unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: calling connect(AudioParam, optional unsigned long) on new DelayNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "disconnect()" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "disconnect(unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: calling disconnect(unsigned long) on new DelayNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "disconnect(AudioNode)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioNode) on new DelayNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "disconnect(AudioNode, unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioNode, unsigned long) on new DelayNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "disconnect(AudioNode, unsigned long, unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioNode, unsigned long, unsigned long) on new DelayNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "disconnect(AudioParam)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioParam) on new DelayNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "disconnect(AudioParam, unsigned long)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: calling disconnect(AudioParam, unsigned long) on new DelayNode(context) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "context" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "numberOfInputs" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "numberOfOutputs" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "channelCount" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "channelCountMode" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
-FAIL AudioNode interface: new DelayNode(context) must inherit property "channelInterpretation" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: function is not a constructor (evaluating 'new DelayNode(context)')"
</del><ins>+PASS DelayNode must be primary interface of new DelayNode(context) 
+PASS Stringification of new DelayNode(context) 
+PASS DelayNode interface: new DelayNode(context) must inherit property "delayTime" with the proper type 
+PASS AudioNode interface: new DelayNode(context) must inherit property "connect(AudioNode, optional unsigned long, optional unsigned long)" with the proper type 
+PASS AudioNode interface: calling connect(AudioNode, optional unsigned long, optional unsigned long) on new DelayNode(context) with too few arguments must throw TypeError 
+PASS AudioNode interface: new DelayNode(context) must inherit property "connect(AudioParam, optional unsigned long)" with the proper type 
+PASS AudioNode interface: calling connect(AudioParam, optional unsigned long) on new DelayNode(context) with too few arguments must throw TypeError 
+PASS AudioNode interface: new DelayNode(context) must inherit property "disconnect()" with the proper type 
+PASS AudioNode interface: new DelayNode(context) must inherit property "disconnect(unsigned long)" with the proper type 
+PASS AudioNode interface: calling disconnect(unsigned long) on new DelayNode(context) with too few arguments must throw TypeError 
+PASS AudioNode interface: new DelayNode(context) must inherit property "disconnect(AudioNode)" with the proper type 
+PASS AudioNode interface: calling disconnect(AudioNode) on new DelayNode(context) with too few arguments must throw TypeError 
+PASS AudioNode interface: new DelayNode(context) must inherit property "disconnect(AudioNode, unsigned long)" with the proper type 
+PASS AudioNode interface: calling disconnect(AudioNode, unsigned long) on new DelayNode(context) with too few arguments must throw TypeError 
+PASS AudioNode interface: new DelayNode(context) must inherit property "disconnect(AudioNode, unsigned long, unsigned long)" with the proper type 
+PASS AudioNode interface: calling disconnect(AudioNode, unsigned long, unsigned long) on new DelayNode(context) with too few arguments must throw TypeError 
+PASS AudioNode interface: new DelayNode(context) must inherit property "disconnect(AudioParam)" with the proper type 
+PASS AudioNode interface: calling disconnect(AudioParam) on new DelayNode(context) with too few arguments must throw TypeError 
+PASS AudioNode interface: new DelayNode(context) must inherit property "disconnect(AudioParam, unsigned long)" with the proper type 
+PASS AudioNode interface: calling disconnect(AudioParam, unsigned long) on new DelayNode(context) with too few arguments must throw TypeError 
+PASS AudioNode interface: new DelayNode(context) must inherit property "context" with the proper type 
+PASS AudioNode interface: new DelayNode(context) must inherit property "numberOfInputs" with the proper type 
+PASS AudioNode interface: new DelayNode(context) must inherit property "numberOfOutputs" with the proper type 
+PASS AudioNode interface: new DelayNode(context) must inherit property "channelCount" with the proper type 
+PASS AudioNode interface: new DelayNode(context) must inherit property "channelCountMode" with the proper type 
+PASS AudioNode interface: new DelayNode(context) must inherit property "channelInterpretation" with the proper type 
</ins><span class="cx"> PASS DynamicsCompressorNode interface: existence and properties of interface object 
</span><span class="cx"> FAIL DynamicsCompressorNode interface object length assert_equals: wrong value for DynamicsCompressorNode.length expected 1 but got 0
</span><span class="cx"> PASS DynamicsCompressorNode interface object name 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebaudiotheaudioapithedelaynodeinterfacectordelayexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/ctor-delay-expected.txt (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/ctor-delay-expected.txt 2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/ctor-delay-expected.txt    2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -2,24 +2,54 @@
</span><span class="cx"> PASS # AUDIT TASK RUNNER STARTED. 
</span><span class="cx"> PASS Executing "initialize" 
</span><span class="cx"> PASS Executing "invalid constructor" 
</span><del>-FAIL Executing "default constructor" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.numberOfInputs')"
-FAIL Executing "test AudioNodeOptions" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.channelCount')"
-FAIL Executing "constructor options" promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'node.delayTime')"
</del><ins>+PASS Executing "default constructor" 
+PASS Executing "test AudioNodeOptions" 
+PASS Executing "constructor options" 
</ins><span class="cx"> PASS Audit report 
</span><span class="cx"> PASS > [initialize]  
</span><span class="cx"> PASS   context = new OfflineAudioContext(...) did not throw an exception. 
</span><span class="cx"> PASS < [initialize] All assertions passed. (total 1 assertions) 
</span><span class="cx"> PASS > [invalid constructor]  
</span><del>-PASS   new DelayNode() threw TypeError: "function is not a constructor (evaluating 'new window[name]()')". 
-PASS   new DelayNode(1) threw TypeError: "function is not a constructor (evaluating 'new window[name](1)')". 
-PASS   new DelayNode(context, 42) threw TypeError: "function is not a constructor (evaluating 'new window[name](context, 42)')". 
</del><ins>+PASS   new DelayNode() threw TypeError: "Not enough arguments". 
+PASS   new DelayNode(1) threw TypeError: "Argument 1 ('context') to the DelayNode constructor must be an instance of BaseAudioContext". 
+PASS   new DelayNode(context, 42) threw TypeError: "Type error". 
</ins><span class="cx"> PASS < [invalid constructor] All assertions passed. (total 3 assertions) 
</span><span class="cx"> PASS > [default constructor]  
</span><del>-FAIL X node0 = new DelayNode(context) incorrectly threw TypeError: "function is not a constructor (evaluating 'new window[name](context, options.constructorOptions)')". assert_true: expected true got false
-FAIL X node0 instanceof DelayNode is not equal to true. Got false. assert_true: expected true got false
</del><ins>+PASS   node0 = new DelayNode(context) did not throw an exception. 
+PASS   node0 instanceof DelayNode is equal to true. 
+PASS   node0.numberOfInputs is equal to 1. 
+PASS   node0.numberOfOutputs is equal to 1. 
+PASS   node0.channelCount is equal to 2. 
+PASS   node0.channelCountMode is equal to max. 
+PASS   node0.channelInterpretation is equal to speakers. 
+PASS   node0.delayTime.value is equal to 0. 
+PASS < [default constructor] All assertions passed. (total 8 assertions) 
</ins><span class="cx"> PASS > [test AudioNodeOptions]  
</span><del>-FAIL X new DelayNode(c, {channelCount: 17}) incorrectly threw TypeError: "function is not a constructor (evaluating 'new window[nodeName]')". assert_true: expected true got false
</del><ins>+PASS   new DelayNode(c, {channelCount: 17}) did not throw an exception. 
+PASS   node.channelCount is equal to 17. 
+PASS   new DelayNode(c, {channelCount: 0}) threw InvalidStateError: "The object is in an invalid state.". 
+PASS   new DelayNode(c, {channelCount: 99}) threw InvalidStateError: "The object is in an invalid state.". 
+PASS   new DelayNode(c, {channelCountMode: "max"} did not throw an exception. 
+PASS   node.channelCountMode is equal to max. 
+PASS   new DelayNode(c, {channelCountMode: "max"}) did not throw an exception. 
+PASS   node.channelCountMode after valid setter is equal to max. 
+PASS   new DelayNode(c, {channelCountMode: "clamped-max"}) did not throw an exception. 
+PASS   node.channelCountMode after valid setter is equal to clamped-max. 
+PASS   new DelayNode(c, {channelCountMode: "explicit"}) did not throw an exception. 
+PASS   node.channelCountMode after valid setter is equal to explicit. 
+PASS   new DelayNode(c, {channelCountMode: "foobar"} threw TypeError: "Type error". 
+PASS   node.channelCountMode after invalid setter is equal to explicit. 
+PASS   new DelayNode(c, {channelInterpretation: "speakers"}) did not throw an exception. 
+PASS   node.channelInterpretation is equal to speakers. 
+PASS   new DelayNode(c, {channelInterpretation: "discrete"}) did not throw an exception. 
+PASS   node.channelInterpretation is equal to discrete. 
+PASS   new DelayNode(c, {channelInterpretation: "foobar"}) threw TypeError: "Type error". 
+PASS   node.channelInterpretation after invalid setter is equal to discrete. 
+PASS < [test AudioNodeOptions] All assertions passed. (total 20 assertions) 
</ins><span class="cx"> PASS > [constructor options]  
</span><del>-FAIL X node1 = new DelayNode(c, {"delayTime":0.5,"maxDelayTime":1.5}) incorrectly threw TypeError: "function is not a constructor (evaluating 'new DelayNode(context, options)')". assert_true: expected true got false
-FAIL # AUDIT TASK RUNNER FINISHED: 3 out of 5 tasks were failed. assert_true: expected true got false
</del><ins>+PASS   node1 = new DelayNode(c, {"delayTime":0.5,"maxDelayTime":1.5}) did not throw an exception. 
+PASS   node1.delayTime.value is equal to 0.5. 
+PASS   node1.delayTime.maxValue is equal to 1.5. 
+PASS < [constructor options] All assertions passed. (total 3 assertions) 
+PASS # AUDIT TASK RUNNER FINISHED: 5 tasks ran successfully. 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt      2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/CMakeLists.txt 2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -472,6 +472,7 @@
</span><span class="cx">     Modules/webaudio/ChannelSplitterOptions.idl
</span><span class="cx">     Modules/webaudio/ConvolverNode.idl
</span><span class="cx">     Modules/webaudio/DelayNode.idl
</span><ins>+    Modules/webaudio/DelayOptions.idl
</ins><span class="cx">     Modules/webaudio/DistanceModelType.idl
</span><span class="cx">     Modules/webaudio/DynamicsCompressorNode.idl
</span><span class="cx">     Modules/webaudio/GainNode.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/ChangeLog      2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2020-08-03  Chris Dumez  <cdumez@apple.com>
+
+        Add constructor to DelayNode
+        https://bugs.webkit.org/show_bug.cgi?id=215083
+
+        Reviewed by Eric Carlson.
+
+        Add constructor to DelayNode:
+        - https://www.w3.org/TR/webaudio/#DelayNode
+
+        No new tests, rebaselined existing tests.
+
+        * CMakeLists.txt:
+        * DerivedSources-input.xcfilelist:
+        * DerivedSources-output.xcfilelist:
+        * DerivedSources.make:
+        * Modules/webaudio/BaseAudioContext.cpp:
+        (WebCore::BaseAudioContext::createDelay):
+        * Modules/webaudio/DelayDSPKernel.cpp:
+        (WebCore::DelayDSPKernel::process):
+        * Modules/webaudio/DelayNode.cpp:
+        (WebCore::DelayNode::DelayNode):
+        (WebCore::DelayNode::create):
+        (WebCore::DelayNode::delayTime):
+        * Modules/webaudio/DelayNode.h:
+        * Modules/webaudio/DelayNode.idl:
+        * Modules/webaudio/DelayOptions.h: Copied from Source/WebCore/Modules/webaudio/DelayNode.idl.
+        * Modules/webaudio/DelayOptions.idl: Copied from Source/WebCore/Modules/webaudio/DelayNode.idl.
+        * Modules/webaudio/DelayProcessor.cpp:
+        (WebCore::DelayProcessor::DelayProcessor):
+        * Modules/webaudio/DelayProcessor.h:
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2020-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Make WidthIterator::advance() return void
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesinputxcfilelist"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources-input.xcfilelist     2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist        2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -321,6 +321,7 @@
</span><span class="cx"> $(PROJECT_DIR)/Modules/webaudio/ChannelSplitterOptions.idl
</span><span class="cx"> $(PROJECT_DIR)/Modules/webaudio/ConvolverNode.idl
</span><span class="cx"> $(PROJECT_DIR)/Modules/webaudio/DelayNode.idl
</span><ins>+$(PROJECT_DIR)/Modules/webaudio/DelayOptions.idl
</ins><span class="cx"> $(PROJECT_DIR)/Modules/webaudio/DistanceModelType.idl
</span><span class="cx"> $(PROJECT_DIR)/Modules/webaudio/DynamicsCompressorNode.idl
</span><span class="cx"> $(PROJECT_DIR)/Modules/webaudio/GainNode.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesoutputxcfilelist"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources-output.xcfilelist    2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/DerivedSources-output.xcfilelist       2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -490,6 +490,8 @@
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDedicatedWorkerGlobalScope.h
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDelayNode.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDelayNode.h
</span><ins>+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDelayOptions.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDelayOptions.h
</ins><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDeprecatedCSSOMCounter.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDeprecatedCSSOMCounter.h
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDeprecatedCSSOMPrimitiveValue.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make 2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/DerivedSources.make    2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -401,9 +401,10 @@
</span><span class="cx">     $(WebCore)/Modules/webaudio/ChannelMergerNode.idl \
</span><span class="cx">     $(WebCore)/Modules/webaudio/ChannelMergerOptions.idl \
</span><span class="cx">     $(WebCore)/Modules/webaudio/ChannelSplitterNode.idl \
</span><del>-       $(WebCore)/Modules/webaudio/ChannelSplitterOptions.idl \
</del><ins>+    $(WebCore)/Modules/webaudio/ChannelSplitterOptions.idl \
</ins><span class="cx">     $(WebCore)/Modules/webaudio/ConvolverNode.idl \
</span><span class="cx">     $(WebCore)/Modules/webaudio/DelayNode.idl \
</span><ins>+    $(WebCore)/Modules/webaudio/DelayOptions.idl \
</ins><span class="cx">     $(WebCore)/Modules/webaudio/DistanceModelType.idl \
</span><span class="cx">     $(WebCore)/Modules/webaudio/DynamicsCompressorNode.idl \
</span><span class="cx">     $(WebCore)/Modules/webaudio/GainNode.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioBaseAudioContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp       2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp  2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> #include "ConvolverNode.h"
</span><span class="cx"> #include "DefaultAudioDestinationNode.h"
</span><span class="cx"> #include "DelayNode.h"
</span><ins>+#include "DelayOptions.h"
</ins><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "DynamicsCompressorNode.h"
</span><span class="cx"> #include "EventNames.h"
</span><span class="lines">@@ -567,11 +568,9 @@
</span><span class="cx">     ALWAYS_LOG(LOGIDENTIFIER);
</span><span class="cx">     
</span><span class="cx">     ASSERT(isMainThread());
</span><del>-    if (m_isStopScheduled)
-        return Exception { InvalidStateError };
-
-    lazyInitialize();
-    return DelayNode::create(*this, sampleRate(), maxDelayTime);
</del><ins>+    DelayOptions options;
+    options.maxDelayTime = maxDelayTime;
+    return DelayNode::create(*this, options);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<Ref<ChannelSplitterNode>> BaseAudioContext::createChannelSplitter(size_t numberOfOutputs)
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioDelayDSPKernelcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/DelayDSPKernel.cpp (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/DelayDSPKernel.cpp 2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/Modules/webaudio/DelayDSPKernel.cpp    2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -102,12 +102,12 @@
</span><span class="cx">     float* delayTimes = m_delayTimes.data();
</span><span class="cx">     double maxTime = maxDelayTime();
</span><span class="cx"> 
</span><del>-    bool sampleAccurate = delayProcessor() && delayProcessor()->delayTime()->hasSampleAccurateValues();
</del><ins>+    bool sampleAccurate = delayProcessor() && delayProcessor()->delayTime().hasSampleAccurateValues();
</ins><span class="cx"> 
</span><span class="cx">     if (sampleAccurate)
</span><del>-        delayProcessor()->delayTime()->calculateSampleAccurateValues(delayTimes, framesToProcess);
</del><ins>+        delayProcessor()->delayTime().calculateSampleAccurateValues(delayTimes, framesToProcess);
</ins><span class="cx">     else {
</span><del>-        delayTime = delayProcessor() ? delayProcessor()->delayTime()->finalValue() : m_desiredDelayFrames / sampleRate;
</del><ins>+        delayTime = delayProcessor() ? delayProcessor()->delayTime().finalValue() : m_desiredDelayFrames / sampleRate;
</ins><span class="cx"> 
</span><span class="cx">         // Make sure the delay time is in a valid range.
</span><span class="cx">         delayTime = std::min(maxTime, delayTime);
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioDelayNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/DelayNode.cpp (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/DelayNode.cpp      2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/Modules/webaudio/DelayNode.cpp 2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include "DelayNode.h"
</span><span class="cx"> 
</span><ins>+#include "DelayOptions.h"
</ins><span class="cx"> #include "DelayProcessor.h"
</span><span class="cx"> #include <wtf/IsoMallocInlines.h>
</span><span class="cx"> 
</span><span class="lines">@@ -37,21 +38,43 @@
</span><span class="cx"> 
</span><span class="cx"> const double maximumAllowedDelayTime = 180;
</span><span class="cx"> 
</span><del>-inline DelayNode::DelayNode(BaseAudioContext& context, float sampleRate, double maxDelayTime)
-    : AudioBasicProcessorNode(context, sampleRate)
</del><ins>+inline DelayNode::DelayNode(BaseAudioContext& context, double maxDelayTime)
+    : AudioBasicProcessorNode(context, context.sampleRate())
</ins><span class="cx"> {
</span><span class="cx">     setNodeType(NodeTypeDelay);
</span><del>-    m_processor = makeUnique<DelayProcessor>(context, sampleRate, 1, maxDelayTime);
</del><ins>+    m_processor = makeUnique<DelayProcessor>(context, context.sampleRate(), 1, maxDelayTime);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<Ref<DelayNode>> DelayNode::create(BaseAudioContext& context, float sampleRate, double maxDelayTime)
</del><ins>+ExceptionOr<Ref<DelayNode>> DelayNode::create(BaseAudioContext& context, const DelayOptions& options)
</ins><span class="cx"> {
</span><del>-    if (maxDelayTime <= 0 || maxDelayTime >= maximumAllowedDelayTime)
</del><ins>+    if (context.isStopped())
+        return Exception { InvalidStateError };
+
+    context.lazyInitialize();
+
+    if (options.maxDelayTime <= 0 || options.maxDelayTime >= maximumAllowedDelayTime)
</ins><span class="cx">         return Exception { NotSupportedError };
</span><del>-    return adoptRef(*new DelayNode(context, sampleRate, maxDelayTime));
</del><ins>+
+    auto delayNode = adoptRef(*new DelayNode(context, options.maxDelayTime));
+
+    auto result = delayNode->setChannelCount(options.channelCount.valueOr(2));
+    if (result.hasException())
+        return result.releaseException();
+
+    result = delayNode->setChannelCountMode(options.channelCountMode.valueOr(ChannelCountMode::Max));
+    if (result.hasException())
+        return result.releaseException();
+
+    result = delayNode->setChannelInterpretation(options.channelInterpretation.valueOr(ChannelInterpretation::Speakers));
+    if (result.hasException())
+        return result.releaseException();
+
+    delayNode->delayTime().setValue(options.delayTime);
+
+    return delayNode;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-AudioParam* DelayNode::delayTime()
</del><ins>+AudioParam& DelayNode::delayTime()
</ins><span class="cx"> {
</span><span class="cx">     return static_cast<DelayProcessor&>(*m_processor).delayTime();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioDelayNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/DelayNode.h (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/DelayNode.h        2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/Modules/webaudio/DelayNode.h   2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -28,15 +28,17 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+struct DelayOptions;
+
</ins><span class="cx"> class DelayNode final : public AudioBasicProcessorNode {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(DelayNode);
</span><span class="cx"> public:
</span><del>-    static ExceptionOr<Ref<DelayNode>> create(BaseAudioContext&, float sampleRate, double maxDelayTime);
</del><ins>+    static ExceptionOr<Ref<DelayNode>> create(BaseAudioContext&, const DelayOptions&);
</ins><span class="cx"> 
</span><del>-    AudioParam* delayTime();
</del><ins>+    AudioParam& delayTime();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    DelayNode(BaseAudioContext&, float sampleRate, double maxDelayTime);
</del><ins>+    DelayNode(BaseAudioContext&, double maxDelayTime);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioDelayNodeidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/DelayNode.idl (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/DelayNode.idl      2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/Modules/webaudio/DelayNode.idl 2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -26,5 +26,7 @@
</span><span class="cx">     Conditional=WEB_AUDIO,
</span><span class="cx">     JSGenerateToJSObject
</span><span class="cx"> ] interface DelayNode : AudioNode {
</span><ins>+    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional DelayOptions options);
+
</ins><span class="cx">     readonly attribute AudioParam delayTime;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioDelayOptionshfromrev265220trunkSourceWebCoreModuleswebaudioDelayNodeidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/webaudio/DelayOptions.h (from rev 265220, trunk/Source/WebCore/Modules/webaudio/DelayNode.idl) (0 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/DelayOptions.h                             (rev 0)
+++ trunk/Source/WebCore/Modules/webaudio/DelayOptions.h        2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+/*
+ * 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
+
+#if ENABLE(WEB_AUDIO)
+
+#include "AudioNodeOptions.h"
+
+namespace WebCore {
+
+struct DelayOptions : AudioNodeOptions {
+    double maxDelayTime { 1 };
+    double delayTime { 0 };
+};
+
+}
+
+#endif // ENABLE(WEB_AUDIO)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioDelayOptionsidlfromrev265220trunkSourceWebCoreModuleswebaudioDelayNodeidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/webaudio/DelayOptions.idl (from rev 265220, trunk/Source/WebCore/Modules/webaudio/DelayNode.idl) (0 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/DelayOptions.idl                           (rev 0)
+++ trunk/Source/WebCore/Modules/webaudio/DelayOptions.idl      2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+/*
+ * 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 DelayOptions : AudioNodeOptions {
+    double maxDelayTime = 1;
+    double delayTime = 0;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioDelayProcessorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/DelayProcessor.cpp (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/DelayProcessor.cpp 2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/Modules/webaudio/DelayProcessor.cpp    2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -34,9 +34,9 @@
</span><span class="cx"> 
</span><span class="cx"> DelayProcessor::DelayProcessor(BaseAudioContext& context, float sampleRate, unsigned numberOfChannels, double maxDelayTime)
</span><span class="cx">     : AudioDSPKernelProcessor(sampleRate, numberOfChannels)
</span><del>-    , m_maxDelayTime(maxDelayTime)
</del><ins>+    , m_delayTime(AudioParam::create(context, "delayTime", 0.0, 0.0, maxDelayTime))
</ins><span class="cx"> {
</span><del>-    m_delayTime = AudioParam::create(context, "delayTime", 0.0, 0.0, maxDelayTime);
</del><ins>+
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> DelayProcessor::~DelayProcessor()
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioDelayProcessorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/DelayProcessor.h (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/DelayProcessor.h   2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/Modules/webaudio/DelayProcessor.h      2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -41,13 +41,11 @@
</span><span class="cx">     
</span><span class="cx">     std::unique_ptr<AudioDSPKernel> createKernel() override;
</span><span class="cx">         
</span><del>-    AudioParam* delayTime() const { return m_delayTime.get(); }
</del><ins>+    AudioParam& delayTime() const { return m_delayTime.get(); }
+    double maxDelayTime() { return delayTime().maxValue(); }
</ins><span class="cx"> 
</span><del>-    double maxDelayTime() { return m_maxDelayTime; }
</del><span class="cx"> private:
</span><del>-
-    RefPtr<AudioParam> m_delayTime;
-    double m_maxDelayTime;
</del><ins>+    Ref<AudioParam> m_delayTime;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Sources.txt (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Sources.txt 2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/Sources.txt    2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -2798,6 +2798,7 @@
</span><span class="cx"> JSDatabaseCallback.cpp
</span><span class="cx"> JSDedicatedWorkerGlobalScope.cpp
</span><span class="cx"> JSDelayNode.cpp
</span><ins>+JSDelayOptions.cpp
</ins><span class="cx"> JSDeprecatedCSSOMCounter.cpp
</span><span class="cx"> JSDeprecatedCSSOMPrimitiveValue.cpp
</span><span class="cx"> JSDeprecatedCSSOMRGBColor.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (265220 => 265221)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2020-08-03 21:35:53 UTC (rev 265220)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2020-08-03 21:49:41 UTC (rev 265221)
</span><span class="lines">@@ -1405,8 +1405,8 @@
</span><span class="cx">          510A91F624D32DDC00BFD89C /* Dualshock3HIDGamepad.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A91F424D324FF00BFD89C /* Dualshock3HIDGamepad.h */; };
</span><span class="cx">          510A91FD24D3C16200BFD89C /* GamepadConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 51715FE924CD05DD002C97E6 /* GamepadConstants.h */; };
</span><span class="cx">          510A91FE24D3C16700BFD89C /* GamepadConstantsMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A91FB24D3C0FD00BFD89C /* GamepadConstantsMac.h */; };
</span><ins>+               510A920824D4F49900BFD89C /* LogitechGamepad.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A920524D4F07A00BFD89C /* LogitechGamepad.h */; };
</ins><span class="cx">           510A921224D5E60E00BFD89C /* StadiaHIDGamepad.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A921124D5E21700BFD89C /* StadiaHIDGamepad.h */; };
</span><del>-               510A920824D4F49900BFD89C /* LogitechGamepad.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A920524D4F07A00BFD89C /* LogitechGamepad.h */; };
</del><span class="cx">           510D4A34103165EE0049EA54 /* SocketStreamError.h in Headers */ = {isa = PBXBuildFile; fileRef = 510D4A2E103165EE0049EA54 /* SocketStreamError.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          510D4A37103165EE0049EA54 /* SocketStreamHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 510D4A31103165EE0049EA54 /* SocketStreamHandle.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          510D4A38103165EE0049EA54 /* SocketStreamHandleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 510D4A32103165EE0049EA54 /* SocketStreamHandleClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2494,6 +2494,7 @@
</span><span class="cx">          839947101F50B6FA00E9D86B /* JSDOMFileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 8399470E1F50B6F300E9D86B /* JSDOMFileSystem.h */; };
</span><span class="cx">          839A2F2E1E204A710039057E /* WebGLStateTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 839A2F2C1E204A6D0039057E /* WebGLStateTracker.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          839AAFED1A0C0C8D00605F99 /* HTMLWBRElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 839AAFEB1A0C0C8D00605F99 /* HTMLWBRElement.h */; };
</span><ins>+               83A2ABDB24D86DE000E2D73D /* DelayOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 83A2ABD824D86DC600E2D73D /* DelayOptions.h */; };
</ins><span class="cx">           83A8AC401FABBFE5002064AC /* ServiceWorkerIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 83A8AC3E1FABBFD1002064AC /* ServiceWorkerIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          83B1A702249985F000FE5961 /* WebKitAudioContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 83B1A6FF249985D000FE5961 /* WebKitAudioContext.h */; };
</span><span class="cx">          83B2D1751B8BCD6A00A02E47 /* NativeNodeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E959E11B8BC22B004D9385 /* NativeNodeFilter.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -8239,10 +8240,10 @@
</span><span class="cx">          510A91F424D324FF00BFD89C /* Dualshock3HIDGamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Dualshock3HIDGamepad.h; sourceTree = "<group>"; };
</span><span class="cx">          510A91F524D3250000BFD89C /* Dualshock3HIDGamepad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Dualshock3HIDGamepad.cpp; sourceTree = "<group>"; };
</span><span class="cx">          510A91FB24D3C0FD00BFD89C /* GamepadConstantsMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GamepadConstantsMac.h; sourceTree = "<group>"; };
</span><ins>+               510A920524D4F07A00BFD89C /* LogitechGamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogitechGamepad.h; sourceTree = "<group>"; };
+               510A920724D4F07A00BFD89C /* LogitechGamepad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LogitechGamepad.cpp; sourceTree = "<group>"; };
</ins><span class="cx">           510A920F24D5E21700BFD89C /* StadiaHIDGamepad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StadiaHIDGamepad.cpp; sourceTree = "<group>"; };
</span><span class="cx">          510A921124D5E21700BFD89C /* StadiaHIDGamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StadiaHIDGamepad.h; sourceTree = "<group>"; };
</span><del>-               510A920524D4F07A00BFD89C /* LogitechGamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogitechGamepad.h; sourceTree = "<group>"; };
-               510A920724D4F07A00BFD89C /* LogitechGamepad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LogitechGamepad.cpp; sourceTree = "<group>"; };
</del><span class="cx">           510D4A2E103165EE0049EA54 /* SocketStreamError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketStreamError.h; sourceTree = "<group>"; };
</span><span class="cx">          510D4A30103165EE0049EA54 /* SocketStreamHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SocketStreamHandle.cpp; sourceTree = "<group>"; };
</span><span class="cx">          510D4A31103165EE0049EA54 /* SocketStreamHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketStreamHandle.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -10560,6 +10561,8 @@
</span><span class="cx">          839A2F2C1E204A6D0039057E /* WebGLStateTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLStateTracker.h; sourceTree = "<group>"; };
</span><span class="cx">          839AAFEA1A0C0C8D00605F99 /* HTMLWBRElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLWBRElement.cpp; sourceTree = "<group>"; };
</span><span class="cx">          839AAFEB1A0C0C8D00605F99 /* HTMLWBRElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLWBRElement.h; sourceTree = "<group>"; };
</span><ins>+               83A2ABD824D86DC600E2D73D /* DelayOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DelayOptions.h; sourceTree = "<group>"; };
+               83A2ABDA24D86DC700E2D73D /* DelayOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = DelayOptions.idl; sourceTree = "<group>"; };
</ins><span class="cx">           83A4A9F81CE7FD7E00709B00 /* JSXMLDocumentCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSXMLDocumentCustom.cpp; sourceTree = "<group>"; };
</span><span class="cx">          83A8AC3E1FABBFD1002064AC /* ServiceWorkerIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerIdentifier.h; sourceTree = "<group>"; };
</span><span class="cx">          83B1A6FF249985D000FE5961 /* WebKitAudioContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitAudioContext.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -29566,6 +29569,8 @@
</span><span class="cx">                          FD315FE312B0267600C1A359 /* DelayNode.cpp */,
</span><span class="cx">                          FD315FE412B0267600C1A359 /* DelayNode.h */,
</span><span class="cx">                          FD315FE512B0267600C1A359 /* DelayNode.idl */,
</span><ins>+                               83A2ABD824D86DC600E2D73D /* DelayOptions.h */,
+                               83A2ABDA24D86DC700E2D73D /* DelayOptions.idl */,
</ins><span class="cx">                           FD315FE612B0267600C1A359 /* DelayProcessor.cpp */,
</span><span class="cx">                          FD315FE712B0267600C1A359 /* DelayProcessor.h */,
</span><span class="cx">                          8304027D249A7A5B00A90D8D /* DistanceModelType.h */,
</span><span class="lines">@@ -30639,6 +30644,7 @@
</span><span class="cx">                          CD83D36221122A210076E11C /* DeferrableTask.h in Headers */,
</span><span class="cx">                          FD31602C12B0267600C1A359 /* DelayDSPKernel.h in Headers */,
</span><span class="cx">                          FD31602E12B0267600C1A359 /* DelayNode.h in Headers */,
</span><ins>+                               83A2ABDB24D86DE000E2D73D /* DelayOptions.h in Headers */,
</ins><span class="cx">                           FD31603112B0267600C1A359 /* DelayProcessor.h in Headers */,
</span><span class="cx">                          93309DDF099E64920056E581 /* DeleteFromTextNodeCommand.h in Headers */,
</span><span class="cx">                          93309DE1099E64920056E581 /* DeleteSelectionCommand.h in Headers */,
</span></span></pre>
</div>
</div>

</body>
</html>