Title: [237483] trunk/Source

Diff

Modified: trunk/Source/WebCore/ChangeLog (237482 => 237483)


--- trunk/Source/WebCore/ChangeLog	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebCore/ChangeLog	2018-10-26 21:33:21 UTC (rev 237483)
@@ -1,3 +1,16 @@
+2018-10-26  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r237458.
+        https://bugs.webkit.org/show_bug.cgi?id=190973
+
+        broke internal iOS builds (Requested by zalan on #webkit).
+
+        Reverted changeset:
+
+        "Adopt -setOverrideRouteSharingPolicy:routingContextUID: SPI"
+        https://bugs.webkit.org/show_bug.cgi?id=190951
+        https://trac.webkit.org/changeset/237458
+
 2018-10-26  Antoine Quint  <[email protected]>
 
         [Web Animations] Remove useless internals methods

Modified: trunk/Source/WebCore/PAL/ChangeLog (237482 => 237483)


--- trunk/Source/WebCore/PAL/ChangeLog	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebCore/PAL/ChangeLog	2018-10-26 21:33:21 UTC (rev 237483)
@@ -1,3 +1,16 @@
+2018-10-26  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r237458.
+        https://bugs.webkit.org/show_bug.cgi?id=190973
+
+        broke internal iOS builds (Requested by zalan on #webkit).
+
+        Reverted changeset:
+
+        "Adopt -setOverrideRouteSharingPolicy:routingContextUID: SPI"
+        https://bugs.webkit.org/show_bug.cgi?id=190951
+        https://trac.webkit.org/changeset/237458
+
 2018-10-26  Timothy Hatcher  <[email protected]>
 
         Use dark appearance scrollbar when page background is dark or document supports dark mode.

Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h (237482 => 237483)


--- trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h	2018-10-26 21:33:21 UTC (rev 237483)
@@ -73,7 +73,6 @@
 @property (nonatomic, readonly, getter=isPictureInPictureActive) BOOL pictureInPictureActive;
 @property (nonatomic, readonly, getter=isPictureInPictureSuspended) BOOL pictureInPictureSuspended;
 @property (nonatomic, readonly) BOOL pictureInPictureWasStartedWhenEnteringBackground;
-- (void)setWebKitOverrideRouteSharingPolicy:(NSUInteger)routeSharingPolicy routingContextUID:(NSString *)routingContextUID;
 @end
 
 @protocol AVPlayerViewControllerDelegate_WebKitOnly <AVPlayerViewControllerDelegate>
@@ -164,7 +163,6 @@
 @property (nonatomic, strong, nullable) AVPlayerController *playerController;
 @property (nonatomic, readonly, getter=isPictureInPictureActive) BOOL pictureInPictureActive;
 @property (nonatomic, readonly) BOOL pictureInPictureWasStartedWhenEnteringBackground;
-- (void)setWebKitOverrideRouteSharingPolicy:(NSUInteger)routeSharingPolicy routingContextUID:(NSString *)routingContextUID;
 @end
 
 NS_ASSUME_NONNULL_END

Modified: trunk/Source/WebCore/platform/cocoa/VideoFullscreenModel.h (237482 => 237483)


--- trunk/Source/WebCore/platform/cocoa/VideoFullscreenModel.h	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebCore/platform/cocoa/VideoFullscreenModel.h	2018-10-26 21:33:21 UTC (rev 237483)
@@ -28,12 +28,10 @@
 
 #if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
 
-#include "AudioSession.h"
 #include "FloatRect.h"
 #include "HTMLMediaElementEnums.h"
 #include "MediaPlayerEnums.h"
 #include "PlaybackSessionModel.h"
-#include <wtf/CompletionHandler.h>
 
 #if PLATFORM(IOS_FAMILY)
 OBJC_CLASS AVPlayerViewController;
@@ -64,8 +62,6 @@
     virtual void willExitPictureInPicture() = 0;
     virtual void didExitPictureInPicture() = 0;
 
-    virtual void requestRouteSharingPolicyAndContextUID(CompletionHandler<void(RouteSharingPolicy, String)>&& completionHandler) { completionHandler(RouteSharingPolicy::Default, emptyString()); }
-
 #if PLATFORM(IOS_FAMILY)
     virtual UIViewController *presentingViewController() { return nullptr; }
     virtual UIViewController *createVideoFullscreenViewController(AVPlayerViewController *) { return nullptr; }

Modified: trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h (237482 => 237483)


--- trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h	2018-10-26 21:33:21 UTC (rev 237483)
@@ -72,7 +72,6 @@
     FloatSize videoDimensions() const override { return m_videoDimensions; }
     bool hasVideo() const override { return m_hasVideo; }
 
-    WEBCORE_EXPORT void requestRouteSharingPolicyAndContextUID(CompletionHandler<void(RouteSharingPolicy, String)>&&) override;
 
 protected:
     WEBCORE_EXPORT VideoFullscreenModelVideoElement();

Modified: trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm (237482 => 237483)


--- trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm	2018-10-26 21:33:21 UTC (rev 237483)
@@ -187,12 +187,6 @@
         m_videoElement->fullscreenModeChanged(videoFullscreenMode);
 }
 
-void VideoFullscreenModelVideoElement::requestRouteSharingPolicyAndContextUID(CompletionHandler<void(RouteSharingPolicy, String)>&& completionHandler)
-{
-    auto& session = AudioSession::sharedSession();
-    completionHandler(session.routeSharingPolicy(), session.routingContextUID());
-}
-
 void VideoFullscreenModelVideoElement::addClient(VideoFullscreenModelClient& client)
 {
     ASSERT(!m_clients.contains(&client));

Modified: trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.h (237482 => 237483)


--- trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.h	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.h	2018-10-26 21:33:21 UTC (rev 237483)
@@ -57,7 +57,7 @@
 class FloatSize;
 class VideoFullscreenModel;
 class VideoFullscreenChangeObserver;
-
+    
 class VideoFullscreenInterfaceAVKit final
     : public VideoFullscreenModelClient
     , public PlaybackSessionModelClient
@@ -184,8 +184,6 @@
     WTF::Function<void(bool)> m_prepareToInlineCallback;
     RunLoop::Timer<VideoFullscreenInterfaceAVKit> m_watchdogTimer;
     FloatRect m_inlineRect;
-    RouteSharingPolicy m_routeSharingPolicy { RouteSharingPolicy::Default };
-    String m_routingContextUID;
     bool m_allowsPictureInPicturePlayback { false };
     bool m_wirelessVideoPlaybackDisabled { true };
     bool m_shouldReturnToFullscreenWhenStoppingPiP { false };

Modified: trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm (237482 => 237483)


--- trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm	2018-10-26 21:33:21 UTC (rev 237483)
@@ -541,7 +541,6 @@
 - (void)stopPictureInPicture;
 
 - (BOOL)playerViewControllerShouldHandleDoneButtonTap:(AVPlayerViewController *)playerViewController;
-- (void)setWebKitOverrideRouteSharingPolicy:(NSUInteger)routeSharingPolicy routingContextUID:(NSString *)routingContextUID;
 @end
 NS_ASSUME_NONNULL_END
 
@@ -575,16 +574,6 @@
     return YES;
 }
 
-- (void)setWebKitOverrideRouteSharingPolicy:(NSUInteger)routeSharingPolicy routingContextUID:(NSString *)routingContextUID
-{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wunknown-pragmas"
-#pragma clang diagnostic ignored "-Wunguarded-availability-new"
-    if ([_avPlayerViewController respondsToSelector:@selector(setWebKitOverrideRouteSharingPolicy:routingContextUID:)])
-        [_avPlayerViewController setWebKitOverrideRouteSharingPolicy:routeSharingPolicy routingContextUID:routingContextUID];
-#pragma clang diagnostic pop
-}
-
 - (void)enterFullScreenAnimated:(BOOL)animated completionHandler:(void (^)(BOOL success, NSError * __nullable error))completionHandler
 {
 #if PLATFORM(WATCHOS)
@@ -769,17 +758,9 @@
 
     m_videoFullscreenModel = model;
 
-    if (m_videoFullscreenModel) {
+    if (m_videoFullscreenModel)
         m_videoFullscreenModel->addClient(*this);
-        m_videoFullscreenModel->requestRouteSharingPolicyAndContextUID([this, protectedThis = makeRefPtr(this)] (RouteSharingPolicy policy, String contextUID) {
-            m_routeSharingPolicy = policy;
-            m_routingContextUID = contextUID;
 
-            if (m_playerViewController && !m_routingContextUID.isEmpty())
-                [m_playerViewController setWebKitOverrideRouteSharingPolicy:(NSUInteger)m_routeSharingPolicy routingContextUID:m_routingContextUID];
-        });
-    }
-
     hasVideoChanged(m_videoFullscreenModel ? m_videoFullscreenModel->hasVideo() : false);
     videoDimensionsChanged(m_videoFullscreenModel ? m_videoFullscreenModel->videoDimensions() : FloatSize());
 }
@@ -1239,8 +1220,6 @@
     [m_playerViewController setDelegate:m_playerViewControllerDelegate.get()];
     [m_playerViewController setAllowsPictureInPicturePlayback:m_allowsPictureInPicturePlayback];
     [playerController() setPictureInPicturePossible:m_allowsPictureInPicturePlayback];
-    if (!m_routingContextUID.isEmpty())
-        [m_playerViewController setWebKitOverrideRouteSharingPolicy:(NSUInteger)m_routeSharingPolicy routingContextUID:m_routingContextUID];
 
 #if PLATFORM(WATCHOS)
     m_viewController = videoFullscreenModel()->createVideoFullscreenViewController(m_playerViewController.get().avPlayerViewController);

Modified: trunk/Source/WebKit/ChangeLog (237482 => 237483)


--- trunk/Source/WebKit/ChangeLog	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebKit/ChangeLog	2018-10-26 21:33:21 UTC (rev 237483)
@@ -1,3 +1,16 @@
+2018-10-26  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r237458.
+        https://bugs.webkit.org/show_bug.cgi?id=190973
+
+        broke internal iOS builds (Requested by zalan on #webkit).
+
+        Reverted changeset:
+
+        "Adopt -setOverrideRouteSharingPolicy:routingContextUID: SPI"
+        https://bugs.webkit.org/show_bug.cgi?id=190951
+        https://trac.webkit.org/changeset/237458
+
 2018-10-26  Chris Dumez  <[email protected]>
 
         [PSON] Only delay attaching drawingArea in case of process swap and drop DidCompletePageTransition IPC handshake

Modified: trunk/Source/WebKit/Platform/IPC/MessageSender.h (237482 => 237483)


--- trunk/Source/WebKit/Platform/IPC/MessageSender.h	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebKit/Platform/IPC/MessageSender.h	2018-10-26 21:33:21 UTC (rev 237483)
@@ -65,14 +65,6 @@
         return messageSenderConnection()->sendSync(WTFMove(message), WTFMove(reply), destinationID, timeout, sendSyncOptions);
     }
 
-    template<typename T, typename... Args>
-    void sendWithAsyncReply(T&& message, CompletionHandler<void(Args...)>&& args, uint64_t destinationID = 0)
-    {
-        ASSERT(messageSenderConnection());
-
-        messageSenderConnection()->sendWithAsyncReply(WTFMove(message), WTFMove(args), destinationID);
-    }
-
     virtual bool sendMessage(std::unique_ptr<Encoder>, OptionSet<SendOption>);
 
 private:

Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (237482 => 237483)


--- trunk/Source/WebKit/Scripts/webkit/messages.py	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py	2018-10-26 21:33:21 UTC (rev 237483)
@@ -559,13 +559,12 @@
 
             if message.has_attribute(ASYNC_ATTRIBUTE):
                 move_parameters = message.name, ', '.join([move_type(x.type) for x in message.reply_parameters])
-                move_values = ', '.join(['WTFMove(*%s)' % x.name for x in message.reply_parameters])
                 result.append('void %s::callReply(IPC::Decoder& decoder, CompletionHandler<void(%s)>&& completionHandler)\n{\n' % move_parameters)
                 for x in message.reply_parameters:
                     result.append('    std::optional<%s> %s;\n' % (x.type, x.name))
                     result.append('    decoder >> %s;\n' % x.name)
                     result.append('    if (!%s) {\n        ASSERT_NOT_REACHED();\n        return;\n    }\n' % x.name)
-                result.append('    completionHandler(%s);\n}\n\n' % move_values)
+                result.append('    completionHandler(WTFMove(*%s));\n}\n\n' % (', *'.join(x.name for x in message.reply_parameters)))
                 result.append('void %s::cancelReply(CompletionHandler<void(%s)>&& completionHandler)\n{\n    completionHandler(' % move_parameters)
                 result.append(', '.join(['{ }' for x in message.reply_parameters]))
                 result.append(');\n}\n\n')

Modified: trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h (237482 => 237483)


--- trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h	2018-10-26 21:33:21 UTC (rev 237483)
@@ -28,7 +28,6 @@
 #if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
 
 #include "MessageReceiver.h"
-#include <WebCore/AudioSession.h>
 #include <WebCore/GraphicsLayer.h>
 #include <WebCore/PlatformView.h>
 #include <WebCore/VideoFullscreenChangeObserver.h>
@@ -37,7 +36,6 @@
 #include <wtf/HashSet.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
-#include <wtf/text/WTFString.h>
 
 #if PLATFORM(IOS_FAMILY)
 #include <WebCore/VideoFullscreenInterfaceAVKit.h>
@@ -95,7 +93,6 @@
     void failedToEnterPictureInPicture() final;
     void willExitPictureInPicture() final;
     void didExitPictureInPicture() final;
-    void requestRouteSharingPolicyAndContextUID(CompletionHandler<void(WebCore::RouteSharingPolicy, String)>&&) final;
 
     // VideoFullscreenChangeObserver
     void requestUpdateInlineRect() final;
@@ -130,8 +127,6 @@
     void applicationDidBecomeActive();
     bool isVisible() const;
 
-    void requestRouteSharingPolicyAndContextUID(uint64_t contextId, CompletionHandler<void(WebCore::RouteSharingPolicy, String)>&&);
-
 #if ENABLE(VIDEO_PRESENTATION_MODE)
     bool isPlayingVideoInEnhancedFullscreen() const;
 #endif

Modified: trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm (237482 => 237483)


--- trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm	2018-10-26 21:33:21 UTC (rev 237483)
@@ -274,14 +274,6 @@
         m_manager->fullscreenMayReturnToInline(m_contextId);
 }
 
