Title: [217858] trunk/Source
Revision
217858
Author
[email protected]
Date
2017-06-06 14:46:29 -0700 (Tue, 06 Jun 2017)

Log Message

Netflix seeking quirk should also apply to Now Playing, and should always use the 
livestream UI
https://bugs.webkit.org/show_bug.cgi?id=173030
-and corresponding-
rdar://problem/32228660

Reviewed by Darin Adler.

Source/WebCore:

This patch rolls out much of https://trac.webkit.org/changeset/217791/webkit in 
favor of an approach that can be used to apply the quirk to Now Playing in 
addition to Touch Bar. This patch also changes the UI in both Touch Bar and Now 
Playing to match live stream UI, which means there is no playhead. This hopefully 
makes it less confusing that taps on the timeline will have no effect. 

supportsSeeking() should return false for Netflix. That function needs to be 
public now.
* html/HTMLMediaElement.cpp:
(WebCore::needsSeekingSupportQuirk):
(WebCore::HTMLMediaElement::supportsSeeking):
* html/HTMLMediaElement.h:

Here is where we get the desired result in Now Playing. Make sure the 
currentSession supportsSeeking() before relying on the time and duration info for 
the sake of Now Playing. 
* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::MediaSessionManagerMac::updateNowPlayingInfo):

We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
* platform/cocoa/WebPlaybackSessionModel.h:
(WebCore::WebPlaybackSessionModelClient::mutedChanged):
(WebCore::WebPlaybackSessionModelClient::allowsTouchBarScrubbingChanged): Deleted.
* platform/cocoa/WebPlaybackSessionModelMediaElement.h:
* platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
(WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):

And here is where we get the desired result for Touch Bar. Make sure the the media 
element supportsSeeking() before relying on the duration. 
(WebCore::WebPlaybackSessionModelMediaElement::duration):

We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
(WebCore::WebPlaybackSessionModelMediaElement::allowsTouchBarScrubbing): Deleted.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
* platform/mac/WebPlaybackControlsManager.h:

Currently the Touch Bar live stream UI lets you seek, which results in broken 
behavior on real live streams and on Netflix. Prevent that by preventing scrubbing 
for NaN and infinite durations.
* platform/mac/WebPlaybackControlsManager.mm:
(-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):

We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
* platform/mac/WebPlaybackSessionInterfaceMac.h:
* platform/mac/WebPlaybackSessionInterfaceMac.mm:
(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):
(WebCore::WebPlaybackSessionInterfaceMac::allowsTouchBarScrubbingChanged): Deleted.

Source/WebKit2:

See WebCore ChangeLog for more details. We can roll out allowsTouchBarScrubbing() 
and rely on supportsSeeking().

* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
(WebKit::WebPlaybackSessionModelContext::setAllowsTouchBarScrubbing): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setAllowsTouchBarScrubbing): Deleted.
* WebProcess/cocoa/WebPlaybackSessionManager.h:
* WebProcess/cocoa/WebPlaybackSessionManager.mm:
(WebKit::WebPlaybackSessionInterfaceContext::allowsTouchBarScrubbingChanged): Deleted.
(WebKit::WebPlaybackSessionManager::allowsTouchBarScrubbingChanged): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (217857 => 217858)


