Title: [206455] branches/safari-602-branch/Source/WebCore

Diff

Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (206454 => 206455)


--- branches/safari-602-branch/Source/WebCore/ChangeLog	2016-09-27 19:39:45 UTC (rev 206454)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog	2016-09-27 19:49:33 UTC (rev 206455)
@@ -1,5 +1,24 @@
 2016-09-27  Babak Shafiei  <[email protected]>
 
+        Merge r206444. rdar://problem/28496755
+
+    2016-09-27  Wenson Hsieh  <[email protected]>
+
+            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  <[email protected]>
+
         Merge r206415. rdar://problem/28484047
 
     2016-09-26  Wenson Hsieh  <[email protected]>

Modified: branches/safari-602-branch/Source/WebCore/html/MediaElementSession.cpp (206454 => 206455)


--- branches/safari-602-branch/Source/WebCore/html/MediaElementSession.cpp	2016-09-27 19:39:45 UTC (rev 206454)
+++ branches/safari-602-branch/Source/WebCore/html/MediaElementSession.cpp	2016-09-27 19:49:33 UTC (rev 206455)
@@ -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-branch/Source/WebCore/page/Page.cpp (206454 => 206455)


--- branches/safari-602-branch/Source/WebCore/page/Page.cpp	2016-09-27 19:39:45 UTC (rev 206454)
+++ branches/safari-602-branch/Source/WebCore/page/Page.cpp	2016-09-27 19:49:33 UTC (rev 206455)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to