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

Issue 2496593002: Adding an experimental flag to block autoplay with sound in cross-origin iframes (Closed)

Created:
4 years, 1 month ago by Zhiqiang Zhang (Slow)
Modified:
4 years ago
CC:
asvitkine+watch_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, eric.carlson_apple.com, feature-media-reviews_chromium.org, fs, gasubic, jam, kinuko+watch, mlamouri+watch-content_chromium.org, mlamouri+watch-blink_chromium.org, nasko+codewatch_chromium.org, nessy, Srirama, vcarbune.chromium, Charlie Reis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding an experimental flag to block autoplay with sound in cross-origin iframes This CL adds an experimental flag to block autoplay with sound in cross-origin iframes on Desktop. The experimental flag is disabled by default, and will override the "MediaPlaybaRequiresUserGesture" flag. Currently, the default behavior is unchanged, and a follow-up CL will collect metrics pretending the flag is on. Design doc: https://docs.google.com/a/google.com/document/d/1g05pahL0py0TSWIDwli1MLJiRuuJoleitl572DGGESs/edit?usp=sharing BUG=665456 Committed: https://crrev.com/df72ed087b3083bdea9b882bf473f8a9f4dc1276 Cr-Commit-Position: refs/heads/master@{#437254}

Patch Set 1 #

Total comments: 2

Patch Set 2 : merging into one string flag #

Patch Set 3 : falling back to adding a boolean flag #

Total comments: 8

Patch Set 4 : added layout tests #

Patch Set 5 : added UMAs for settings flag #

Patch Set 6 : fixed for AutoplayMuted runtime flag #

Patch Set 7 : rebased #

