Title: [206415] trunk/Source/WebCore
Revision
206415
Author
wenson_hs...@apple.com
Date
2016-09-26 23:14:23 -0700 (Mon, 26 Sep 2016)

Log Message

If you play a youtube video from now playing after it finished in Safari, controls disappear
https://bugs.webkit.org/show_bug.cgi?id=162589
<rdar://problem/28484047>

Reviewed by Jer Noble.

Tweaks the main content heuristic slightly to remove the "mostly in mainframe" requirement in the case of Now
Playing. This was added in the case of the controls manager as an additional way to identify video elements that
should not show controls, since we relax audio and video constraints for showing videos in the controls manager,
so that a video element is prevented from showing controls on grounds of lacking audio only if it has never had
audio before. In the case of Now Playing, we have stricter requirements for videos, which must have audio, which
makes the mainframe heuristic not necessary.

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::canShowControlsManager):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (206414 => 206415)


--- trunk/Source/WebCore/ChangeLog	2016-09-27 06:10:35 UTC (rev 206414)
+++ trunk/Source/WebCore/ChangeLog	2016-09-27 06:14:23 UTC (rev 206415)
@@ -1,3 +1,21 @@
+2016-09-26  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        If you play a youtube video from now playing after it finished in Safari, controls disappear
+        https://bugs.webkit.org/show_bug.cgi?id=162589
+        <rdar://problem/28484047>
+
+        Reviewed by Jer Noble.
+
+        Tweaks the main content heuristic slightly to remove the "mostly in mainframe" requirement in the case of Now
+        Playing. This was added in the case of the controls manager as an additional way to identify video elements that
+        should not show controls, since we relax audio and video constraints for showing videos in the controls manager,
+        so that a video element is prevented from showing controls on grounds of lacking audio only if it has never had
+        audio before. In the case of Now Playing, we have stricter requirements for videos, which must have audio, which
+        makes the mainframe heuristic not necessary.
+
+        * html/MediaElementSession.cpp:
+        (WebCore::MediaElementSession::canShowControlsManager):
+
 2016-09-26  Antti Koivisto  <an...@apple.com>
 
         Setter on style element's textContent or cssText doesn't trigger style recalc

Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (206414 => 206415)


--- trunk/Source/WebCore/html/MediaElementSession.cpp	2016-09-27 06:10:35 UTC (rev 206414)
+++ trunk/Source/WebCore/html/MediaElementSession.cpp	2016-09-27 06:14:23 UTC (rev 206415)
@@ -228,7 +228,7 @@
         return true;
     }
 
-    if (!isElementRectMostlyInMainFrame(m_element)) {
+    if (purpose == PlaybackControlsPurpose::ControlsManager && !isElementRectMostlyInMainFrame(m_element)) {
         LOG(Media, "MediaElementSession::canShowControlsManager - returning FALSE: Not in main frame");
         return false;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to