- Revision
- 265050
- Author
- [email protected]
- Date
- 2020-07-29 12:12:46 -0700 (Wed, 29 Jul 2020)
Log Message
Make sure playback state constants remain on OscillatorNode for backward compatibility
https://bugs.webkit.org/show_bug.cgi?id=214925
Reviewed by Eric Carlson.
Source/WebCore:
Make sure playback state constants remain on OscillatorNode for backward compatibility,
while we keep supporting the prefixed Web Audio API.
No new tests, updated existing test.
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/WebKitOscillatorNode.idl:
LayoutTests:
Improve layout test coverage.
* webaudio/oscillatornode-legacy-api-expected.txt:
* webaudio/oscillatornode-legacy-api.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (265049 => 265050)
--- trunk/LayoutTests/ChangeLog 2020-07-29 18:43:43 UTC (rev 265049)
+++ trunk/LayoutTests/ChangeLog 2020-07-29 19:12:46 UTC (rev 265050)
@@ -1,5 +1,17 @@
2020-07-29 Chris Dumez <[email protected]>
+ Make sure playback state constants remain on OscillatorNode for backward compatibility
+ https://bugs.webkit.org/show_bug.cgi?id=214925
+
+ Reviewed by Eric Carlson.
+
+ Improve layout test coverage.
+
+ * webaudio/oscillatornode-legacy-api-expected.txt:
+ * webaudio/oscillatornode-legacy-api.html:
+
+2020-07-29 Chris Dumez <[email protected]>
+
http/tests/cookies/document-cookie-multiple-cookies.html is failing on Windows
https://bugs.webkit.org/show_bug.cgi?id=214880
Modified: trunk/LayoutTests/webaudio/oscillatornode-legacy-api-expected.txt (265049 => 265050)
--- trunk/LayoutTests/webaudio/oscillatornode-legacy-api-expected.txt 2020-07-29 18:43:43 UTC (rev 265049)
+++ trunk/LayoutTests/webaudio/oscillatornode-legacy-api-expected.txt 2020-07-29 19:12:46 UTC (rev 265050)
@@ -4,14 +4,15 @@
PASS OscillatorNode.prototype.playbackState is undefined.
-PASS OscillatorNode.UNSCHEDULED_STATE is undefined.
-PASS OscillatorNode.SCHEDULED_STATE is undefined.
-PASS OscillatorNode.PLAYING_STATE is undefined.
-PASS OscillatorNode.FINISHED_STATE is undefined.
-PASS webkitOscillatorNode.UNSCHEDULED_STATE is 0
-PASS webkitOscillatorNode.SCHEDULED_STATE is 1
-PASS webkitOscillatorNode.PLAYING_STATE is 2
-PASS webkitOscillatorNode.FINISHED_STATE is 3
+PASS OscillatorNode.UNSCHEDULED_STATE is 0
+PASS OscillatorNode.SCHEDULED_STATE is 1
+PASS OscillatorNode.PLAYING_STATE is 2
+PASS OscillatorNode.FINISHED_STATE is 3
+PASS legacyOscillator.playbackState is defined.
+PASS legacyOscillator.UNSCHEDULED_STATE is 0
+PASS legacyOscillator.SCHEDULED_STATE is 1
+PASS legacyOscillator.PLAYING_STATE is 2
+PASS legacyOscillator.FINISHED_STATE is 3
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/webaudio/oscillatornode-legacy-api.html (265049 => 265050)
--- trunk/LayoutTests/webaudio/oscillatornode-legacy-api.html 2020-07-29 18:43:43 UTC (rev 265049)
+++ trunk/LayoutTests/webaudio/oscillatornode-legacy-api.html 2020-07-29 19:12:46 UTC (rev 265050)
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <script src=""
+ <script src=""
</head>
<body>
<script>
@@ -8,16 +8,20 @@
description("Testing that the legacy OscillatorNode API is not exposed on the unprefixed OscillatorNode");
shouldBeUndefined("OscillatorNode.prototype.playbackState");
- shouldBeUndefined("OscillatorNode.UNSCHEDULED_STATE");
- shouldBeUndefined("OscillatorNode.SCHEDULED_STATE");
- shouldBeUndefined("OscillatorNode.PLAYING_STATE");
- shouldBeUndefined("OscillatorNode.FINISHED_STATE");
- shouldBe("webkitOscillatorNode.UNSCHEDULED_STATE", "0");
- shouldBe("webkitOscillatorNode.SCHEDULED_STATE", "1");
- shouldBe("webkitOscillatorNode.PLAYING_STATE", "2");
- shouldBe("webkitOscillatorNode.FINISHED_STATE", "3");
+ // Tests backward compatibility for prefixed API.
+ shouldBe("OscillatorNode.UNSCHEDULED_STATE", "0");
+ shouldBe("OscillatorNode.SCHEDULED_STATE", "1");
+ shouldBe("OscillatorNode.PLAYING_STATE", "2");
+ shouldBe("OscillatorNode.FINISHED_STATE", "3");
+
+ let legacyContext = new webkitAudioContext;
+ let legacyOscillator = legacyContext.createOscillator();
+ shouldBeDefined("legacyOscillator.playbackState");
+ shouldBe("legacyOscillator.UNSCHEDULED_STATE", "0");
+ shouldBe("legacyOscillator.SCHEDULED_STATE", "1");
+ shouldBe("legacyOscillator.PLAYING_STATE", "2");
+ shouldBe("legacyOscillator.FINISHED_STATE", "3");
</script>
- <script src=""
</body>
</html>
Modified: trunk/Source/WebCore/ChangeLog (265049 => 265050)
--- trunk/Source/WebCore/ChangeLog 2020-07-29 18:43:43 UTC (rev 265049)
+++ trunk/Source/WebCore/ChangeLog 2020-07-29 19:12:46 UTC (rev 265050)
@@ -1,5 +1,20 @@
2020-07-29 Chris Dumez <[email protected]>
+ Make sure playback state constants remain on OscillatorNode for backward compatibility
+ https://bugs.webkit.org/show_bug.cgi?id=214925
+
+ Reviewed by Eric Carlson.
+
+ Make sure playback state constants remain on OscillatorNode for backward compatibility,
+ while we keep supporting the prefixed Web Audio API.
+
+ No new tests, updated existing test.
+
+ * Modules/webaudio/OscillatorNode.idl:
+ * Modules/webaudio/WebKitOscillatorNode.idl:
+
+2020-07-29 Chris Dumez <[email protected]>
+
http/tests/cookies/document-cookie-multiple-cookies.html is failing on Windows
https://bugs.webkit.org/show_bug.cgi?id=214880
Modified: trunk/Source/WebCore/Modules/webaudio/OscillatorNode.idl (265049 => 265050)
--- trunk/Source/WebCore/Modules/webaudio/OscillatorNode.idl 2020-07-29 18:43:43 UTC (rev 265049)
+++ trunk/Source/WebCore/Modules/webaudio/OscillatorNode.idl 2020-07-29 19:12:46 UTC (rev 265050)
@@ -27,7 +27,7 @@
Conditional=WEB_AUDIO,
JSGenerateToJSObject,
ActiveDOMObject,
- EnabledBySetting=ModernUnprefixedWebAudio
+ EnabledBySetting=WebAudio&ModernUnprefixedWebAudio
] interface OscillatorNode : AudioScheduledSourceNode {
[MayThrowException] constructor (BaseAudioContext context, optional OscillatorOptions options);
@@ -37,4 +37,11 @@
readonly attribute AudioParam detune; // in Cents
void setPeriodicWave(PeriodicWave wave);
+
+ // FIXME: Those legacy playback state constants are kept for backward compatibility with the
+ // prefixed API and should be removed once we stop supporting the prefixed API.
+ [EnabledBySetting=PrefixedWebAudio] const unsigned short UNSCHEDULED_STATE = 0;
+ [EnabledBySetting=PrefixedWebAudio] const unsigned short SCHEDULED_STATE = 1;
+ [EnabledBySetting=PrefixedWebAudio] const unsigned short PLAYING_STATE = 2;
+ [EnabledBySetting=PrefixedWebAudio] const unsigned short FINISHED_STATE = 3;
};
Modified: trunk/Source/WebCore/Modules/webaudio/WebKitOscillatorNode.idl (265049 => 265050)
--- trunk/Source/WebCore/Modules/webaudio/WebKitOscillatorNode.idl 2020-07-29 18:43:43 UTC (rev 265049)
+++ trunk/Source/WebCore/Modules/webaudio/WebKitOscillatorNode.idl 2020-07-29 19:12:46 UTC (rev 265050)
@@ -28,7 +28,7 @@
Conditional=WEB_AUDIO,
EnabledBySetting=WebAudio&PrefixedWebAudio,
JSGenerateToJSObject,
- InterfaceName=webkitOscillatorNode,
+ NoInterfaceObject,
] interface WebKitOscillatorNode : AudioScheduledSourceNode {
attribute OscillatorType type;