Patch Set 8 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -16 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -1 line 0 comments Download
M content/child/runtime_features.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -1 line 0 comments Download
M content/public/common/common_param_traits_macros.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M content/public/common/content_features.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/common/content_features.cc View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M content/public/common/web_preferences.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M content/public/common/web_preferences.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/media/autoplay-crossorigin.html View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/media/resources/autoplay-crossorigin-iframe.html View 1 2 3 1 chunk +49 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/Settings.in View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 5 6 7 3 chunks +22 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/web/WebSettingsImpl.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebSettingsImpl.cpp View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebSettings.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 56 (29 generated)
Zhiqiang Zhang (Slow)
Just send to you for an initial look. I feel that having "MediaPlaybackRequiresUserGesture" for Android ...
4 years, 1 month ago (2016-11-15 16:16:07 UTC) #4
Zhiqiang Zhang (Slow)
On 2016/11/15 16:16:07, Zhiqiang Zhang wrote: > I'm thinking about merging the two flags into ...
4 years, 1 month ago (2016-11-15 16:20:54 UTC) #5
Zhiqiang Zhang (Slow)
On 2016/11/15 16:20:54, Zhiqiang Zhang wrote: > On 2016/11/15 16:16:07, Zhiqiang Zhang wrote: > > ...
4 years, 1 month ago (2016-11-16 11:23:23 UTC) #6
whywhat
https://codereview.chromium.org/2496593002/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2496593002/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode479 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:479: (document.settings() && isCrossOrigin(document) && is it this that you ...
4 years, 1 month ago (2016-11-16 17:37:17 UTC) #8
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2496593002/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2496593002/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode479 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:479: (document.settings() && isCrossOrigin(document) && On 2016/11/16 17:37:17, whywhat wrote: ...
4 years, 1 month ago (2016-11-16 18:11:41 UTC) #9
Zhiqiang Zhang (Slow)
PTAL I've made several attempts and found the current situation is quite annoying - the ...
4 years, 1 month ago (2016-11-17 17:41:49 UTC) #12
Zhiqiang Zhang (Slow)
PTAL Sorry I switched between different solutions back and forth. Mounir is right, we should ...
4 years, 1 month ago (2016-11-17 22:01:20 UTC) #13
mlamouri (slow - plz ping)
l2tm but this is missing tests :) https://codereview.chromium.org/2496593002/diff/80001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/2496593002/diff/80001/chrome/app/generated_resources.grd#newcode5862 chrome/app/generated_resources.grd:5862: + Gesture ...
4 years, 1 month ago (2016-11-18 14:33:10 UTC) #14
Zhiqiang Zhang (Slow)
PTAL https://codereview.chromium.org/2496593002/diff/80001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/2496593002/diff/80001/chrome/app/generated_resources.grd#newcode5862 chrome/app/generated_resources.grd:5862: + Gesture requirement for media playback in cross-origin ...
4 years, 1 month ago (2016-11-21 18:06:23 UTC) #23
whywhat
lgtm Seems like Mounir already tried to lgtm with l2tm (or is it a new ...
4 years, 1 month ago (2016-11-21 18:54:15 UTC) #24
Zhiqiang Zhang (Slow)
On 2016/11/21 18:54:15, whywhat wrote: > lgtm > > Seems like Mounir already tried to ...
4 years, 1 month ago (2016-11-21 20:39:22 UTC) #25
Zhiqiang Zhang (Slow)
+foolip: WebKit/ (we are aware that sites (esp. ads) will be broken if the flag ...
4 years ago (2016-11-29 16:11:25 UTC) #29
pfeldman
Could you point to intent to implement?
4 years ago (2016-11-29 19:24:16 UTC) #30
Zhiqiang Zhang (Slow)
On 2016/11/29 19:24:16, pfeldman wrote: > Could you point to intent to implement? I updated ...
4 years ago (2016-11-29 20:53:29 UTC) #32
Ilya Sherman
histograms.xml lgtm
4 years ago (2016-11-29 21:08:42 UTC) #33
palmer
lgtm
4 years ago (2016-11-30 01:38:19 UTC) #34
mlamouri (slow - plz ping)
lgtm
4 years ago (2016-11-30 10:14:43 UTC) #35
foolip
rs lgtm
4 years ago (2016-11-30 10:16:51 UTC) #36
Zhiqiang Zhang (Slow)
Ping! pfeldman, can you take a look? On 2016/11/29 20:53:29, Zhiqiang Zhang wrote: > On ...
4 years ago (2016-12-05 15:30:23 UTC) #37
pfeldman
lgtm
4 years ago (2016-12-06 19:58:32 UTC) #38
dglazkov
On 2016/11/29 at 20:53:29, zqzhang wrote: > On 2016/11/29 19:24:16, pfeldman wrote: > > Could ...
4 years ago (2016-12-06 20:12:41 UTC) #39
Zhiqiang Zhang (Slow)
On 2016/12/06 20:12:41, dglazkov wrote: > On 2016/11/29 at 20:53:29, zqzhang wrote: > > On ...
4 years ago (2016-12-06 21:25:30 UTC) #40
Zhiqiang Zhang (Slow)
On 2016/12/06 21:25:30, Zhiqiang Zhang wrote: > On 2016/12/06 20:12:41, dglazkov wrote: > > On ...
4 years ago (2016-12-08 15:29:05 UTC) #46
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/2496593002/180001
4 years ago (2016-12-08 15:29:41 UTC) #49
commit-bot: I haz the power
Committed patchset #8 (id:180001)
4 years ago (2016-12-08 16:08:31 UTC) #52
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/df72ed087b3083bdea9b882bf473f8a9f4dc1276 Cr-Commit-Position: refs/heads/master@{#437254}
4 years ago (2016-12-08 16:10:31 UTC) #54
Charlie Reis
4 years ago (2016-12-08 19:30:07 UTC) #55
Message was sent while issue was closed.
On 2016/12/08 16:10:31, commit-bot: I haz the power wrote:
> Patchset 8 (id:??) landed as
> https://crrev.com/df72ed087b3083bdea9b882bf473f8a9f4dc1276
> Cr-Commit-Position: refs/heads/master@{#437254}

Note: A new test from this CL is failing on the Site Isolation Linux FYI bot. 
Please see https://crbug.com/672570.

Powered by Google App Engine
This is Rietveld 408576698