--- trunk/Source/WebCore/ChangeLog	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebCore/ChangeLog	2017-06-06 21:46:29 UTC (rev 217858)
@@ -1,3 +1,61 @@
+2017-06-06  Beth Dakin  <[email protected]>
+
+        Netflix seeking quirk should also apply to Now Playing, and should always use the 
+        livestream UI
+        https://bugs.webkit.org/show_bug.cgi?id=173030
+        -and corresponding-
+        rdar://problem/32228660
+
+        Reviewed by Darin Adler.
+
+        This patch rolls out much of https://trac.webkit.org/changeset/217791/webkit in 
+        favor of an approach that can be used to apply the quirk to Now Playing in 
+        addition to Touch Bar. This patch also changes the UI in both Touch Bar and Now 
+        Playing to match live stream UI, which means there is no playhead. This hopefully 
+        makes it less confusing that taps on the timeline will have no effect. 
+
+        supportsSeeking() should return false for Netflix. That function needs to be 
+        public now.
+        * html/HTMLMediaElement.cpp:
+        (WebCore::needsSeekingSupportQuirk):
+        (WebCore::HTMLMediaElement::supportsSeeking):
+        * html/HTMLMediaElement.h:
+
+        Here is where we get the desired result in Now Playing. Make sure the 
+        currentSession supportsSeeking() before relying on the time and duration info for 
+        the sake of Now Playing. 
+        * platform/audio/mac/MediaSessionManagerMac.mm:
+        (WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
+
+        We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
+        * platform/cocoa/WebPlaybackSessionModel.h:
+        (WebCore::WebPlaybackSessionModelClient::mutedChanged):
+        (WebCore::WebPlaybackSessionModelClient::allowsTouchBarScrubbingChanged): Deleted.
+        * platform/cocoa/WebPlaybackSessionModelMediaElement.h:
+        * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
+        (WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):
+
+        And here is where we get the desired result for Touch Bar. Make sure the the media 
+        element supportsSeeking() before relying on the duration. 
+        (WebCore::WebPlaybackSessionModelMediaElement::duration):
+
+        We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
+        (WebCore::WebPlaybackSessionModelMediaElement::allowsTouchBarScrubbing): Deleted.
+        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
+        * platform/mac/WebPlaybackControlsManager.h:
+
+        Currently the Touch Bar live stream UI lets you seek, which results in broken 
+        behavior on real live streams and on Netflix. Prevent that by preventing scrubbing 
+        for NaN and infinite durations.
+        * platform/mac/WebPlaybackControlsManager.mm:
+        (-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):
+
+        We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
+        * platform/mac/WebPlaybackSessionInterfaceMac.h:
+        * platform/mac/WebPlaybackSessionInterfaceMac.mm:
+        (WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):
+        (WebCore::WebPlaybackSessionInterfaceMac::allowsTouchBarScrubbingChanged): Deleted.
+
 2017-06-06  Konstantin Tokarev  <[email protected]>
 
         Add missing <functional> includes

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (217857 => 217858)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2017-06-06 21:46:29 UTC (rev 217858)
@@ -7095,9 +7095,18 @@
     }
 }
 
+static bool needsSeekingSupportQuirk(Document& document)
+{
+    if (!document.settings().needsSiteSpecificQuirks())
+        return false;
+            
+    String host = document.topDocument().url().host();
+    return equalLettersIgnoringASCIICase(host, "netflix.com") || host.endsWithIgnoringASCIICase(".netflix.com");
+}
+
 bool HTMLMediaElement::supportsSeeking() const 
 {
-    return !isLiveStream();
+    return !needsSeekingSupportQuirk(document()) && !isLiveStream();
 }
 
 bool HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction(PlatformMediaSession::InterruptionType type) const

Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (217857 => 217858)


--- trunk/Source/WebCore/html/HTMLMediaElement.h	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h	2017-06-06 21:46:29 UTC (rev 217858)
@@ -518,6 +518,8 @@
     bool hasMediaStreamSrcObject() const { return !!m_mediaStreamSrcObject; }
 #endif
 
+    bool supportsSeeking() const override;
+
 protected:
     HTMLMediaElement(const QualifiedName&, Document&, bool createdByParser);
     virtual ~HTMLMediaElement();
@@ -817,7 +819,6 @@
     double mediaSessionCurrentTime() const override { return currentTime(); }
     bool canReceiveRemoteControlCommands() const override { return true; }
     void didReceiveRemoteControlCommand(PlatformMediaSession::RemoteControlCommandType, const PlatformMediaSession::RemoteCommandArgument*) override;
-    bool supportsSeeking() const override;
     bool shouldOverrideBackgroundPlaybackRestriction(PlatformMediaSession::InterruptionType) const override;
     bool shouldOverrideBackgroundLoadingRestriction() const override;
     bool canProduceAudio() const final;

Modified: trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm (217857 => 217858)


--- trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm	2017-06-06 21:46:29 UTC (rev 217858)
@@ -155,7 +155,7 @@
     });
 
     String title = currentSession->title();
-    double duration = currentSession->duration();
+    double duration = currentSession->supportsSeeking() ? currentSession->duration() : MediaPlayer::invalidTime();
     double rate = currentSession->state() == PlatformMediaSession::Playing ? 1 : 0;
     auto info = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 4, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
 
