Remove unimplemented PeriodicWave stub

This commit is contained in:
Fernando Jiménez Moreno 2018-07-11 17:50:20 +02:00
parent ebcbe2ff7d
commit b68c791b8d
5 changed files with 2 additions and 63 deletions

View file

@ -46,6 +46,7 @@ use std::sync::{Arc, Mutex};
use task_source::TaskSource;
use uuid::Uuid;
#[allow(dead_code)]
pub enum BaseAudioContextOptions {
AudioContext(RealTimeAudioContextOptions),
OfflineAudioContext(OfflineAudioContextOptions),

View file

@ -414,7 +414,6 @@ pub mod performanceobserver;
pub mod performanceobserverentrylist;
pub mod performancepainttiming;
pub mod performancetiming;
pub mod periodicwave;
pub mod permissions;
pub mod permissionstatus;
pub mod plugin;

View file

@ -1,40 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::baseaudiocontext::BaseAudioContext;
use dom::bindings::codegen::Bindings::PeriodicWaveBinding;
use dom::bindings::codegen::Bindings::PeriodicWaveBinding::PeriodicWaveOptions;
use dom::bindings::error::Fallible;
use dom::bindings::reflector::{Reflector, reflect_dom_object};
use dom::bindings::root::DomRoot;
use dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
pub struct PeriodicWave {
reflector_: Reflector,
}
impl PeriodicWave {
pub fn new_inherited() -> PeriodicWave {
PeriodicWave {
reflector_: Reflector::new(),
}
}
#[allow(unrooted_must_root)]
pub fn new(window: &Window) -> DomRoot<PeriodicWave> {
let periodic_wave = PeriodicWave::new_inherited();
reflect_dom_object(Box::new(periodic_wave), window, PeriodicWaveBinding::Wrap)
}
pub fn Constructor(
window: &Window,
_context: &BaseAudioContext,
_options: &PeriodicWaveOptions,
) -> Fallible<DomRoot<PeriodicWave>> {
// TODO.
Ok(PeriodicWave::new(&window))
}
}

View file

@ -18,7 +18,7 @@ dictionary OscillatorOptions : AudioNodeOptions {
OscillatorType type = "sine";
float frequency = 440;
float detune = 0;
PeriodicWave periodicWave;
// PeriodicWave periodicWave;
};
[Exposed=Window,

View file

@ -1,21 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* The origin of this IDL file is
* https://webaudio.github.io/web-audio-api/#periodicwave
*/
dictionary PeriodicWaveConstraints {
boolean disableNormalization = false;
};
dictionary PeriodicWaveOptions : PeriodicWaveConstraints {
sequence<float> real;
sequence<float> imag;
};
[Exposed=Window,
Constructor(BaseAudioContext context, optional PeriodicWaveOptions options)]
interface PeriodicWave {
};