Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Issue 2314903002: Web Audio: when media playback requires a user gesture, apply rule to cross origin iframes. (Closed)

Created:
4 years, 3 months ago by mlamouri (slow - plz ping)
Modified:
4 years, 2 months ago
CC:
asvitkine+watch_chromium.org, blink-reviews, chromium-reviews, haraken
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Web Audio: when media playback requires a user gesture, apply rule to cross origin iframes. This is an intervention: do not allow cross origin iframes to use Web Audio without a user gesture. In practice that means that the AudioContext will start rendering only if it was "unlocked". Intent to Intervene: https://groups.google.com/a/chromium.org/d/msg/blink-dev/51WbTwn0M_Y/VZuwn8-VAAAJ This is applying the changes discussed at TPAC and summarised here: https://github.com/WebAudio/web-audio-api/issues/836 BUG=614115 Committed: https://crrev.com/b121dd8b9380574db8d6ebee851c1dfd61369cda Cr-Commit-Position: refs/heads/master@{#422112}

Patch Set 1 #

Total comments: 8

Patch Set 2 : #

Total comments: 2

Patch Set 3 : fix compile #

Patch Set 4 : apply changes from TPAC discussion #

Total comments: 15

Patch Set 5 : review comments #

Patch Set 6 : review comments #

Patch Set 7 : rebase #

Patch Set 8 : rebase for real #

Patch Set 9 : re-use click target #

Patch Set 10 : rebase #

Patch Set 11 : move click simulation to top frame #

Messages

