Title: [202459] trunk/Source/WebCore
- Revision
- 202459
- Author
- [email protected]
- Date
- 2016-06-24 16:01:09 -0700 (Fri, 24 Jun 2016)
Log Message
Media elements should not lose playback controls when muted by a user gesture
https://bugs.webkit.org/show_bug.cgi?id=159078
<rdar://problem/26925904>
Reviewed by Beth Dakin.
Rearrange canControlControlsManager() so that the muted check only occurs if
a user gesture is required.
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::canControlControlsManager):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (202458 => 202459)
--- trunk/Source/WebCore/ChangeLog 2016-06-24 22:52:47 UTC (rev 202458)
+++ trunk/Source/WebCore/ChangeLog 2016-06-24 23:01:09 UTC (rev 202459)
@@ -1,3 +1,17 @@
+2016-06-24 Jer Noble <[email protected]>
+
+ Media elements should not lose playback controls when muted by a user gesture
+ https://bugs.webkit.org/show_bug.cgi?id=159078
+ <rdar://problem/26925904>
+
+ Reviewed by Beth Dakin.
+
+ Rearrange canControlControlsManager() so that the muted check only occurs if
+ a user gesture is required.
+
+ * html/MediaElementSession.cpp:
+ (WebCore::MediaElementSession::canControlControlsManager):
+
2016-06-24 Beth Dakin <[email protected]>
Include enclosingListType in EditorState
Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (202458 => 202459)
--- trunk/Source/WebCore/html/MediaElementSession.cpp 2016-06-24 22:52:47 UTC (rev 202458)
+++ trunk/Source/WebCore/html/MediaElementSession.cpp 2016-06-24 23:01:09 UTC (rev 202459)
@@ -218,11 +218,6 @@
return false;
}
- if (m_element.muted()) {
- LOG(Media, "MediaElementSession::canControlControlsManager - returning FALSE: Muted");
- return false;
- }
-
if (m_element.ended()) {
LOG(Media, "MediaElementSession::canControlControlsManager - returning FALSE: Ended");
return false;
@@ -238,6 +233,16 @@
return false;
}
+ if (!hasBehaviorRestriction(RequireUserGestureToControlControlsManager) || ScriptController::processingUserGestureForMedia()) {
+ LOG(Media, "MediaElementSession::canControlControlsManager - returning TRUE: No user gesture required");
+ return true;
+ }
+
+ if (m_element.muted()) {
+ LOG(Media, "MediaElementSession::canControlControlsManager - returning FALSE: Muted");
+ return false;
+ }
+
if (m_element.isVideo()) {
if (!m_element.renderer()) {
LOG(Media, "MediaElementSession::canControlControlsManager - returning FALSE: No renderer");
@@ -255,13 +260,8 @@
}
}
- if (m_restrictions & RequireUserGestureToControlControlsManager && !ScriptController::processingUserGestureForMedia()) {
- LOG(Media, "MediaElementSession::canControlControlsManager - returning FALSE: No user gesture");
- return false;
- }
-
- LOG(Media, "MediaElementSession::canControlControlsManager - returning TRUE: All criteria met");
- return true;
+ LOG(Media, "MediaElementSession::canControlControlsManager - returning FALSE: No user gesture");
+ return false;
}
#if ENABLE(WIRELESS_PLAYBACK_TARGET)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes