Inconsistent state in playback controls
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 May 2016 23:46:06 +0000 (23:46 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 May 2016 23:46:06 +0000 (23:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=157962
<rdar://problem/26397571>

Reviewed by Beth Dakin.

Do not use the playbackSessionManager() as the model, that's what the model is for.

* platform/mac/WebPlaybackSessionInterfaceMac.mm:
(WebCore::WebPlaybackSessionInterfaceMac::setClient):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201233 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm

index 7c5464e..a57a2c7 100644 (file)
@@ -1,3 +1,16 @@
+2016-05-20  Jer Noble  <jer.noble@apple.com>
+
+        Inconsistent state in playback controls
+        https://bugs.webkit.org/show_bug.cgi?id=157962
+        <rdar://problem/26397571>
+
+        Reviewed by Beth Dakin.
+
+        Do not use the playbackSessionManager() as the model, that's what the model is for.
+
+        * platform/mac/WebPlaybackSessionInterfaceMac.mm:
+        (WebCore::WebPlaybackSessionInterfaceMac::setClient):
+
 2016-05-20  Brady Eidson  <beidson@apple.com>
 
         Modern IDB: Properly handle blobs in Workers.
index fe5c6fa..2026f99 100644 (file)
@@ -58,10 +58,8 @@ void WebPlaybackSessionInterfaceMac::setClient(WebPlaybackSessionInterfaceMacCli
 {
     m_client = client;
 
-    if (m_client) {
-        float rate = [playBackControlsManager() rate];
-        m_client->rateChanged(!!rate, rate);
-    }
+    if (m_client && m_playbackSessionModel)
+        m_client->rateChanged(m_playbackSessionModel->isPlaying(), m_playbackSessionModel->playbackRate());
 }
 
 void WebPlaybackSessionInterfaceMac::setDuration(double duration)