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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 1850903002: Enable user gesture requirement for autoplay experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index e6e83de80c7d6ba991bc7befd8f67045fe532b17..b72d17d53551adfcc9b58d6501a234a8c6442017 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -428,8 +428,12 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum
WTF_LOG(Media, "HTMLMediaElement::HTMLMediaElement(%p)", this);
- if (document.settings() && document.settings()->mediaPlaybackRequiresUserGesture())
+ // If any experiment is enabled, then we want to enable a user gesture by
+ // default, else the experiment does nothing.
philipj_slow 2016/04/05 11:17:51 s/else/otherwise/
liberato (no reviews please) 2016/04/25 22:38:44 Done.
+ if ((document.settings() && document.settings()->mediaPlaybackRequiresUserGesture())
philipj_slow 2016/04/05 11:17:51 Can't the same code that enables the experiment al
mlamouri (slow - plz ping) 2016/04/21 17:11:35 They are fairly close: https://code.google.com/p/c
liberato (no reviews please) 2016/04/25 22:38:44 in PS{2,3}, i've left it as-is to avoid parsing th
liberato (no reviews please) 2016/04/25 22:38:44 the experiment is enabled by copying the string ar
+ || m_autoplayHelper->isExperimentEnabled()) {
m_userGestureRequiredForPlay = true;
+ }
setHasCustomStyleCallbacks();
addElementToDocumentMap(this, &document);
« no previous file with comments | « third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698