diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2012-02-01 15:16:49 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2012-02-01 15:21:55 -0800 |
commit | b63752ec4203caed474196849226a76c55f06714 (patch) | |
tree | cb44d9307f77447192ff3f0c6f22b341466fb72b | |
parent | a7b12d27ee68ff4de7d56bb494f31bb9ca7c39a0 (diff) | |
download | external_webkit-b63752ec4203caed474196849226a76c55f06714.zip external_webkit-b63752ec4203caed474196849226a76c55f06714.tar.gz external_webkit-b63752ec4203caed474196849226a76c55f06714.tar.bz2 |
Video: make sure the click is from user gesture.
Javascript can simulate a click on video element, we don't want sites to WAR
autoplay in this way.
Change-Id: I7c5074605cce5f867dd675a110282e5a99dca941
-rw-r--r-- | Source/WebCore/html/HTMLMediaElement.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp index ae0571c..5cd2ddd 100644 --- a/Source/WebCore/html/HTMLMediaElement.cpp +++ b/Source/WebCore/html/HTMLMediaElement.cpp @@ -2429,7 +2429,7 @@ void HTMLMediaElement::defaultEventHandler(Event* event) // This allows user to click the video area to toggle play/pause state. if (event->type() == eventNames().clickEvent && !hasEventListeners(eventNames().clickEvent)) { - m_userGestureInitiated = true; + m_userGestureInitiated = processingUserGesture(); togglePlayState(); } #endif |