summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/html/HTMLMediaElement.cpp
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2012-07-18 15:39:53 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2012-07-18 15:53:28 -0700
commitad46784d9075ff6d1e11cd2be47a6169761b0eeb (patch)
tree64006c7367e689eb4a4e66fe8500348b1fca1fa1 /Source/WebCore/html/HTMLMediaElement.cpp
parentd12967fd535d36a592841c6c4bb112bd94092b3c (diff)
downloadexternal_webkit-ad46784d9075ff6d1e11cd2be47a6169761b0eeb.zip
external_webkit-ad46784d9075ff6d1e11cd2be47a6169761b0eeb.tar.gz
external_webkit-ad46784d9075ff6d1e11cd2be47a6169761b0eeb.tar.bz2
add webSetting API to allow media play without user gesture
bug:6806306 This also include partial change from webkit. http://trac.webkit.org/changeset/91232 Framework change: https://android-git.corp.google.com/g/#/c/208569/ Change-Id: I1a843472c0ce3b01bcad3b7c3c12c93702f2970c
Diffstat (limited to 'Source/WebCore/html/HTMLMediaElement.cpp')
-rw-r--r--Source/WebCore/html/HTMLMediaElement.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp
index d25bada..693f214 100644
--- a/Source/WebCore/html/HTMLMediaElement.cpp
+++ b/Source/WebCore/html/HTMLMediaElement.cpp
@@ -185,9 +185,9 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document* docum
document->registerForDocumentActivationCallbacks(this);
document->registerForMediaVolumeCallbacks(this);
document->registerForPrivateBrowsingStateChangedCallbacks(this);
-#if PLATFORM(ANDROID) && ENABLE(TOUCH_EVENTS)
- m_restrictions |= RequireUserGestureForRateChangeRestriction;
-#endif
+
+ if (document->settings() && document->settings()->mediaPlaybackRequiresUserGesture())
+ m_restrictions |= RequireUserGestureForRateChangeRestriction;
}
HTMLMediaElement::~HTMLMediaElement()