Title: [190475] branches/safari-601.1.46-branch/Source/WebCore

Diff

Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (190474 => 190475)


--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2015-10-02 08:11:38 UTC (rev 190474)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2015-10-02 08:12:52 UTC (rev 190475)
@@ -1,5 +1,28 @@
 2015-10-02  Babak Shafiei  <[email protected]>
 
+        Merge r190327.
+
+    2015-09-29  Jer Noble  <[email protected]>
+
+            REGRESSION: WebAudio user-gesture restriction is no longer lifted by touchstart event
+            https://bugs.webkit.org/show_bug.cgi?id=149367
+
+            Reviewed by Eric Carlson.
+
+            Use processingUserGestureForMedia() rather than processingUserGesture(),
+            as the former includes touchstart and the latter does not.
+
+            * Modules/webaudio/AudioContext.cpp:
+            (WebCore::AudioContext::willBeginPlayback):
+            (WebCore::AudioContext::willPausePlayback):
+            * html/MediaElementSession.cpp:
+            (WebCore::MediaElementSession::playbackPermitted):
+            (WebCore::MediaElementSession::dataLoadingPermitted):
+            (WebCore::MediaElementSession::fullscreenPermitted):
+            (WebCore::MediaElementSession::showPlaybackTargetPicker):
+
+2015-10-02  Babak Shafiei  <[email protected]>
+
         Merge r189560.
 
     2015-09-09  Benjamin Poulain  <[email protected]>

Modified: branches/safari-601.1.46-branch/Source/WebCore/Modules/webaudio/AudioContext.cpp (190474 => 190475)


--- branches/safari-601.1.46-branch/Source/WebCore/Modules/webaudio/AudioContext.cpp	2015-10-02 08:11:38 UTC (rev 190474)
+++ branches/safari-601.1.46-branch/Source/WebCore/Modules/webaudio/AudioContext.cpp	2015-10-02 08:12:52 UTC (rev 190475)
@@ -1002,7 +1002,7 @@
 bool AudioContext::willBeginPlayback()
 {
     if (userGestureRequiredForAudioStart()) {
-        if (!ScriptController::processingUserGesture())
+        if (!ScriptController::processingUserGestureForMedia())
             return false;
         removeBehaviorRestriction(AudioContext::RequireUserGestureForAudioStartRestriction);
     }
@@ -1022,7 +1022,7 @@
 bool AudioContext::willPausePlayback()
 {
     if (userGestureRequiredForAudioStart()) {
-        if (!ScriptController::processingUserGesture())
+        if (!ScriptController::processingUserGestureForMedia())
             return false;
         removeBehaviorRestriction(AudioContext::RequireUserGestureForAudioStartRestriction);
     }

Modified: branches/safari-601.1.46-branch/Source/WebCore/html/MediaElementSession.cpp (190474 => 190475)


--- branches/safari-601.1.46-branch/Source/WebCore/html/MediaElementSession.cpp	2015-10-02 08:11:38 UTC (rev 190474)
+++ branches/safari-601.1.46-branch/Source/WebCore/html/MediaElementSession.cpp	2015-10-02 08:12:52 UTC (rev 190475)
@@ -129,12 +129,12 @@
     if (pageExplicitlyAllowsElementToAutoplayInline(element))
         return true;
 
-    if (m_restrictions & RequireUserGestureForRateChange && !ScriptController::processingUserGesture()) {
+    if (m_restrictions & RequireUserGestureForRateChange && !ScriptController::processingUserGestureForMedia()) {
         LOG(Media, "MediaElementSession::playbackPermitted - returning FALSE");
         return false;
     }
 
-    if (m_restrictions & RequireUserGestureForAudioRateChange && element.hasAudio() && !ScriptController::processingUserGesture()) {
+    if (m_restrictions & RequireUserGestureForAudioRateChange && element.hasAudio() && !ScriptController::processingUserGestureForMedia()) {
         LOG(Media, "MediaElementSession::playbackPermitted - returning FALSE");
         return false;
     }
@@ -144,7 +144,7 @@
 
 bool MediaElementSession::dataLoadingPermitted(const HTMLMediaElement&) const
 {
-    if (m_restrictions & RequireUserGestureForLoad && !ScriptController::processingUserGesture()) {
+    if (m_restrictions & RequireUserGestureForLoad && !ScriptController::processingUserGestureForMedia()) {
         LOG(Media, "MediaElementSession::dataLoadingPermitted - returning FALSE");
         return false;
     }
@@ -154,7 +154,7 @@
 
 bool MediaElementSession::fullscreenPermitted(const HTMLMediaElement&) const
 {
-    if (m_restrictions & RequireUserGestureForFullscreen && !ScriptController::processingUserGesture()) {
+    if (m_restrictions & RequireUserGestureForFullscreen && !ScriptController::processingUserGestureForMedia()) {
         LOG(Media, "MediaElementSession::fullscreenPermitted - returning FALSE");
         return false;
     }
@@ -189,7 +189,7 @@
 {
     LOG(Media, "MediaElementSession::showPlaybackTargetPicker");
 
-    if (m_restrictions & RequireUserGestureToShowPlaybackTargetPicker && !ScriptController::processingUserGesture()) {
+    if (m_restrictions & RequireUserGestureToShowPlaybackTargetPicker && !ScriptController::processingUserGestureForMedia()) {
         LOG(Media, "MediaElementSession::showPlaybackTargetPicker - returning early because of permissions");
         return;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to