Mute MediaElementSourceNode when tainted.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 May 2018 21:32:03 +0000 (21:32 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 May 2018 21:32:03 +0000 (21:32 +0000)
commitfc850c9c0a3b8a9b54fa8e79f1d4a02e2ade1d5a
treeca1d028619e0b58027ea653b8112298ce9ff08ea
parente55f469aa5c4a790bb823dc1e7031e1cc2fc9b3d
Mute MediaElementSourceNode when tainted.
https://bugs.webkit.org/show_bug.cgi?id=184866

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin.html

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::wouldTaintOrigin const):
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::setFormat):
(WebCore::MediaElementAudioSourceNode::wouldTaintOrigin):
(WebCore::MediaElementAudioSourceNode::process):
* Modules/webaudio/MediaElementAudioSourceNode.h:

LayoutTests:

* http/tests/media/resources/1000Hz-sin.wav: Added.
* http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-expected.txt: Added.
* http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html: Added.
* http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-expected.txt: Added.
* http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/media/resources/1000Hz-sin.wav [new file with mode: 0644]
LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html [new file with mode: 0644]
LayoutTests/http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AudioContext.cpp
Source/WebCore/Modules/webaudio/AudioContext.h
Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.cpp
Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.h