@@ -174,7 +174,7 @@
     CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoPlaybackRate, cfRate);
 
     double currentTime = currentSession->currentTime();
-    if (std::isfinite(currentTime) && currentTime != MediaPlayer::invalidTime()) {
+    if (std::isfinite(currentTime) && currentTime != MediaPlayer::invalidTime() && currentSession->supportsSeeking()) {
         auto cfCurrentTime = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberDoubleType, &currentTime));
         CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoElapsedTime, cfCurrentTime.get());
         m_lastUpdatedNowPlayingElapsedTime = currentTime;

Modified: trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h (217857 => 217858)


--- trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h	2017-06-06 21:46:29 UTC (rev 217858)
@@ -78,7 +78,6 @@
     virtual String externalPlaybackLocalizedDeviceName() const = 0;
     virtual bool wirelessVideoPlaybackDisabled() const = 0;
     virtual bool isMuted() const = 0;
-    virtual bool allowsTouchBarScrubbing() const = 0;
 };
 
 class WebPlaybackSessionModelClient {
@@ -98,7 +97,6 @@
     virtual void externalPlaybackChanged(bool /* enabled */, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String& /* localizedDeviceName */) { }
     virtual void wirelessVideoPlaybackDisabledChanged(bool) { }
     virtual void mutedChanged(bool) { }
-    virtual void allowsTouchBarScrubbingChanged(bool) { }
 };
 
 }

Modified: trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h (217857 => 217858)


--- trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h	2017-06-06 21:46:29 UTC (rev 217858)
@@ -89,7 +89,6 @@
     String externalPlaybackLocalizedDeviceName() const final;
     bool wirelessVideoPlaybackDisabled() const final;
     bool isMuted() const final;
-    bool allowsTouchBarScrubbing() const final;
 
 protected:
     WEBCORE_EXPORT WebPlaybackSessionModelMediaElement();

Modified: trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm (217857 => 217858)


--- trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm	2017-06-06 21:46:29 UTC (rev 217858)
@@ -35,12 +35,10 @@
 #import "HTMLElement.h"
 #import "HTMLMediaElement.h"
 #import "Logging.h"
-#import "MainFrame.h"
 #import "MediaControlsHost.h"
 #import "MediaSelectionOption.h"
 #import "Page.h"
 #import "PageGroup.h"
-#import "Settings.h"
 #import "SoftLinking.h"
 #import "TextTrackList.h"
 #import "TimeRanges.h"
@@ -172,11 +170,6 @@
         for (auto client : m_clients)
             client->mutedChanged(isMuted());
     }
-    
-    if (all) {
-        for (auto client : m_clients)
-            client->allowsTouchBarScrubbingChanged(allowsTouchBarScrubbing());
-    }
 }
 void WebPlaybackSessionModelMediaElement::addClient(WebPlaybackSessionModelClient& client)
 {
@@ -363,7 +356,9 @@
 
 double WebPlaybackSessionModelMediaElement::duration() const
 {
-    return m_mediaElement ? m_mediaElement->duration() : 0;
+    if (!m_mediaElement)
+        return 0;
+    return m_mediaElement->supportsSeeking() ? m_mediaElement->duration() : std::numeric_limits<double>::quiet_NaN();
 }
 
 double WebPlaybackSessionModelMediaElement::currentTime() const
@@ -513,26 +508,6 @@
     return m_mediaElement ? m_mediaElement->muted() : false;
 }
 
-bool WebPlaybackSessionModelMediaElement::allowsTouchBarScrubbing() const
-{
-    if (!m_mediaElement)
-        return false;
-        
-    Page* page = m_mediaElement->document().page();
-    if (!page)
-        return false;
-        
-    auto* document = page->mainFrame().document();
-    if (!document)
-        return false;
-        
-    if (!page->settings().needsSiteSpecificQuirks())
-        return true;
-        
-    String host = document->url().host();
-    return !(equalLettersIgnoringASCIICase(host, "netflix.com") || host.endsWithIgnoringASCIICase(".netflix.com"));
 }
 
-}
-
 #endif

Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm (217857 => 217858)


