Changeset 89789 in webkit


Ignore:
Timestamp:
Jun 26, 2011 11:49:16 PM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-06-26 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Remove LegacyDefaultOptionalArguments from WebAudio IDL files
https://bugs.webkit.org/show_bug.cgi?id=63416

WebAudio isn't that widely used, so it's seems somewhat safe to remove
legacy code generation hacks. I'm not an expert on WebAudio, but the
API doesn't appear to need many optional arguments.

There are a bunch of APIs that have custom bindings that look like they
could be autogenerated. I've added FIXME comments where appropriate.

  • webaudio/AudioBuffer.idl:
  • webaudio/AudioContext.idl:
  • webaudio/AudioListener.idl:
  • webaudio/AudioNode.idl:
  • webaudio/AudioPannerNode.idl:
  • webaudio/AudioParam.idl:
  • webaudio/RealtimeAnalyserNode.idl:
Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r89787 r89789  
     12011-06-26  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Remove LegacyDefaultOptionalArguments from WebAudio IDL files
     6        https://bugs.webkit.org/show_bug.cgi?id=63416
     7
     8        WebAudio isn't that widely used, so it's seems somewhat safe to remove
     9        legacy code generation hacks.  I'm not an expert on WebAudio, but the
     10        API doesn't appear to need many optional arguments.
     11
     12        There are a bunch of APIs that have custom bindings that look like they
     13        could be autogenerated.  I've added FIXME comments where appropriate.
     14
     15        * webaudio/AudioBuffer.idl:
     16        * webaudio/AudioContext.idl:
     17        * webaudio/AudioListener.idl:
     18        * webaudio/AudioNode.idl:
     19        * webaudio/AudioPannerNode.idl:
     20        * webaudio/AudioParam.idl:
     21        * webaudio/RealtimeAnalyserNode.idl:
     22
    1232011-06-26  Yury Semikhatsky  <yurys@chromium.org>
    224
  • trunk/Source/WebCore/webaudio/AudioBuffer.idl

    r89148 r89789  
    2929module audio {
    3030    interface [
    31         LegacyDefaultOptionalArguments,
    3231        Conditional=WEB_AUDIO
    3332    ] AudioBuffer {
  • trunk/Source/WebCore/webaudio/AudioContext.idl

    r89478 r89789  
    2626module webaudio {
    2727    interface [
    28         LegacyDefaultOptionalArguments,
    2928        Conditional=WEB_AUDIO,
    3029        ActiveDOMObject,
     
    4948        readonly attribute AudioListener listener;
    5049
     50        // FIXME: Switch from [Custom] to using IDL overloads.
    5151        // AudioBuffer createBuffer(in unsigned long numberOfChannels, in unsigned long numberOfFrames, in float sampleRate);
    5252        // AudioBuffer createBuffer(in ArrayBuffer buffer, in boolean mixToMono);
    5353        [Custom] AudioBuffer createBuffer()
    5454            raises(DOMException);
    55            
     55
    5656        // Asynchronous audio file data decoding.
    5757        void decodeAudioData(in ArrayBuffer audioData, in [Callback] AudioBufferCallback successCallback, in [Optional, Callback] AudioBufferCallback errorCallback)
     
    7676        AudioChannelSplitter createChannelSplitter();
    7777        AudioChannelMerger createChannelMerger();
    78        
     78
    7979        // Offline rendering
    8080        // void prepareOfflineBufferRendering(in unsigned long numberOfChannels, in unsigned long numberOfFrames, in float sampleRate);
    8181        attribute EventListener oncomplete;
    8282        void startRendering();
    83        
    8483    };
    8584}
  • trunk/Source/WebCore/webaudio/AudioListener.idl

    r89148 r89789  
    2929module audio {
    3030    interface [
    31         LegacyDefaultOptionalArguments,
    3231        Conditional=WEB_AUDIO
    3332    ] AudioListener {
  • trunk/Source/WebCore/webaudio/AudioNode.idl

    r89148 r89789  
    2525module audio {
    2626    interface [
    27         LegacyDefaultOptionalArguments,
    2827        Conditional=WEB_AUDIO
    2928    ] AudioNode {
     
    3231        readonly attribute unsigned long numberOfOutputs;
    3332
    34         [Custom] void connect(in AudioNode destination, in unsigned long output, in unsigned long input)
     33        // FIXME: Why does this method need to be Custom?
     34        [Custom] void connect(in AudioNode destination, in [Optional] unsigned long output, in [Optional] unsigned long input)
    3535            raises(DOMException);
    3636
    37         [Custom] void disconnect(in unsigned long output)
     37        // FIXME: Why does this method need to be Custom?
     38        [Custom] void disconnect(in [Optional] unsigned long output)
    3839            raises(DOMException);
    3940    };
  • trunk/Source/WebCore/webaudio/AudioPannerNode.idl

    r89148 r89789  
    2525module audio {
    2626    interface [
    27         LegacyDefaultOptionalArguments,
    2827        Conditional=WEB_AUDIO,
    2928        GenerateConstructor,
  • trunk/Source/WebCore/webaudio/AudioParam.idl

    r89148 r89789  
    2929module webaudio {
    3030    interface [
    31         LegacyDefaultOptionalArguments,
    3231        Conditional=WEB_AUDIO
    3332    ] AudioParam {
     
    3635        readonly attribute float maxValue;
    3736        readonly attribute float defaultValue;
    38        
     37
    3938        readonly attribute DOMString name;
    4039
    4140        // FIXME: Could define units constants here (seconds, decibels, cents, etc.)...
    4241        readonly attribute unsigned short units;
    43        
     42
    4443        // Parameter automation.
    4544        void setValueAtTime(in float value, in float time);
     
    5352        // The number of values will be scaled to fit into the desired duration.
    5453        void setValueCurveAtTime(in Float32Array values, in float time, in float duration);
    55        
     54
    5655        // Cancels all scheduled parameter changes with times greater than or equal to startTime.
    5756        void cancelScheduledValues(in float startTime);
    58 
    5957    };
    6058}
  • trunk/Source/WebCore/webaudio/RealtimeAnalyserNode.idl

    r89148 r89789  
    2525module audio {
    2626    interface [
    27         LegacyDefaultOptionalArguments,
    2827        Conditional=WEB_AUDIO,
    2928        GenerateToJS
     
    3534        attribute float minDecibels;
    3635        attribute float maxDecibels;
    37        
     36
    3837        // A value from 0.0 -> 1.0 where 0.0 represents no time averaging with the last analysis frame.
    3938        attribute float smoothingTimeConstant;
    40        
     39
    4140        // Copies the current frequency data into the passed array.
    4241        // If the array has fewer elements than the frequencyBinCount, the excess elements will be dropped.
Note: See TracChangeset for help on using the changeset viewer.