Title: [190327] trunk/Source/WebCore
- Revision
- 190327
- Author
- jer.no...@apple.com
- Date
- 2015-09-29 14:03:54 -0700 (Tue, 29 Sep 2015)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (190326 => 190327)
--- trunk/Source/WebCore/ChangeLog 2015-09-29 21:01:40 UTC (rev 190326)
+++ trunk/Source/WebCore/ChangeLog 2015-09-29 21:03:54 UTC (rev 190327)
@@ -1,3 +1,22 @@
+2015-09-29 Jer Noble <jer.no...@apple.com>
+
+ 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-09-29 Ryosuke Niwa <rn...@webkit.org>
Update style/layout when a slot is added or removed
Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (190326 => 190327)
--- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp 2015-09-29 21:01:40 UTC (rev 190326)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp 2015-09-29 21:03:54 UTC (rev 190327)
@@ -1004,7 +1004,7 @@
bool AudioContext::willBeginPlayback()
{
if (userGestureRequiredForAudioStart()) {
- if (!ScriptController::processingUserGesture())
+ if (!ScriptController::processingUserGestureForMedia())
return false;
removeBehaviorRestriction(AudioContext::RequireUserGestureForAudioStartRestriction);
}
@@ -1024,7 +1024,7 @@
bool AudioContext::willPausePlayback()
{
if (userGestureRequiredForAudioStart()) {
- if (!ScriptController::processingUserGesture())
+ if (!ScriptController::processingUserGestureForMedia())
return false;
removeBehaviorRestriction(AudioContext::RequireUserGestureForAudioStartRestriction);
}
Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (190326 => 190327)
--- trunk/Source/WebCore/html/MediaElementSession.cpp 2015-09-29 21:01:40 UTC (rev 190326)
+++ trunk/Source/WebCore/html/MediaElementSession.cpp 2015-09-29 21:03:54 UTC (rev 190327)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes