Title: [217223] trunk/Source/WebCore
Revision
217223
Author
jer.no...@apple.com
Date
2017-05-22 10:38:38 -0700 (Mon, 22 May 2017)

Log Message

Media element thinks its hidden when in PiP mode and tab is backgrounded.
https://bugs.webkit.org/show_bug.cgi?id=172221

Reviewed by Eric Carlson.

The element should not be considered hidden when in legacy fullscreen mode or PiP mode.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::visibilityStateChanged):
(WebCore::HTMLMediaElement::fullscreenModeChanged):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (217222 => 217223)


--- trunk/Source/WebCore/ChangeLog	2017-05-22 17:15:08 UTC (rev 217222)
+++ trunk/Source/WebCore/ChangeLog	2017-05-22 17:38:38 UTC (rev 217223)
@@ -1,3 +1,16 @@
+2017-05-22  Jer Noble  <jer.no...@apple.com>
+
+        Media element thinks its hidden when in PiP mode and tab is backgrounded.
+        https://bugs.webkit.org/show_bug.cgi?id=172221
+
+        Reviewed by Eric Carlson.
+
+        The element should not be considered hidden when in legacy fullscreen mode or PiP mode.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::visibilityStateChanged):
+        (WebCore::HTMLMediaElement::fullscreenModeChanged):
+
 2017-05-22  Zan Dobersek  <zdober...@igalia.com>
 
         NavigatorEME: null RefPtr<> dereference due to different calling conventions

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (217222 => 217223)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2017-05-22 17:15:08 UTC (rev 217222)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2017-05-22 17:38:38 UTC (rev 217223)
@@ -5352,7 +5352,7 @@
 
 void HTMLMediaElement::visibilityStateChanged()
 {
-    m_elementIsHidden = document().hidden();
+    m_elementIsHidden = document().hidden() && m_videoFullscreenMode == VideoFullscreenModeNone;
     LOG(Media, "HTMLMediaElement::visibilityStateChanged(%p) - visible = %s", this, boolString(!m_elementIsHidden));
     updateSleepDisabling();
     m_mediaSession->visibilityChanged();
@@ -7480,6 +7480,7 @@
         return;
 
     m_videoFullscreenMode = mode;
+    visibilityStateChanged();
     m_mediaSession->scheduleClientDataBufferingCheck();
     scheduleUpdatePlaybackControlsManager();
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to