Diff
Modified: trunk/LayoutTests/ChangeLog (264619 => 264620)
--- trunk/LayoutTests/ChangeLog 2020-07-20 21:32:55 UTC (rev 264619)
+++ trunk/LayoutTests/ChangeLog 2020-07-20 21:52:49 UTC (rev 264620)
@@ -1,3 +1,15 @@
+2020-07-20 Clark Wang <[email protected]>
+
+ Fixes to match BaseAudioContext.idl to spec
+ https://bugs.webkit.org/show_bug.cgi?id=214487
+
+ Reviewed by Chris Dumez.
+
+ Changed test for default panningModel to equalpower to match spec, Chrome and Firefox.
+
+ * webaudio/pannernode-basic-expected.txt:
+ * webaudio/pannernode-basic.html:
+
2020-07-20 Ryan Haddad <[email protected]>
Unreviewed test gardening, skip flaky test webgl/2.0.0/conformance2/state/gl-object-get-calls.html.
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (264619 => 264620)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-07-20 21:32:55 UTC (rev 264619)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-07-20 21:52:49 UTC (rev 264620)
@@ -1,3 +1,15 @@
+2020-07-20 Clark Wang <[email protected]>
+
+ Fixes to match BaseAudioContext.idl to spec
+ https://bugs.webkit.org/show_bug.cgi?id=214487
+
+ Reviewed by Chris Dumez.
+
+ Re-baselined existing tests that now pass.
+
+ * web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/pannernode-basic-expected.txt:
+
2020-07-20 Rob Buis <[email protected]>
Setting URL.hash to '#' should preserve '#'
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit-expected.txt (264619 => 264620)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit-expected.txt 2020-07-20 21:32:55 UTC (rev 264619)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit-expected.txt 2020-07-20 21:52:49 UTC (rev 264620)
@@ -7,7 +7,7 @@
PASS Setting Delay length to 180 seconds or more threw NotSupportedError: "The operation is not supported.".
PASS Setting Delay length to 0 seconds threw NotSupportedError: "The operation is not supported.".
PASS Setting Delay length to negative threw NotSupportedError: "The operation is not supported.".
-FAIL X Setting Delay length to NaN did not throw an exception. assert_true: expected true got false
+PASS Setting Delay length to NaN threw TypeError: "The provided value is non-finite".
PASS delay.delayTime.value = 0.5 is equal to 0.5.
-FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed. assert_true: expected true got false
+PASS # AUDIT TASK RUNNER FINISHED: 1 tasks ran successfully.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/pannernode-basic-expected.txt (264619 => 264620)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/pannernode-basic-expected.txt 2020-07-20 21:32:55 UTC (rev 264619)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/pannernode-basic-expected.txt 2020-07-20 21:52:49 UTC (rev 264620)
@@ -24,7 +24,7 @@
PASS panner.coneOuterAngle = 166.5 is equal to 166.5.
PASS panner.coneOuterGain is equal to 0.
PASS panner.coneOuterGain = 0.25 is equal to 0.25.
-FAIL X panner.panningModel is not equal to equalpower. Got HRTF. assert_true: expected true got false
+PASS panner.panningModel is equal to equalpower.
PASS inverse is equal to panner.distanceModel.
PASS panner.positionX is equal to 0.
PASS panner.positionY is equal to 0.
@@ -32,7 +32,7 @@
PASS panner.orientationX is equal to 1.
PASS panner.orientationY is equal to 0.
PASS panner.orientationZ is equal to 0.
-FAIL < [basic] 1 out of 22 assertions were failed. assert_true: expected true got false
+PASS < [basic] All assertions passed. (total 22 assertions)
PASS > [listener]
PASS > [panning models]
PASS Set panner.panningModel = "equalpower" did not throw an exception.
@@ -54,5 +54,5 @@
PASS panner.distanceModel = "invalid" did not throw an exception.
PASS panner.distanceModel is equal to exponential.
PASS < [distance models] All assertions passed. (total 8 assertions)
-FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 5 tasks were failed. assert_true: expected true got false
+PASS # AUDIT TASK RUNNER FINISHED: 5 tasks ran successfully.
Modified: trunk/LayoutTests/webaudio/pannernode-basic-expected.txt (264619 => 264620)
--- trunk/LayoutTests/webaudio/pannernode-basic-expected.txt 2020-07-20 21:32:55 UTC (rev 264619)
+++ trunk/LayoutTests/webaudio/pannernode-basic-expected.txt 2020-07-20 21:52:49 UTC (rev 264620)
@@ -25,7 +25,7 @@
PASS coneOuterGain value is set to 0.35.
PASS Exception has been thrown correctly when coneOuterGain is set outside [0, 1] (was set to -1).
PASS Exception has been thrown correctly when coneOuterGain is set outside [0, 1] (was set to 2).
-PASS PannerNode defaults to 'HRTF' panningModel.
+PASS PannerNode defaults to 'equalpower' panningModel.
PASS PannerNode defaults to 'inverse' distanceModel.
PASS panningModel: 'equalpower' is settable.
PASS panningModel: 'HRTF' is settable.
Modified: trunk/LayoutTests/webaudio/pannernode-basic.html (264619 => 264620)
--- trunk/LayoutTests/webaudio/pannernode-basic.html 2020-07-20 21:32:55 UTC (rev 264619)
+++ trunk/LayoutTests/webaudio/pannernode-basic.html 2020-07-20 21:52:49 UTC (rev 264620)
@@ -156,10 +156,10 @@
testPassed("Exception has been thrown correctly when coneOuterGain is set outside [0, 1] (was set to 2).");
}
- if (panner.panningModel === "HRTF")
- testPassed("PannerNode defaults to 'HRTF' panningModel.");
+ if (panner.panningModel === "equalpower")
+ testPassed("PannerNode defaults to 'equalpower' panningModel.");
else
- testFailed("PannerNode should default to 'HRTF' panningModel.");
+ testFailed("PannerNode should default to 'equalpower' panningModel.");
if (panner.distanceModel === "inverse")
testPassed("PannerNode defaults to 'inverse' distanceModel.");
Modified: trunk/Source/WebCore/ChangeLog (264619 => 264620)
--- trunk/Source/WebCore/ChangeLog 2020-07-20 21:32:55 UTC (rev 264619)
+++ trunk/Source/WebCore/ChangeLog 2020-07-20 21:52:49 UTC (rev 264620)
@@ -1,3 +1,21 @@
+2020-07-20 Clark Wang <[email protected]>
+
+ Fixes to match BaseAudioContext.idl to spec
+ https://bugs.webkit.org/show_bug.cgi?id=214487
+
+ Reviewed by Chris Dumez.
+
+ Removed unrestricted keyword from certain attributes and parameters in BaseAudioContext.
+ Changed createPanner to call new PannerNode constructor, removed old PannerNode constructor.
+
+ Re-baselined existing tests that now pass.
+
+ * Modules/webaudio/BaseAudioContext.cpp:
+ (WebCore::BaseAudioContext::createPanner):
+ * Modules/webaudio/BaseAudioContext.idl:
+ * Modules/webaudio/PannerNode.cpp:
+ * Modules/webaudio/PannerNode.h:
+
2020-07-20 Keith Miller <[email protected]>
Add support for FinalizationRegistries
Modified: trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp (264619 => 264620)
--- trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp 2020-07-20 21:32:55 UTC (rev 264619)
+++ trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp 2020-07-20 21:52:49 UTC (rev 264620)
@@ -523,7 +523,7 @@
return Exception { InvalidStateError };
lazyInitialize();
- return PannerNode::create(*this, sampleRate());
+ return PannerNode::create(*this);
}
ExceptionOr<Ref<ConvolverNode>> BaseAudioContext::createConvolver()
Modified: trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.idl (264619 => 264620)
--- trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.idl 2020-07-20 21:32:55 UTC (rev 264619)
+++ trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.idl 2020-07-20 21:52:49 UTC (rev 264620)
@@ -33,10 +33,10 @@
readonly attribute AudioDestinationNode destination;
// All scheduled times are relative to this time in seconds.
- readonly attribute unrestricted double currentTime;
+ readonly attribute double currentTime;
// All AudioNodes in the context run at this sample-rate (sample-frames per second).
- readonly attribute unrestricted float sampleRate;
+ readonly attribute float sampleRate;
// All panning is relative to this listener.
readonly attribute AudioListener listener;
@@ -44,7 +44,7 @@
readonly attribute AudioContextState state;
attribute EventHandler onstatechange;
- [MayThrowException] AudioBuffer createBuffer(unsigned long numberOfChannels, unsigned long numberOfFrames, unrestricted float sampleRate);
+ [MayThrowException] AudioBuffer createBuffer(unsigned long numberOfChannels, unsigned long numberOfFrames, float sampleRate);
[MayThrowException] AudioBuffer createBuffer(ArrayBuffer buffer, boolean mixToMono);
// Asynchronous audio file data decoding.
@@ -56,7 +56,7 @@
// Processing nodes
[MayThrowException] GainNode createGain();
- [MayThrowException] DelayNode createDelay(optional unrestricted double maxDelayTime = 1);
+ [MayThrowException] DelayNode createDelay(optional double maxDelayTime = 1);
[MayThrowException] BiquadFilterNode createBiquadFilter();
[MayThrowException] WaveShaperNode createWaveShaper();
[MayThrowException] PannerNode createPanner();
Modified: trunk/Source/WebCore/Modules/webaudio/PannerNode.cpp (264619 => 264620)
--- trunk/Source/WebCore/Modules/webaudio/PannerNode.cpp 2020-07-20 21:32:55 UTC (rev 264619)
+++ trunk/Source/WebCore/Modules/webaudio/PannerNode.cpp 2020-07-20 21:52:49 UTC (rev 264620)
@@ -49,42 +49,12 @@
x = 0.0;
}
-// FIXME: Remove once dependencies on old constructor are removed.
+// FIXME: Remove once dependency from prefixed version is removed
PannerNodeBase::PannerNodeBase(BaseAudioContext& context, float sampleRate)
: AudioNode(context, sampleRate)
{
}
-// FIXME: Remove once dependencies on old constructor are removed.
-PannerNode::PannerNode(BaseAudioContext& context, float sampleRate)
- : PannerNodeBase(context, sampleRate)
- , m_panningModel(PanningModelType::HRTF)
- , m_positionX(AudioParam::create(context, "positionX"_s, 0, -FLT_MAX, FLT_MAX))
- , m_positionY(AudioParam::create(context, "positionY"_s, 0, -FLT_MAX, FLT_MAX))
- , m_positionZ(AudioParam::create(context, "positionZ"_s, 0, -FLT_MAX, FLT_MAX))
- , m_orientationX(AudioParam::create(context, "orientationX"_s, 1, -FLT_MAX, FLT_MAX))
- , m_orientationY(AudioParam::create(context, "orientationY"_s, 0, -FLT_MAX, FLT_MAX))
- , m_orientationZ(AudioParam::create(context, "orientationZ"_s, 0, -FLT_MAX, FLT_MAX))
-{
- setNodeType(NodeTypePanner);
-
- // Load the HRTF database asynchronously so we don't block the _javascript_ thread while creating the HRTF database.
- m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary(context.sampleRate());
-
- addInput(makeUnique<AudioNodeInput>(this));
- addOutput(makeUnique<AudioNodeOutput>(this, 2));
-
- // Node-specific default mixing rules.
- m_channelCount = 2;
- m_channelCountMode = ChannelCountMode::ClampedMax;
- m_channelInterpretation = ChannelInterpretation::Speakers;
-
- m_distanceGain = AudioParam::create(context, "distanceGain", 1.0, 0.0, 1.0);
- m_coneGain = AudioParam::create(context, "coneGain", 1.0, 0.0, 1.0);
-
- initialize();
-}
-
PannerNodeBase::PannerNodeBase(BaseAudioContext& context)
: AudioNode(context)
{
Modified: trunk/Source/WebCore/Modules/webaudio/PannerNode.h (264619 => 264620)
--- trunk/Source/WebCore/Modules/webaudio/PannerNode.h 2020-07-20 21:32:55 UTC (rev 264619)
+++ trunk/Source/WebCore/Modules/webaudio/PannerNode.h 2020-07-20 21:52:49 UTC (rev 264620)
@@ -52,7 +52,7 @@
protected:
- // FIXME: Remove once dependencies on old constructor are removed
+ // FIXME: Remove once dependency from prefixed version is removed
PannerNodeBase(BaseAudioContext&, float sampleRate);
PannerNodeBase(BaseAudioContext&);
};
@@ -67,12 +67,6 @@
class PannerNode final : public PannerNodeBase {
WTF_MAKE_ISO_ALLOCATED(PannerNode);
public:
- // FIXME: Remove once dependencies on old constructor are removed
- static Ref<PannerNode> create(BaseAudioContext& context, float sampleRate)
- {
- return adoptRef(*new PannerNode(context, sampleRate));
- }
-
static ExceptionOr<Ref<PannerNode>> create(BaseAudioContext&, const PannerOptions& = { });
virtual ~PannerNode();
@@ -142,8 +136,6 @@
double latencyTime() const override { return m_panner ? m_panner->latencyTime() : 0; }
private:
- // FIXME: Remove once dependencies on old constructor are removed
- PannerNode(BaseAudioContext&, float sampleRate);
PannerNode(BaseAudioContext&, const PannerOptions&);
// Returns the combined distance and cone gain attenuation.