--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm	2017-06-06 21:46:29 UTC (rev 217858)
@@ -166,7 +166,6 @@
     bool wirelessVideoPlaybackDisabled() const override;
     void togglePictureInPicture() override { }
     void toggleMuted() override;
-    bool allowsTouchBarScrubbing() const override { return false; }
 
     // WebPlaybackSessionModelClient
     void durationChanged(double) override;

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h (217857 => 217858)


--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h	2017-06-06 21:46:29 UTC (rev 217858)
@@ -57,7 +57,6 @@
     RetainPtr<AVTouchBarMediaSelectionOption> _currentLegibleTouchBarMediaSelectionOption;
     float _rate;
     BOOL _canTogglePlayback;
-    BOOL _allowsTouchBarScrubbing;
 
     RefPtr<WebCore::WebPlaybackSessionInterfaceMac> _webPlaybackSessionInterfaceMac;
 }
@@ -75,7 +74,6 @@
 @property BOOL allowsPictureInPicturePlayback;
 @property (getter=isPictureInPictureActive) BOOL pictureInPictureActive;
 @property BOOL canTogglePictureInPicture;
-@property BOOL allowsTouchBarScrubbing;
 
 - (AVTouchBarMediaSelectionOption *)currentAudioTouchBarMediaSelectionOption;
 - (void)setCurrentAudioTouchBarMediaSelectionOption:(AVTouchBarMediaSelectionOption *)option;

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm (217857 => 217858)


--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm	2017-06-06 21:46:29 UTC (rev 217858)
@@ -56,7 +56,6 @@
 @synthesize allowsPictureInPicturePlayback;
 @synthesize pictureInPictureActive;
 @synthesize canTogglePictureInPicture;
-@synthesize allowsTouchBarScrubbing=_allowsTouchBarScrubbing;
 
 - (void)dealloc
 {
@@ -117,11 +116,11 @@
 
 - (BOOL)canBeginTouchBarScrubbing
 {
-    // At this time, _allowsTouchBarScrubbing is always YES except for Netflix, which requires a quirk to
-    // disable scrubbing. It's not ideal to return YES for all other media. The intent of the API is that
-    // we return NO when the media is being scrubbed via the on-screen scrubber. But we can only possibly
-    // get the right answer for media that uses the default controls.
-    return _allowsTouchBarScrubbing;
+    // At this time, we return YES for all media that is not a live stream and media that is not Netflix. (A Netflix
+    // quirk means we pretend Netflix is a live stream for Touch Bar.) It's not ideal to return YES all the time for
+    // other media. The intent of the API is that we return NO when the media is being scrubbed via the on-screen scrubber.
+    // But we can only possibly get the right answer for media that uses the default controls.
+    return std::isfinite(_contentDuration);;
 }
 
 - (void)beginTouchBarScrubbing

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h (217857 => 217858)


--- trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h	2017-06-06 21:46:29 UTC (rev 217858)
@@ -62,7 +62,6 @@
     WEBCORE_EXPORT void audioMediaSelectionIndexChanged(uint64_t) final;
     WEBCORE_EXPORT void legibleMediaSelectionIndexChanged(uint64_t) final;
     WEBCORE_EXPORT void externalPlaybackChanged(bool /* enabled */, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String& /* localizedDeviceName */) final;
-    WEBCORE_EXPORT void allowsTouchBarScrubbingChanged(bool allowsTouchBarScrubbing) final;
 
     WEBCORE_EXPORT void invalidate();
     WEBCORE_EXPORT void ensureControlsManager();

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm (217857 => 217858)


--- trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm	2017-06-06 21:46:29 UTC (rev 217858)
@@ -186,15 +186,6 @@
 #endif
 }
 
