Changeset 267532 in webkit
- Timestamp:
- Sep 24, 2020, 8:23:28 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
- 2 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect-expected.txt (added)
-
LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html (copied) (copied from trunk/LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html ) (2 diffs)
-
LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html (modified) (1 diff)
-
LayoutTests/http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-redirect-expected.txt (added)
-
LayoutTests/http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-redirect.html (copied) (copied from trunk/LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html ) (3 diffs)
-
LayoutTests/platform/win/TestExpectations (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r267531 r267532 1 2020-09-24 Chris Dumez <cdumez@apple.com> 2 3 web audio api outputs silence for 302 redirected resource in safari 4 https://bugs.webkit.org/show_bug.cgi?id=214932 5 <rdar://problem/66300050> 6 7 Reviewed by Darin Adler. 8 9 Add layout test coverage. Update existing test to reflect the fact that the frequency returned by 10 the AnalyserNode is -Infinity when input is silent, not minDecibels (this has changed fairly 11 recently). 12 13 * http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect-expected.txt: Added. 14 * http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html: Copied from LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html. 15 * http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html: 16 * http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-redirect-expected.txt: Added. 17 * http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-redirect.html: Copied from LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html. 18 1 19 2020-09-24 Frederic Wang <fwang@igalia.com> 2 20 -
trunk/LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html
r267531 r267532 16 16 let mediaFile = findMediaFile("audio", "../../media/resources/1000Hz-sin"); 17 17 let type = mimeTypeForExtension(mediaFile.split('.').pop()); 18 audio.src = "http://localhost:8080/security/resources/ video-cross-origin-allow.php?name=" + mediaFile + "&type=" + type;18 audio.src = "http://localhost:8080/security/resources/redirect-allow-star.php?url=" + encodeURIComponent("http://127.0.0.1:8080/security/resources/video-cross-origin-allow.php?name=" + mediaFile + "&type=" + type); 19 19 20 20 context = new AudioContext(); … … 31 31 window.outputArray = new Float32Array(analyser.frequencyBinCount); 32 32 window.silentArray = new Float32Array(analyser.frequencyBinCount); 33 silentArray.fill( analyser.minDecibels);33 silentArray.fill(-Infinity); 34 34 35 35 var intervalToken = setInterval(() => { -
trunk/LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html
r267525 r267532 31 31 window.outputArray = new Float32Array(analyser.frequencyBinCount); 32 32 window.silentArray = new Float32Array(analyser.frequencyBinCount); 33 silentArray.fill( analyser.minDecibels);33 silentArray.fill(-Infinity); 34 34 35 35 var intervalToken = setInterval(() => { -
trunk/LayoutTests/http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-redirect.html
r267531 r267532 8 8 <pre id="console"></pre> 9 9 <script> 10 description("Ensure that audio is rendered when tainted by a remote audio resource when CORS isenabled.");10 description("Ensure that audio is not rendered when tainted by a remote audio resource when CORS is not enabled."); 11 11 window.jsTestIsAsync = true; 12 12 13 13 function go() { 14 14 let audio = new Audio(); 15 audio.crossOrigin = "anonymous";16 15 let mediaFile = findMediaFile("audio", "../../media/resources/1000Hz-sin"); 17 16 let type = mimeTypeForExtension(mediaFile.split('.').pop()); 18 audio.src = "http://localhost:8080/security/resources/ video-cross-origin-allow.php?name=" + mediaFile + "&type=" + type;17 audio.src = "http://localhost:8080/security/resources/redirect-allow-star.php?url=" + encodeURIComponent("http://127.0.0.1:8080/security/resources/video-cross-origin-allow.php?name=" + mediaFile + "&type=" + type); 19 18 20 19 context = new AudioContext(); … … 31 30 window.outputArray = new Float32Array(analyser.frequencyBinCount); 32 31 window.silentArray = new Float32Array(analyser.frequencyBinCount); 33 silentArray.fill( analyser.minDecibels);32 silentArray.fill(-Infinity); 34 33 35 34 var intervalToken = setInterval(() => { … … 40 39 clearInterval(intervalToken); 41 40 context.suspend().then(() => { 42 should NotBe("outputArray", "silentArray");41 shouldBe("outputArray", "silentArray"); 43 42 finishJSTest(); 44 43 }); -
trunk/LayoutTests/platform/win/TestExpectations
r267472 r267532 530 530 webkit.org/b/86914 fast/history/page-cache-suspended-audiocontext.html [ Skip ] 531 531 webkit.org/b/86914 media/W3C/audio [ Skip ] 532 webkit.org/b/86914 http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html [ Skip ] 533 webkit.org/b/86914 http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin.html [ Skip ] 534 webkit.org/b/86914 http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html [ Skip ] 535 webkit.org/b/86914 http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-redirect.html [ Skip ] 532 536 533 537 # ENABLE(DRAGGABLE_REGION) is disabled … … 4019 4023 webkit.org/b/185075 css3/color-filters/color-filter-text-emphasis.html [ ImageOnlyFailure ] 4020 4024 4021 webkit.org/b/185471 http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html [ Skip ]4022 webkit.org/b/185471 http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin.html [ Skip ]4023 4024 4025 webkit.org/b/185765 fast/images/animated-image-mp4-crash.html [ Skip ] 4025 4026 -
trunk/Source/WebCore/ChangeLog
r267530 r267532 1 2020-09-24 Chris Dumez <cdumez@apple.com> 2 3 web audio api outputs silence for 302 redirected resource in safari 4 https://bugs.webkit.org/show_bug.cgi?id=214932 5 <rdar://problem/66300050> 6 7 Reviewed by Darin Adler. 8 9 If the resource is redirected to another origin, treat it as tainted only if the crossorigin attribute 10 is not set. This is done for consistency with Blink: 11 - https://github.com/chromium/chromium/blob/master/media/blink/webmediaplayer_impl.cc (see WouldTaintOrigin()) 12 13 The new behavior also seems to match Firefox. 14 15 Tests: http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html 16 http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-redirect.html 17 18 * Modules/webaudio/MediaElementAudioSourceNode.cpp: 19 (WebCore::MediaElementAudioSourceNode::wouldTaintOrigin): 20 1 21 2020-09-24 Youenn Fablet <youenn@apple.com> 2 22 -
trunk/Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.cpp
r267525 r267532 124 124 bool MediaElementAudioSourceNode::wouldTaintOrigin() 125 125 { 126 if (!m_mediaElement->hasSingleSecurityOrigin()) 126 // If the resource is redirected to another origin, treat it as tainted if the crossorigin attribute 127 // is not set. This is done for consistency with Blink. 128 if (!m_mediaElement->hasSingleSecurityOrigin() && m_mediaElement->crossOrigin().isNull()) 127 129 return true; 128 130
Note:
See TracChangeset
for help on using the changeset viewer.