Diff
Modified: trunk/Source/WTF/ChangeLog (260258 => 260259)
--- trunk/Source/WTF/ChangeLog 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WTF/ChangeLog 2020-04-17 17:13:44 UTC (rev 260259)
@@ -1,3 +1,14 @@
+2020-04-17 Peng Liu <[email protected]>
+
+ Cleanup the macros for video fullscreen and picture-in-picture
+ https://bugs.webkit.org/show_bug.cgi?id=210638
+
+ Reviewed by Eric Carlson.
+
+ Add macro ENABLE_VIDEO_PRESENTATION_MODE.
+
+ * wtf/PlatformEnable.h:
+
2020-04-17 Claudio Saavedra <[email protected]>
[GTK][WPE] Bump dependencies minimum required version in Platform.h
Modified: trunk/Source/WTF/wtf/PlatformEnable.h (260258 => 260259)
--- trunk/Source/WTF/wtf/PlatformEnable.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WTF/wtf/PlatformEnable.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -270,6 +270,12 @@
#define ENABLE_FULLSCREEN_API 0
#endif
+#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || PLATFORM(MAC)
+#define ENABLE_VIDEO_PRESENTATION_MODE 1
+#else
+#define ENABLE_VIDEO_PRESENTATION_MODE 0
+#endif
+
#if !defined(ENABLE_GAMEPAD)
#define ENABLE_GAMEPAD 0
#endif
Modified: trunk/Source/WebCore/ChangeLog (260258 => 260259)
--- trunk/Source/WebCore/ChangeLog 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/ChangeLog 2020-04-17 17:13:44 UTC (rev 260259)
@@ -1,3 +1,33 @@
+2020-04-17 Peng Liu <[email protected]>
+
+ Cleanup the macros for video fullscreen and picture-in-picture
+ https://bugs.webkit.org/show_bug.cgi?id=210638
+
+ Reviewed by Eric Carlson.
+
+ Replace some "#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))"
+ and all "#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))"
+ with "#if ENABLE(VIDEO_PRESENTATION_MODE)".
+
+ No new tests, no functional change.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::mediaEngineWasUpdated):
+ (WebCore::HTMLMediaElement::setVideoFullscreenStandby):
+ * html/HTMLMediaElement.h:
+ * html/HTMLVideoElement.cpp:
+ * html/HTMLVideoElement.h:
+ * platform/PictureInPictureSupport.h:
+ * platform/cocoa/VideoFullscreenChangeObserver.h:
+ * platform/cocoa/VideoFullscreenModel.h:
+ * platform/cocoa/VideoFullscreenModelVideoElement.h:
+ * platform/cocoa/VideoFullscreenModelVideoElement.mm:
+ * platform/graphics/MediaPlayer.cpp:
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayerPrivate.h:
+ * platform/ios/VideoFullscreenInterfaceAVKit.mm:
+ (WebCore::supportsPictureInPicture):
+
2020-04-17 Zalan Bujtas <[email protected]>
[LFC][TFC] Resolve the minimum width for overlapping spanner columns
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (260258 => 260259)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2020-04-17 17:13:44 UTC (rev 260259)
@@ -166,7 +166,7 @@
#include "NotImplemented.h"
#endif
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
#include "VideoFullscreenModel.h"
#endif
@@ -5034,7 +5034,7 @@
m_player->setCDM(&m_webKitMediaKeys->cdm());
#endif
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
if (!m_player)
return;
m_player->setVideoFullscreenFrame(m_videoFullscreenFrame);
@@ -6087,7 +6087,7 @@
m_videoFullscreenStandby = value;
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
if (m_player)
m_player->videoFullscreenStandbyChanged();
#endif
@@ -6162,7 +6162,7 @@
m_preparedForInlineCompletionHandler = WTFMove(completionHandler);
}
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
void HTMLMediaElement::willExitFullscreen()
{
Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (260258 => 260259)
--- trunk/Source/WebCore/html/HTMLMediaElement.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -176,7 +176,7 @@
bool isVideoLayerInline();
void setPreparedToReturnVideoLayerToInline(bool);
void waitForPreparedForInlineThen(WTF::Function<void()>&& completionHandler = [] { });
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
RetainPtr<PlatformLayer> createVideoFullscreenLayer();
WEBCORE_EXPORT void setVideoFullscreenLayer(PlatformLayer*, WTF::Function<void()>&& completionHandler = [] { });
#ifdef __OBJC__
@@ -1021,7 +1021,7 @@
bool m_temporarilyAllowingInlinePlaybackAfterFullscreen { false };
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
RetainPtr<PlatformLayer> m_videoFullscreenLayer;
FloatRect m_videoFullscreenFrame;
MediaPlayer::VideoGravity m_videoFullscreenGravity { MediaPlayer::VideoGravity::ResizeAspect };
Modified: trunk/Source/WebCore/html/HTMLVideoElement.cpp (260258 => 260259)
--- trunk/Source/WebCore/html/HTMLVideoElement.cpp 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/html/HTMLVideoElement.cpp 2020-04-17 17:13:44 UTC (rev 260259)
@@ -544,7 +544,7 @@
#endif
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
void HTMLVideoElement::setVideoFullscreenFrame(FloatRect frame)
{
HTMLMediaElement::setVideoFullscreenFrame(frame);
Modified: trunk/Source/WebCore/html/HTMLVideoElement.h (260258 => 260259)
--- trunk/Source/WebCore/html/HTMLVideoElement.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/html/HTMLVideoElement.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -96,7 +96,7 @@
#endif
#endif
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
void setVideoFullscreenFrame(FloatRect) final;
#endif
Modified: trunk/Source/WebCore/platform/PictureInPictureSupport.h (260258 => 260259)
--- trunk/Source/WebCore/platform/PictureInPictureSupport.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/platform/PictureInPictureSupport.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -27,7 +27,7 @@
namespace WebCore {
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
WEBCORE_EXPORT void setSupportsPictureInPicture(bool);
WEBCORE_EXPORT bool supportsPictureInPicture();
#else
Modified: trunk/Source/WebCore/platform/cocoa/VideoFullscreenChangeObserver.h (260258 => 260259)
--- trunk/Source/WebCore/platform/cocoa/VideoFullscreenChangeObserver.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/platform/cocoa/VideoFullscreenChangeObserver.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -26,7 +26,7 @@
#pragma once
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
namespace WebCore {
Modified: trunk/Source/WebCore/platform/cocoa/VideoFullscreenModel.h (260258 => 260259)
--- trunk/Source/WebCore/platform/cocoa/VideoFullscreenModel.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/platform/cocoa/VideoFullscreenModel.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -26,7 +26,7 @@
#pragma once
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
#include "AudioSession.h"
#include "FloatRect.h"
Modified: trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h (260258 => 260259)
--- trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -26,7 +26,7 @@
#pragma once
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
#include "EventListener.h"
#include "FloatRect.h"
Modified: trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm (260258 => 260259)
--- trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm 2020-04-17 17:13:44 UTC (rev 260259)
@@ -24,10 +24,10 @@
*/
#import "config.h"
-
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
#import "VideoFullscreenModelVideoElement.h"
+#if ENABLE(VIDEO_PRESENTATION_MODE)
+
#import "DOMWindow.h"
#import "Event.h"
#import "EventListener.h"
Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp (260258 => 260259)
--- trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp 2020-04-17 17:13:44 UTC (rev 260259)
@@ -755,7 +755,7 @@
return m_private->platformLayer();
}
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
RetainPtr<PlatformLayer> MediaPlayer::createVideoFullscreenLayer()
{
Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.h (260258 => 260259)
--- trunk/Source/WebCore/platform/graphics/MediaPlayer.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -308,7 +308,7 @@
bool doesHaveAttribute(const AtomString&, AtomString* value = nullptr) const;
PlatformLayer* platformLayer() const;
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
RetainPtr<PlatformLayer> createVideoFullscreenLayer();
void setVideoFullscreenLayer(PlatformLayer*, WTF::Function<void()>&& completionHandler = [] { });
void setVideoFullscreenFrame(FloatRect);
Modified: trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h (260258 => 260259)
--- trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -61,7 +61,7 @@
virtual void prepareToPlay() { }
virtual PlatformLayer* platformLayer() const { return nullptr; }
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
virtual RetainPtr<PlatformLayer> createVideoFullscreenLayer() { return nullptr; }
virtual void setVideoFullscreenLayer(PlatformLayer*, WTF::Function<void()>&& completionHandler) { completionHandler(); }
virtual void updateVideoFullscreenInlineImage() { }
Modified: trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm (260258 => 260259)
--- trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2020-04-17 17:13:44 UTC (rev 260259)
@@ -24,9 +24,9 @@
*/
#import "config.h"
+#import "VideoFullscreenInterfaceAVKit.h"
#if PLATFORM(IOS_FAMILY)
-#import "VideoFullscreenInterfaceAVKit.h"
#import "PictureInPictureSupport.h"
@@ -1562,7 +1562,7 @@
bool WebCore::supportsPictureInPicture()
{
-#if PLATFORM(IOS_FAMILY) && HAVE(AVKIT) && !PLATFORM(WATCHOS)
+#if ENABLE(VIDEO_PRESENTATION_MODE) && !PLATFORM(WATCHOS)
if (isPictureInPictureSupported.hasValue())
return *isPictureInPictureSupported;
return [getAVPictureInPictureControllerClass() isPictureInPictureSupported];
Modified: trunk/Source/WebKit/ChangeLog (260258 => 260259)
--- trunk/Source/WebKit/ChangeLog 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/ChangeLog 2020-04-17 17:13:44 UTC (rev 260259)
@@ -1,3 +1,39 @@
+2020-04-17 Peng Liu <[email protected]>
+
+ Cleanup the macros for video fullscreen and picture-in-picture
+ https://bugs.webkit.org/show_bug.cgi?id=210638
+
+ Reviewed by Eric Carlson.
+
+ Replace some "#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))"
+ and all "#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))"
+ with "#if ENABLE(VIDEO_PRESENTATION_MODE)".
+
+ * GPUProcess/media/RemoteMediaPlayerProxy.cpp:
+ (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity):
+ (WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage):
+ (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode):
+ (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged):
+ * UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
+ * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in:
+ * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::didAttachToRunningProcess):
+ (WebKit::WebPageProxy::viewDidLeaveWindow):
+ (WebKit::WebPageProxy::exitFullscreenImmediately):
+ * UIProcess/WebPageProxy.h:
+ * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
+ * WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
+ * WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ * WebProcess/WebCoreSupport/WebChromeClient.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::~WebPage):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/cocoa/VideoFullscreenManager.h:
+ * WebProcess/cocoa/VideoFullscreenManager.messages.in:
+ * WebProcess/cocoa/VideoFullscreenManager.mm:
+
2020-04-17 Claudio Saavedra <[email protected]>
[GTK] Update for GdkKeymap API changes
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp (260258 => 260259)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp 2020-04-17 17:13:44 UTC (rev 260259)
@@ -203,7 +203,7 @@
void RemoteMediaPlayerProxy::setVideoFullscreenGravity(WebCore::MediaPlayerEnums::VideoGravity gravity)
{
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
m_player->setVideoFullscreenGravity(gravity);
#endif
}
@@ -246,7 +246,7 @@
// MediaPlayerClient
void RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage()
{
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
m_player->updateVideoFullscreenInlineImage();
#endif
}
@@ -253,7 +253,7 @@
void RemoteMediaPlayerProxy::setVideoFullscreenMode(MediaPlayer::VideoFullscreenMode mode)
{
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
m_player->setVideoFullscreenMode(mode);
#endif
}
@@ -265,7 +265,7 @@
void RemoteMediaPlayerProxy::videoFullscreenStandbyChanged()
{
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
m_player->videoFullscreenStandbyChanged();
#endif
}
Modified: trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h (260258 => 260259)
--- trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -25,7 +25,7 @@
#pragma once
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
#include "MessageReceiver.h"
#include <WebCore/AudioSession.h>
@@ -193,5 +193,4 @@
} // namespace WebKit
-#endif // PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
-
+#endif // ENABLE(VIDEO_PRESENTATION_MODE)
Modified: trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in (260258 => 260259)
--- trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in 2020-04-17 17:13:44 UTC (rev 260259)
@@ -20,7 +20,7 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
messages -> VideoFullscreenManagerProxy {
SetHasVideo(uint64_t contextId, bool hasVideo)
SetVideoDimensions(uint64_t contextId, WebCore::FloatSize videoDimensions)
@@ -32,7 +32,7 @@
CleanupFullscreen(uint64_t contextId)
PreparedToReturnToInline(uint64_t contextId, bool visible, WebCore::IntRect inlineRect)
PreparedToExitFullscreen(uint64_t contextId)
-#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
+#if PLATFORM(MAC)
ExitFullscreenWithoutAnimationToMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode)
#endif
}
Modified: trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm (260258 => 260259)
--- trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm 2020-04-17 17:13:44 UTC (rev 260259)
@@ -26,7 +26,7 @@
#import "config.h"
#import "VideoFullscreenManagerProxy.h"
-#if PLATFORM(IOS_FAMILY) && HAVE(AVKIT) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
#import "APIUIClient.h"
#import "DrawingAreaProxy.h"
@@ -731,4 +731,4 @@
#undef MESSAGE_CHECK_CONTEXTID
#undef MESSAGE_CHECK
-#endif // PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#endif // ENABLE(VIDEO_PRESENTATION_MODE)
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (260258 => 260259)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-04-17 17:13:44 UTC (rev 260259)
@@ -952,7 +952,7 @@
ASSERT(!m_fullScreenManager);
m_fullScreenManager = makeUnique<WebFullScreenManagerProxy>(*this, pageClient().fullScreenManagerProxyClient());
#endif
-#if PLATFORM(IOS_FAMILY) && HAVE(AVKIT) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
ASSERT(!m_playbackSessionManager);
m_playbackSessionManager = PlaybackSessionManagerProxy::create(*this);
ASSERT(!m_videoFullscreenManager);
@@ -1932,7 +1932,7 @@
void WebPageProxy::viewDidLeaveWindow()
{
closeOverlayedViews();
-#if PLATFORM(IOS_FAMILY) && HAVE(AVKIT) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
// When leaving the current page, close the video fullscreen.
if (m_videoFullscreenManager && m_videoFullscreenManager->hasMode(WebCore::HTMLMediaElementEnums::VideoFullscreenModeStandard))
m_videoFullscreenManager->requestHideAndExitFullscreen();
@@ -5545,7 +5545,7 @@
fullScreenManager()->close();
#endif
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
if (videoFullscreenManager())
videoFullscreenManager()->requestHideAndExitFullscreen();
#endif
@@ -6149,7 +6149,7 @@
}
#endif
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
PlaybackSessionManagerProxy* WebPageProxy::playbackSessionManager()
{
return m_playbackSessionManager.get();
@@ -7504,7 +7504,7 @@
m_visibleScrollerThumbRect = IntRect();
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
if (m_playbackSessionManager) {
m_playbackSessionManager->invalidate();
m_playbackSessionManager = nullptr;
@@ -8902,7 +8902,7 @@
bool WebPageProxy::hasActiveVideoForControlsManager() const
{
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
return m_playbackSessionManager && m_playbackSessionManager->controlsManagerInterface();
#else
return false;
@@ -8911,7 +8911,7 @@
void WebPageProxy::requestControlledElementID() const
{
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
if (m_playbackSessionManager)
m_playbackSessionManager->requestControlledElementID();
#endif
@@ -8926,7 +8926,7 @@
bool WebPageProxy::isPlayingVideoInEnhancedFullscreen() const
{
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
return m_videoFullscreenManager && m_videoFullscreenManager->isPlayingVideoInEnhancedFullscreen();
#else
return false;
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (260258 => 260259)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -522,7 +522,7 @@
API::FullscreenClient& fullscreenClient() const { return *m_fullscreenClient; }
void setFullscreenClient(std::unique_ptr<API::FullscreenClient>&&);
#endif
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
PlaybackSessionManagerProxy* playbackSessionManager();
VideoFullscreenManagerProxy* videoFullscreenManager();
#endif
@@ -2364,7 +2364,7 @@
std::unique_ptr<API::FullscreenClient> m_fullscreenClient;
#endif
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
RefPtr<PlaybackSessionManagerProxy> m_playbackSessionManager;
RefPtr<VideoFullscreenManagerProxy> m_videoFullscreenManager;
#endif
Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp (260258 => 260259)
--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp 2020-04-17 17:13:44 UTC (rev 260259)
@@ -644,7 +644,7 @@
return m_videoInlineLayer.get();
}
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
void MediaPlayerPrivateRemote::setVideoFullscreenLayer(PlatformLayer* videoFullscreenLayer, WTF::Function<void()>&& completionHandler)
{
Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h (260258 => 260259)
--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -182,7 +182,7 @@
PlatformLayer* platformLayer() const final;
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
PlatformLayerContainer createVideoFullscreenLayer() final;
void setVideoFullscreenLayer(PlatformLayer*, WTF::Function<void()>&& completionHandler) final;
void updateVideoFullscreenInlineImage() final;
Modified: trunk/Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm (260258 => 260259)
--- trunk/Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm 2020-04-17 17:13:44 UTC (rev 260259)
@@ -34,7 +34,7 @@
namespace WebKit {
-#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
PlatformLayerContainer MediaPlayerPrivateRemote::createVideoFullscreenLayer()
{
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (260258 => 260259)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp 2020-04-17 17:13:44 UTC (rev 260259)
@@ -86,6 +86,9 @@
#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
#include "PlaybackSessionManager.h"
+#endif
+
+#if ENABLE(VIDEO_PRESENTATION_MODE)
#include "VideoFullscreenManager.h"
#endif
@@ -972,7 +975,7 @@
#endif
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
bool WebChromeClient::supportsVideoFullscreen(HTMLMediaElementEnums::VideoFullscreenMode mode)
{
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h (260258 => 260259)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -261,7 +261,7 @@
RefPtr<WebCore::ScrollingCoordinator> createScrollingCoordinator(WebCore::Page&) const final;
#endif
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
bool supportsVideoFullscreen(WebCore::HTMLMediaElementEnums::VideoFullscreenMode) final;
bool supportsVideoFullscreenStandby() final;
void setUpPlaybackControlsManager(WebCore::HTMLMediaElement&) final;
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (260258 => 260259)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-04-17 17:13:44 UTC (rev 260259)
@@ -872,7 +872,7 @@
webPageCounter.decrement();
#endif
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
if (m_playbackSessionManager)
m_playbackSessionManager->invalidate();
@@ -3839,7 +3839,7 @@
send(Messages::WebPageProxy::DidChangeInspectorFrontendCount(count));
}
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
PlaybackSessionManager& WebPage::playbackSessionManager()
{
if (!m_playbackSessionManager)
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (260258 => 260259)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -361,10 +361,13 @@
#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
PlaybackSessionManager& playbackSessionManager();
- VideoFullscreenManager& videoFullscreenManager();
void videoControlsManagerDidChange();
#endif
+#if ENABLE(VIDEO_PRESENTATION_MODE)
+ VideoFullscreenManager& videoFullscreenManager();
+#endif
+
#if PLATFORM(IOS_FAMILY)
void setAllowsMediaDocumentInlinePlayback(bool);
bool allowsMediaDocumentInlinePlayback() const { return m_allowsMediaDocumentInlinePlayback; }
@@ -1844,7 +1847,7 @@
RefPtr<RemoteWebInspectorUI> m_remoteInspectorUI;
std::unique_ptr<WebPageInspectorTargetController> m_inspectorTargetController;
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
RefPtr<PlaybackSessionManager> m_playbackSessionManager;
RefPtr<VideoFullscreenManager> m_videoFullscreenManager;
#endif
Modified: trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h (260258 => 260259)
--- trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h 2020-04-17 17:13:44 UTC (rev 260259)
@@ -25,7 +25,7 @@
#pragma once
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
#include "Connection.h"
#include "MessageReceiver.h"
@@ -166,5 +166,5 @@
} // namespace WebKit
-#endif // PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#endif // ENABLE(VIDEO_PRESENTATION_MODE)
Modified: trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.messages.in (260258 => 260259)
--- trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.messages.in 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.messages.in 2020-04-17 17:13:44 UTC (rev 260259)
@@ -20,7 +20,7 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
messages -> VideoFullscreenManager {
RequestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode, bool finishedWithMedia)
RequestUpdateInlineRect(uint64_t contextId)
Modified: trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm (260258 => 260259)
--- trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm 2020-04-17 17:01:32 UTC (rev 260258)
+++ trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm 2020-04-17 17:13:44 UTC (rev 260259)
@@ -25,7 +25,7 @@
#import "config.h"
#import "VideoFullscreenManager.h"
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#if ENABLE(VIDEO_PRESENTATION_MODE)
#import "Attachment.h"
#import "LayerHostingContext.h"
@@ -570,4 +570,4 @@
} // namespace WebKit
-#endif // PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+#endif // ENABLE(VIDEO_PRESENTATION_MODE)