Title: [206489] branches/safari-602.2.14.0-branch/Source/WebCore
Revision
206489
Author
bshaf...@apple.com
Date
2016-09-27 18:39:09 -0700 (Tue, 27 Sep 2016)

Log Message

Merge r206444. rdar://problem/28496755

Modified Paths

Diff

Modified: branches/safari-602.2.14.0-branch/Source/WebCore/ChangeLog (206488 => 206489)


--- branches/safari-602.2.14.0-branch/Source/WebCore/ChangeLog	2016-09-28 01:39:03 UTC (rev 206488)
+++ branches/safari-602.2.14.0-branch/Source/WebCore/ChangeLog	2016-09-28 01:39:09 UTC (rev 206489)
@@ -1,5 +1,24 @@
 2016-09-27  Babak Shafiei  <bshaf...@apple.com>
 
+        Merge r206444. rdar://problem/28496755
+
+    2016-09-27  Wenson Hsieh  <wenson_hs...@apple.com>
+
+            Some Now Playing behavior is broken after r206315
+            https://bugs.webkit.org/show_bug.cgi?id=162625
+            <rdar://problem/28496755>
+
+            Reviewed by Jer Noble.
+
+            Reverts the part of our heuristic that disables Now Playing in active tabs in the main window.
+
+            * html/MediaElementSession.cpp:
+            (WebCore::MediaElementSession::pageAllowsNowPlayingControls):
+            * page/Page.cpp:
+            (WebCore::Page::setViewState):
+
+2016-09-27  Babak Shafiei  <bshaf...@apple.com>
+
         Merge r206415. rdar://problem/28484047
 
     2016-09-26  Wenson Hsieh  <wenson_hs...@apple.com>

Modified: branches/safari-602.2.14.0-branch/Source/WebCore/html/MediaElementSession.cpp (206488 => 206489)


--- branches/safari-602.2.14.0-branch/Source/WebCore/html/MediaElementSession.cpp	2016-09-28 01:39:03 UTC (rev 206488)
+++ branches/safari-602.2.14.0-branch/Source/WebCore/html/MediaElementSession.cpp	2016-09-28 01:39:09 UTC (rev 206489)
@@ -730,8 +730,8 @@
 
 bool MediaElementSession::pageAllowsNowPlayingControls() const
 {
-    auto page = m_element.document().page();
-    return page && !page->isVisibleAndActive();
+    // FIXME: Ideally, we should not allow Now Playing controls for the active tab in the main window.
+    return true;
 }
 
 }

Modified: branches/safari-602.2.14.0-branch/Source/WebCore/page/Page.cpp (206488 => 206489)


--- branches/safari-602.2.14.0-branch/Source/WebCore/page/Page.cpp	2016-09-28 01:39:03 UTC (rev 206488)
+++ branches/safari-602.2.14.0-branch/Source/WebCore/page/Page.cpp	2016-09-28 01:39:09 UTC (rev 206489)
@@ -1450,7 +1450,6 @@
 
     ViewState::Flags oldViewState = m_viewState;
 
-    bool wasVisibleAndActive = isVisibleAndActive();
     m_viewState = viewState;
 
     m_focusController->setViewState(viewState);
@@ -1467,9 +1466,6 @@
 
     for (auto* observer : m_viewStateChangeObservers)
         observer->viewStateDidChange(oldViewState, m_viewState);
-
-    if (wasVisibleAndActive != isVisibleAndActive())
-        PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary();
 }
 
 bool Page::isVisibleAndActive() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to