diff --git a/content/media/webaudio/BiquadFilterNode.cpp b/content/media/webaudio/BiquadFilterNode.cpp index 47ea02f8c7a7..341620dd0569 100644 --- a/content/media/webaudio/BiquadFilterNode.cpp +++ b/content/media/webaudio/BiquadFilterNode.cpp @@ -298,41 +298,6 @@ BiquadFilterNode::WrapObject(JSContext* aCx) void BiquadFilterNode::SetType(BiquadFilterType aType) { - if (!Preferences::GetBool("media.webaudio.legacy.BiquadFilterNode")) { - // Do not accept the alternate enum values unless the legacy pref - // has been turned on. - switch (aType) { - case BiquadFilterType::_0: - case BiquadFilterType::_1: - case BiquadFilterType::_2: - case BiquadFilterType::_3: - case BiquadFilterType::_4: - case BiquadFilterType::_5: - case BiquadFilterType::_6: - case BiquadFilterType::_7: - // Do nothing in order to emulate setting an invalid enum value. - return; - default: - // Shut up the compiler warning - break; - } - } - - // Handle the alternate enum values - switch (aType) { - case BiquadFilterType::_0: aType = BiquadFilterType::Lowpass; break; - case BiquadFilterType::_1: aType = BiquadFilterType::Highpass; break; - case BiquadFilterType::_2: aType = BiquadFilterType::Bandpass; break; - case BiquadFilterType::_3: aType = BiquadFilterType::Lowshelf; break; - case BiquadFilterType::_4: aType = BiquadFilterType::Highshelf; break; - case BiquadFilterType::_5: aType = BiquadFilterType::Peaking; break; - case BiquadFilterType::_6: aType = BiquadFilterType::Notch; break; - case BiquadFilterType::_7: aType = BiquadFilterType::Allpass; break; - default: - // Shut up the compiler warning - break; - } - mType = aType; SendInt32ParameterToStream(BiquadFilterNodeEngine::TYPE, static_cast(aType)); diff --git a/content/media/webaudio/test/test_biquadFilterNode.html b/content/media/webaudio/test/test_biquadFilterNode.html index ace38b52de7d..3a0b60ad19da 100644 --- a/content/media/webaudio/test/test_biquadFilterNode.html +++ b/content/media/webaudio/test/test_biquadFilterNode.html @@ -55,8 +55,6 @@ addLoadEvent(function() { "allpass", ]; for (var i = 0; i < types.length; ++i) { - filter.type = filter[types[i].toUpperCase()]; - is(filter.type, types[i], "Correct alternname type enum value"); filter.type = types[i]; } diff --git a/dom/webidl/BiquadFilterNode.webidl b/dom/webidl/BiquadFilterNode.webidl index 7cf818333729..7103c4f6daf7 100644 --- a/dom/webidl/BiquadFilterNode.webidl +++ b/dom/webidl/BiquadFilterNode.webidl @@ -11,9 +11,6 @@ */ enum BiquadFilterType { - // Hack: Use numbers to support alternate enum values - "0", "1", "2", "3", "4", "5", "6", "7", - "lowpass", "highpass", "bandpass", @@ -38,26 +35,3 @@ interface BiquadFilterNode : AudioNode { }; -/* - * The origin of this IDL file is - * https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames - */ -partial interface BiquadFilterNode { - [Pref="media.webaudio.legacy.BiquadFilterNode"] - const unsigned short LOWPASS = 0; - [Pref="media.webaudio.legacy.BiquadFilterNode"] - const unsigned short HIGHPASS = 1; - [Pref="media.webaudio.legacy.BiquadFilterNode"] - const unsigned short BANDPASS = 2; - [Pref="media.webaudio.legacy.BiquadFilterNode"] - const unsigned short LOWSHELF = 3; - [Pref="media.webaudio.legacy.BiquadFilterNode"] - const unsigned short HIGHSHELF = 4; - [Pref="media.webaudio.legacy.BiquadFilterNode"] - const unsigned short PEAKING = 5; - [Pref="media.webaudio.legacy.BiquadFilterNode"] - const unsigned short NOTCH = 6; - [Pref="media.webaudio.legacy.BiquadFilterNode"] - const unsigned short ALLPASS = 7; -}; - diff --git a/testing/profiles/prefs_general.js b/testing/profiles/prefs_general.js index dcd372caa1d5..9bfed49d4c24 100644 --- a/testing/profiles/prefs_general.js +++ b/testing/profiles/prefs_general.js @@ -145,7 +145,6 @@ user_pref("dom.gamepad.enabled", true); user_pref("dom.gamepad.non_standard_events.enabled", true); // Enable Web Audio legacy APIs -user_pref("media.webaudio.legacy.BiquadFilterNode", true); user_pref("media.webaudio.legacy.PannerNode", true); user_pref("media.webaudio.legacy.OscillatorNode", true);