-void VideoFullscreenModelContext::requestRouteSharingPolicyAndContextUID(CompletionHandler<void(WebCore::RouteSharingPolicy, String)>&& completionHandler)
-{
-    if (m_manager)
-        m_manager->requestRouteSharingPolicyAndContextUID(m_contextId, WTFMove(completionHandler));
-    else
-        completionHandler(WebCore::RouteSharingPolicy::Default, emptyString());
-}
-
 void VideoFullscreenModelContext::willEnterPictureInPicture()
 {
     for (auto& client : m_clients)
@@ -401,11 +393,6 @@
         std::get<1>(tuple)->applicationDidBecomeActive();
 }
 
-void VideoFullscreenManagerProxy::requestRouteSharingPolicyAndContextUID(uint64_t contextId, CompletionHandler<void(WebCore::RouteSharingPolicy, String)>&& callback)
-{
-    m_page->sendWithAsyncReply(Messages::VideoFullscreenManager::RequestRouteSharingPolicyAndContextUID(contextId), WTFMove(callback));
-}
-
 VideoFullscreenManagerProxy::ModelInterfaceTuple VideoFullscreenManagerProxy::createModelAndInterface(uint64_t contextId)
 {
     auto& playbackSessionModel = m_playbackSessionManagerProxy->ensureModel(contextId);

Modified: trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h (237482 => 237483)


--- trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h	2018-10-26 21:33:21 UTC (rev 237483)
@@ -27,9 +27,7 @@
 
 #if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
 
-#include "Connection.h"
 #include "MessageReceiver.h"
-#include "VideoFullscreenManagerMessages.h"
 #include <WebCore/EventListener.h>
 #include <WebCore/HTMLMediaElementEnums.h>
 #include <WebCore/PlatformCALayer.h>
@@ -153,8 +151,7 @@
     void setVideoLayerGravityEnum(uint64_t contextId, unsigned gravity);
     void fullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode);
     void fullscreenMayReturnToInline(uint64_t contextId, bool isPageVisible);
