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

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

Issue 1931363002: Autoplay experiment: ignore viewport visibility requirements for audio. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@autoplay-htmlmedialement
Patch Set: update tests Created 4 years, 7 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
Index: third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp
diff --git a/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp b/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp
index 8c54ab13ba909a26f8eee03461aaef26c51f3bff..9b3db335c44c20a1fd7e9a999e8d10b32ee895b7 100644
--- a/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp
+++ b/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp
@@ -497,7 +497,7 @@ void AutoplayExperimentHelper::loadingStarted()
bool AutoplayExperimentHelper::requiresViewportVisibility() const
{
- return enabled(IfViewport) || enabled(IfPartialViewport);
+ return client().isHTMLVideoElement() && (enabled(IfViewport) || enabled(IfPartialViewport));
}
bool AutoplayExperimentHelper::isExperimentEnabled()

Powered by Google App Engine
This is Rietveld 408576698