Total messages: 63 (27 generated)
mlamouri (slow - plz ping)
rtoy: please review the webaudio/ changes. foolip: please review the Blink changes. isherman: please review ...
4 years, 3 months ago (2016-09-07 13:05:57 UTC) #3
Raymond Toy
Note that I'm opposed to landing this at this time. The spec change issue (https://github.com/WebAudio/web-audio-api/issues/836) ...
4 years, 3 months ago (2016-09-07 16:13:19 UTC) #8
hongchan
Can we just make this as one-time check on the context level? Checking if the ...
4 years, 3 months ago (2016-09-07 16:59:00 UTC) #10
Ilya Sherman
histograms.xml lgtm
4 years, 3 months ago (2016-09-07 18:05:56 UTC) #11
foolip
third_party/WebKit/Source/core/frame/Deprecation.cpp lgtm, but leaving the rest to rtoy@
4 years, 3 months ago (2016-09-07 19:31:39 UTC) #12
mlamouri (slow - plz ping)
hongchan@, I can't have the gesture check only in the constructor. This wouldn't be compatible ...
4 years, 3 months ago (2016-09-08 13:12:42 UTC) #13
mlamouri (slow - plz ping)
> Also you worked on AudioBufferSourceNode, but left out OscillatorNode. I think fixing > AudioScheduledSourceNode ...
4 years, 3 months ago (2016-09-08 13:37:27 UTC) #14
Raymond Toy
Please fix the compiler errors too. https://codereview.chromium.org/2314903002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp File third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp (right): https://codereview.chromium.org/2314903002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp#newcode451 third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp:451: context()->startRenderingIfNeeded(); If we ...
4 years, 3 months ago (2016-09-08 20:03:33 UTC) #15
mlamouri (slow - plz ping)
PTAL https://codereview.chromium.org/2314903002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp File third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp (right): https://codereview.chromium.org/2314903002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp#newcode451 third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp:451: context()->startRenderingIfNeeded(); On 2016/09/08 at 20:03:33, Raymond Toy wrote: ...
4 years, 3 months ago (2016-09-12 17:26:29 UTC) #16
Raymond Toy
On 2016/09/12 17:26:29, mlamouri wrote: > PTAL > > https://codereview.chromium.org/2314903002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp > File third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp > (right): ...
4 years, 3 months ago (2016-09-12 18:07:47 UTC) #17
mlamouri (slow - plz ping)
On 2016/09/12 at 18:07:47, rtoy wrote: > On 2016/09/12 17:26:29, mlamouri wrote: > > PTAL ...
4 years, 3 months ago (2016-09-13 15:49:20 UTC) #18
Raymond Toy
On 2016/09/13 15:49:20, mlamouri wrote: > On 2016/09/12 at 18:07:47, rtoy wrote: > > On ...
4 years, 3 months ago (2016-09-13 16:00:50 UTC) #19
hongchan
On 2016/09/13 16:00:50, Raymond Toy wrote: > On 2016/09/13 15:49:20, mlamouri wrote: > > On ...
4 years, 3 months ago (2016-09-13 16:43:26 UTC) #20
hongchan
On 2016/09/13 16:43:26, hoch wrote: > On 2016/09/13 16:00:50, Raymond Toy wrote: > > On ...
4 years, 3 months ago (2016-09-13 16:49:55 UTC) #21
mlamouri (slow - plz ping)
On 2016/09/13 at 16:00:50, rtoy wrote: > On 2016/09/13 15:49:20, mlamouri wrote: > > On ...
4 years, 3 months ago (2016-09-13 17:01:19 UTC) #22
hongchan
On 2016/09/13 17:01:19, mlamouri wrote: > On 2016/09/13 at 16:00:50, rtoy wrote: > > On ...
4 years, 3 months ago (2016-09-13 17:46:09 UTC) #23
Raymond Toy
On 2016/09/13 17:01:19, mlamouri wrote: > On 2016/09/13 at 16:00:50, rtoy wrote: > > On ...
4 years, 3 months ago (2016-09-13 17:59:40 UTC) #24
mlamouri (slow - plz ping)
rtoy@, PTAL
4 years, 2 months ago (2016-09-24 14:52:53 UTC) #26
Raymond Toy
Don't forget to add TEST= to the description. Look good overall, but I have some ...
4 years, 2 months ago (2016-09-26 16:09:54 UTC) #27
mlamouri (slow - plz ping)
PTAL https://codereview.chromium.org/2314903002/diff/60001/third_party/WebKit/LayoutTests/http/tests/webaudio/resources/autoplay-crossorigin-iframe.html File third_party/WebKit/LayoutTests/http/tests/webaudio/resources/autoplay-crossorigin-iframe.html (right): https://codereview.chromium.org/2314903002/diff/60001/third_party/WebKit/LayoutTests/http/tests/webaudio/resources/autoplay-crossorigin-iframe.html#newcode38 third_party/WebKit/LayoutTests/http/tests/webaudio/resources/autoplay-crossorigin-iframe.html:38: // Calling 'start()' will fail to start on ...
4 years, 2 months ago (2016-09-26 17:01:24 UTC) #28
Raymond Toy
https://codereview.chromium.org/2314903002/diff/60001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (right): https://codereview.chromium.org/2314903002/diff/60001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#newcode105 third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp:105: // If mediaPlaybackRequiresUserGesture is enabled, cross origin iframes will ...
4 years, 2 months ago (2016-09-26 17:24:39 UTC) #29
mlamouri (slow - plz ping)
PTAL https://codereview.chromium.org/2314903002/diff/60001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (right): https://codereview.chromium.org/2314903002/diff/60001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#newcode105 third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp:105: // If mediaPlaybackRequiresUserGesture is enabled, cross origin iframes ...
4 years, 2 months ago (2016-09-27 14:11:15 UTC) #30
Raymond Toy
lgtm https://codereview.chromium.org/2314903002/diff/60001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (right): https://codereview.chromium.org/2314903002/diff/60001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#newcode105 third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp:105: // If mediaPlaybackRequiresUserGesture is enabled, cross origin iframes ...
4 years, 2 months ago (2016-09-28 16:13:47 UTC) #31
mlamouri (slow - plz ping)
Thanks for the review! https://codereview.chromium.org/2314903002/diff/60001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (right): https://codereview.chromium.org/2314903002/diff/60001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#newcode105 third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp:105: // If mediaPlaybackRequiresUserGesture is enabled, ...
4 years, 2 months ago (2016-09-28 16:17:25 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2314903002/100001
4 years, 2 months ago (2016-09-28 16:17:42 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/276213)
4 years, 2 months ago (2016-09-28 16:20:25 UTC) #37
Raymond Toy
On 2016/09/28 16:17:25, mlamouri (slow) wrote: > Thanks for the review! > > https://codereview.chromium.org/2314903002/diff/60001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp > ...
4 years, 2 months ago (2016-09-28 16:23:47 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2314903002/120001
4 years, 2 months ago (2016-09-28 16:34:36 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/207110)
4 years, 2 months ago (2016-09-28 16:44:14 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2314903002/140001
4 years, 2 months ago (2016-09-28 17:45:48 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/304424)
4 years, 2 months ago (2016-09-28 19:24:52 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2314903002/160001
4 years, 2 months ago (2016-09-28 20:06:51 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/304541)
4 years, 2 months ago (2016-09-28 22:14:13 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2314903002/200001
4 years, 2 months ago (2016-09-30 13:29:52 UTC) #60
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 2 months ago (2016-09-30 14:58:49 UTC) #61
commit-bot: I haz the power
4 years, 2 months ago (2016-09-30 15:04:55 UTC) #63
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/b121dd8b9380574db8d6ebee851c1dfd61369cda
Cr-Commit-Position: refs/heads/master@{#422112}

Powered by Google App Engine
This is Rietveld 408576698