Title: [203473] trunk/Source/WebCore
Revision
203473
Author
wenson_hs...@apple.com
Date
2016-07-20 15:56:08 -0700 (Wed, 20 Jul 2016)

Log Message

Pausing autoplayed media should not remove all restrictions for that media element
https://bugs.webkit.org/show_bug.cgi?id=159988

Reviewed by Jon Lee.

Localizes the removal of behavior restrictions introduced in r203464 upon pausing an
autoplaying video to just affect the hiding or showing of the media controller. This
prevents pages from using _javascript_ to start playing autoplaying videos that have
been paused by the user.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::pause):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (203472 => 203473)


--- trunk/Source/WebCore/ChangeLog	2016-07-20 22:45:02 UTC (rev 203472)
+++ trunk/Source/WebCore/ChangeLog	2016-07-20 22:56:08 UTC (rev 203473)
@@ -1,3 +1,18 @@
+2016-07-20  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        Pausing autoplayed media should not remove all restrictions for that media element
+        https://bugs.webkit.org/show_bug.cgi?id=159988
+
+        Reviewed by Jon Lee.
+
+        Localizes the removal of behavior restrictions introduced in r203464 upon pausing an
+        autoplaying video to just affect the hiding or showing of the media controller. This
+        prevents pages from using _javascript_ to start playing autoplaying videos that have
+        been paused by the user.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::pause):
+
 2016-07-20  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         [iPhone] Playing a video on tudou.com plays only sound, no video

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (203472 => 203473)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-07-20 22:45:02 UTC (rev 203472)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-07-20 22:56:08 UTC (rev 203473)
@@ -3156,7 +3156,7 @@
         return;
 
     if (ScriptController::processingUserGestureForMedia())
-        removeBehaviorsRestrictionsAfterFirstUserGesture();
+        removeBehaviorsRestrictionsAfterFirstUserGesture(MediaElementSession::RequireUserGestureToControlControlsManager);
 
     pauseInternal();
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to