-void WebPlaybackSessionInterfaceMac::allowsTouchBarScrubbingChanged(bool allowsTouchBarScrubbing)
-{
-#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
-    [playBackControlsManager() setAllowsTouchBarScrubbing:allowsTouchBarScrubbing];
-#else
-    UNUSED_PARAM(allowsTouchBarScrubbing);
-#endif
-}
-
 void WebPlaybackSessionInterfaceMac::invalidate()
 {
     if (!m_playbackSessionModel)
@@ -237,7 +228,6 @@
     manager.playing = m_playbackSessionModel->isPlaying();
     [manager setAudioMediaSelectionOptions:m_playbackSessionModel->audioMediaSelectionOptions() withSelectedIndex:static_cast<NSUInteger>(m_playbackSessionModel->audioMediaSelectedIndex())];
     [manager setLegibleMediaSelectionOptions:m_playbackSessionModel->legibleMediaSelectionOptions() withSelectedIndex:static_cast<NSUInteger>(m_playbackSessionModel->legibleMediaSelectedIndex())];
-    manager.allowsTouchBarScrubbing = m_playbackSessionModel->allowsTouchBarScrubbing();
 }
 
 void WebPlaybackSessionInterfaceMac::updatePlaybackControlsManagerTiming(double currentTime, double anchorTime, double playbackRate, bool isPlaying)

Modified: trunk/Source/WebKit2/ChangeLog (217857 => 217858)


--- trunk/Source/WebKit2/ChangeLog	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebKit2/ChangeLog	2017-06-06 21:46:29 UTC (rev 217858)
@@ -1,3 +1,26 @@
+2017-06-06  Beth Dakin  <[email protected]>
+
+        Netflix seeking quirk should also apply to Now Playing, and should always use the 
+        livestream UI
+        https://bugs.webkit.org/show_bug.cgi?id=173030
+        -and corresponding-
+        rdar://problem/32228660
+
+        Reviewed by Darin Adler.
+
+        See WebCore ChangeLog for more details. We can roll out allowsTouchBarScrubbing() 
+        and rely on supportsSeeking().
+
+        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
+        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
+        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
+        (WebKit::WebPlaybackSessionModelContext::setAllowsTouchBarScrubbing): Deleted.
+        (WebKit::WebPlaybackSessionManagerProxy::setAllowsTouchBarScrubbing): Deleted.
+        * WebProcess/cocoa/WebPlaybackSessionManager.h:
+        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
+        (WebKit::WebPlaybackSessionInterfaceContext::allowsTouchBarScrubbingChanged): Deleted.
+        (WebKit::WebPlaybackSessionManager::allowsTouchBarScrubbingChanged): Deleted.
+
 2017-06-06  Jer Noble  <[email protected]>
 
         [Cocoa] Set defaults for mediaContentTypesRequiringHardwareSupport setting

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h (217857 => 217858)


--- trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h	2017-06-06 21:46:29 UTC (rev 217858)
@@ -84,7 +84,6 @@
     void setExternalPlayback(bool, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String&);
     void setWirelessVideoPlaybackDisabled(bool);
     void setMuted(bool);
-    void setAllowsTouchBarScrubbing(bool);
 
 private:
     friend class WebVideoFullscreenModelContext;
@@ -129,7 +128,6 @@
     String externalPlaybackLocalizedDeviceName() const final { return m_externalPlaybackLocalizedDeviceName; }
     bool wirelessVideoPlaybackDisabled() const final { return m_wirelessVideoPlaybackDisabled; }
     bool isMuted() const final { return m_muted; }
-    bool allowsTouchBarScrubbing() const final { return m_allowsTouchBarScrubbing; }
 
     WebPlaybackSessionManagerProxy* m_manager;
     uint64_t m_contextId;
@@ -153,7 +151,6 @@
     String m_externalPlaybackLocalizedDeviceName;
     bool m_wirelessVideoPlaybackDisabled { false };
     bool m_muted { false };
-    bool m_allowsTouchBarScrubbing { true };
 };
 
 class WebPlaybackSessionManagerProxy : public RefCounted<WebPlaybackSessionManagerProxy>, private IPC::MessageReceiver {
@@ -200,7 +197,6 @@
     void setRate(uint64_t contextId, bool isPlaying, double rate);
     void handleControlledElementIDResponse(uint64_t, String) const;
     void setMuted(uint64_t contextId, bool muted);
-    void setAllowsTouchBarScrubbing(uint64_t contextId, bool allowsTouchBarScrubbing);
 
     // Messages to WebPlaybackSessionManager
     void play(uint64_t contextId);

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in (217857 => 217858)


--- trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in	2017-06-06 21:46:29 UTC (rev 217858)
@@ -39,7 +39,6 @@
     SetMuted(uint64_t contextId, bool muted);
     SetUpPlaybackControlsManagerWithID(uint64_t contextId)
     ClearPlaybackControlsManager()
-    SetAllowsTouchBarScrubbing(uint64_t contextId, bool allowsTouchBarScrubbing)
 
     HandleControlledElementIDResponse(uint64_t contextId, String id)
 }

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm (217857 => 217858)


--- trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm	2017-06-06 21:46:29 UTC (rev 217858)
@@ -251,13 +251,6 @@
         client->mutedChanged(muted);
 }
 
-void WebPlaybackSessionModelContext::setAllowsTouchBarScrubbing(bool allowsTouchBarScrubbing)
-{
-    m_allowsTouchBarScrubbing = allowsTouchBarScrubbing;
-    for (auto* client : m_clients)
-        client->allowsTouchBarScrubbingChanged(allowsTouchBarScrubbing);
-}
-
 #pragma mark - WebPlaybackSessionManagerProxy
 
 RefPtr<WebPlaybackSessionManagerProxy> WebPlaybackSessionManagerProxy::create(WebPageProxy& page)
@@ -439,11 +432,6 @@
     ensureModel(contextId).setMuted(muted);
 }
 
-void WebPlaybackSessionManagerProxy::setAllowsTouchBarScrubbing(uint64_t contextId, bool allowsTouchBarScrubbing)
-{
-    ensureModel(contextId).setAllowsTouchBarScrubbing(allowsTouchBarScrubbing);
-}
-
 void WebPlaybackSessionManagerProxy::setDuration(uint64_t contextId, double duration)
 {
     ensureModel(contextId).setDuration(duration);

Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.h (217857 => 217858)


--- trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.h	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.h	2017-06-06 21:46:29 UTC (rev 217858)
@@ -88,7 +88,6 @@
     void externalPlaybackChanged(bool enabled, WebCore::WebPlaybackSessionModel::ExternalPlaybackTargetType, const String& localizedDeviceName) final;
     void wirelessVideoPlaybackDisabledChanged(bool) final;
     void mutedChanged(bool) final;
-    void allowsTouchBarScrubbingChanged(bool) final;
 
     WebPlaybackSessionInterfaceContext(WebPlaybackSessionManager&, uint64_t contextId);
 
@@ -138,7 +137,6 @@
     void externalPlaybackChanged(uint64_t contextId, bool enabled, WebCore::WebPlaybackSessionModel::ExternalPlaybackTargetType, String localizedDeviceName);
     void wirelessVideoPlaybackDisabledChanged(uint64_t contextId, bool);
     void mutedChanged(uint64_t contextId, bool);
-    void allowsTouchBarScrubbingChanged(uint64_t contextId, bool);
 
     // Messages from WebPlaybackSessionManagerProxy
     void play(uint64_t contextId);

Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm (217857 => 217858)


--- trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm	2017-06-06 21:27:28 UTC (rev 217857)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm	2017-06-06 21:46:29 UTC (rev 217858)
@@ -155,12 +155,6 @@
         m_manager->mutedChanged(m_contextId, muted);
 }
 
-void WebPlaybackSessionInterfaceContext::allowsTouchBarScrubbingChanged(bool allowsTouchBarScrubbing)
-{
-    if (m_manager)
-        m_manager->allowsTouchBarScrubbingChanged(m_contextId, allowsTouchBarScrubbing);
-}
-
 #pragma mark - WebPlaybackSessionManager
 
 Ref<WebPlaybackSessionManager> WebPlaybackSessionManager::create(WebPage& page)
@@ -375,11 +369,6 @@
     m_page->send(Messages::WebPlaybackSessionManagerProxy::SetMuted(contextId, muted));
 }
 
-void WebPlaybackSessionManager::allowsTouchBarScrubbingChanged(uint64_t contextId, bool allowsTouchBarScrubbing)
-{
-    m_page->send(Messages::WebPlaybackSessionManagerProxy::SetAllowsTouchBarScrubbing(contextId, allowsTouchBarScrubbing), m_page->pageID());
-}
-
 #pragma mark Messages from WebPlaybackSessionManagerProxy:
 
 void WebPlaybackSessionManager::play(uint64_t contextId)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to