-    void requestRouteSharingPolicyAndContextUID(uint64_t contextId, Messages::VideoFullscreenManager::RequestRouteSharingPolicyAndContextUID::AsyncReply&&);
-
+    
     WebPage* m_page;
     Ref<PlaybackSessionManager> m_playbackSessionManager;
     HashMap<WebCore::HTMLVideoElement*, uint64_t> m_videoElements;

Modified: trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.messages.in (237482 => 237483)


--- trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.messages.in	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.messages.in	2018-10-26 21:33:21 UTC (rev 237483)
@@ -35,6 +35,5 @@
     SetVideoLayerGravityEnum(uint64_t contextId, unsigned gravity)
     FullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode)
     FullscreenMayReturnToInline(uint64_t contextId, bool isPageVisible)
-    RequestRouteSharingPolicyAndContextUID(uint64_t contextId) -> (enum:uint8_t WebCore::RouteSharingPolicy routeSharingPolicy, String routingContextUID) Async
 }
 #endif

Modified: trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm (237482 => 237483)


--- trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm	2018-10-26 21:03:47 UTC (rev 237482)
+++ trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm	2018-10-26 21:33:21 UTC (rev 237483)
@@ -30,6 +30,7 @@
 #import "Attachment.h"
 #import "Logging.h"
 #import "PlaybackSessionManager.h"
+#import "VideoFullscreenManagerMessages.h"
 #import "VideoFullscreenManagerProxyMessages.h"
 #import "WebCoreArgumentCoders.h"
 #import "WebPage.h"
@@ -557,11 +558,6 @@
         model.videoElement()->scrollIntoViewIfNotVisible(false);
     m_page->send(Messages::VideoFullscreenManagerProxy::PreparedToReturnToInline(contextId, true, inlineVideoFrame(*model.videoElement())), m_page->pageID());
 }
-
-void VideoFullscreenManager::requestRouteSharingPolicyAndContextUID(uint64_t contextId, Messages::VideoFullscreenManager::RequestRouteSharingPolicyAndContextUID::AsyncReply&& reply)
-{
-    ensureModel(contextId).requestRouteSharingPolicyAndContextUID(WTFMove(reply));
-}
     
 void VideoFullscreenManager::setVideoLayerFrameFenced(uint64_t contextId, WebCore::FloatRect bounds, IPC::Attachment fencePort)
 {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to