Update Exception handling in WebAudio.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jul 2013 09:59:33 +0000 (09:59 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jul 2013 09:59:33 +0000 (09:59 +0000)
commit7949a53f8fa8d3bd626e465033f3e98c19a688f8
treeba31faffa295fcd99529a8776c7da8c0607d834c
parent9ef8aa27245d145bd1a8830b51c8d4eee6c51a0a
Update Exception handling in WebAudio.
https://bugs.webkit.org/show_bug.cgi?id=118405.

Patch by Praveen R Jadhav <praveen.j@samsung.com> on 2013-07-09
Reviewed by Chris Rogers.

Source/WebCore:

AudioBufferSourceNode, OscillatorNode and AnalyserNode don't
propagate exception mentioned in WebAudio spec.
Code updated to throw DOM exception as expected.

Tests: webaudio/analyser-exception.html
       webaudio/audiobuffersource-exception.html

* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::setFftSize):
(WebCore::AnalyserNode::setMinDecibels):
(WebCore::AnalyserNode::setMaxDecibels):
(WebCore::AnalyserNode::setSmoothingTimeConstant):
* Modules/webaudio/AnalyserNode.h:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::startGrain):
(WebCore::AudioBufferSourceNode::noteGrainOn):
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createBuffer):
(WebCore::AudioContext::createScriptProcessor):
(WebCore::AudioContext::createPeriodicWave):
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::start):
(WebCore::AudioScheduledSourceNode::stop):
(WebCore::AudioScheduledSourceNode::noteOn):
(WebCore::AudioScheduledSourceNode::noteOff):
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/OscillatorNode.idl:

LayoutTests:

New test cases to check exception handling in AnalyserNode and
AudioBufferSourceNode.

* webaudio/analyser-exception-expected.txt: Added.
* webaudio/analyser-exception.html: Added.
* webaudio/audiobuffersource-exception-expected.txt: Added.
* webaudio/audiobuffersource-exception.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/webaudio/analyser-exception-expected.txt [new file with mode: 0644]
LayoutTests/webaudio/analyser-exception.html [new file with mode: 0644]
LayoutTests/webaudio/audiobuffersource-exception-expected.txt [new file with mode: 0644]
LayoutTests/webaudio/audiobuffersource-exception.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AnalyserNode.cpp
Source/WebCore/Modules/webaudio/AnalyserNode.h
Source/WebCore/Modules/webaudio/AnalyserNode.idl
Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h
Source/WebCore/Modules/webaudio/AudioBufferSourceNode.idl
Source/WebCore/Modules/webaudio/AudioContext.cpp
Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp
Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h
Source/WebCore/Modules/webaudio/OscillatorNode.idl