AudioBufferSourceNode start method causes OfflineAudioContext to start running
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2018 15:40:20 +0000 (15:40 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2018 15:40:20 +0000 (15:40 +0000)
commitd9076757387c94969e30b89877b0f1efa36b7d2e
treeb05a6b694d78443f27a25441c176a3f3467f34a9
parent0a1623b69e14585807d671f125a899cb6ab924dd
AudioBufferSourceNode start method causes OfflineAudioContext to start running
https://bugs.webkit.org/show_bug.cgi?id=181939
<rdar://problem/36755393>

Reviewed by Eric Carlson.

Source/WebCore:

Test: webaudio/offlineaudiocontext-restriction.html

Don't respect playback restrictions for offline AudioContexts.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::constructCommon):
* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::isOfflineContext const):
(WebCore::AudioContext::userGestureRequiredForAudioStart const):
(WebCore::AudioContext::pageConsentRequiredForAudioStart const):
(WebCore::AudioContext::isOfflineContext): Deleted.

LayoutTests:

* webaudio/offlineaudiocontext-restriction-expected.txt: Added.
* webaudio/offlineaudiocontext-restriction.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webaudio/offlineaudiocontext-restriction-expected.txt [new file with mode: 0644]
LayoutTests/webaudio/offlineaudiocontext-restriction.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AudioContext.cpp
Source/WebCore/Modules/webaudio/AudioContext.h