Title: [260412] trunk
Revision
260412
Author
peng.l...@apple.com
Date
2020-04-20 21:06:11 -0700 (Mon, 20 Apr 2020)

Log Message

Fix build failures when video fullscreen and picture-in-picture is disabled
https://bugs.webkit.org/show_bug.cgi?id=210777

Reviewed by Eric Carlson.

Source/_javascript_Core:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Wrap video fullscreen and picture-in-picture related code with "#if ENABLE(VIDEO_PRESENTATION_MODE)".

* Configurations/FeatureDefines.xcconfig:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
* platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h:
* platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm:
(WebCore::VideoLayerManagerObjC::setVideoLayer):
(WebCore::VideoLayerManagerObjC::requiresTextTrackRepresentation const):
(WebCore::VideoLayerManagerObjC::syncTextTrackBounds):
(WebCore::VideoLayerManagerObjC::setTextTrackRepresentation):

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Wrap video fullscreen and picture-in-picture related code with "#if ENABLE(VIDEO_PRESENTATION_MODE)".

* Configurations/FeatureDefines.xcconfig:
* GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity):
(WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage):
(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode):
(WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged):
(WebKit::RemoteMediaPlayerProxy::setBufferingPolicy):
* GPUProcess/media/RemoteMediaPlayerProxy.h:
* GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
* GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:
(WebKit::RemoteMediaPlayerProxy::prepareForPlayback):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::prepareForPlayback):

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/PlatformEnable.h:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (260411 => 260412)


--- trunk/Source/_javascript_Core/ChangeLog	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-04-21 04:06:11 UTC (rev 260412)
@@ -1,3 +1,12 @@
+2020-04-20  Peng Liu  <peng.l...@apple.com>
+
+        Fix build failures when video fullscreen and picture-in-picture is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=210777
+
+        Reviewed by Eric Carlson.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2020-04-20  Ross Kirsling  <ross.kirsl...@sony.com>
 
         Intl classes shouldn't need an m_initialized* field

Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (260411 => 260412)


--- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2020-04-21 04:06:11 UTC (rev 260412)
@@ -372,7 +372,10 @@
 
 ENABLE_VIDEO = ENABLE_VIDEO;
 
-ENABLE_VIDEO_PRESENTATION_MODE = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE = $(ENABLE_VIDEO_PRESENTATION_MODE_$(WK_PLATFORM_NAME));
+ENABLE_VIDEO_PRESENTATION_MODE_iphoneos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx = ENABLE_VIDEO_PRESENTATION_MODE;
 
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 

Modified: trunk/Source/WTF/ChangeLog (260411 => 260412)


--- trunk/Source/WTF/ChangeLog	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WTF/ChangeLog	2020-04-21 04:06:11 UTC (rev 260412)
@@ -1,3 +1,12 @@
+2020-04-20  Peng Liu  <peng.l...@apple.com>
+
+        Fix build failures when video fullscreen and picture-in-picture is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=210777
+
+        Reviewed by Eric Carlson.
+
+        * wtf/PlatformEnable.h:
+
 2020-04-20  Yusuke Suzuki  <ysuz...@apple.com>
 
         Add document about WTF malloc-related macros

Modified: trunk/Source/WTF/wtf/PlatformEnable.h (260411 => 260412)


--- trunk/Source/WTF/wtf/PlatformEnable.h	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WTF/wtf/PlatformEnable.h	2020-04-21 04:06:11 UTC (rev 260412)
@@ -270,11 +270,11 @@
 #define ENABLE_FULLSCREEN_API 0
 #endif
 
-#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || PLATFORM(MAC)
+#if ((PLATFORM(IOS) || PLATFORM(WATCHOS)) && HAVE(AVKIT)) || PLATFORM(MAC)
+#if !defined(ENABLE_VIDEO_PRESENTATION_MODE)
 #define ENABLE_VIDEO_PRESENTATION_MODE 1
-#else
-#define ENABLE_VIDEO_PRESENTATION_MODE 0
 #endif
+#endif
 
 #if !defined(ENABLE_GAMEPAD)
 #define ENABLE_GAMEPAD 0

Modified: trunk/Source/WebCore/ChangeLog (260411 => 260412)


--- trunk/Source/WebCore/ChangeLog	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebCore/ChangeLog	2020-04-21 04:06:11 UTC (rev 260412)
@@ -1,3 +1,22 @@
+2020-04-20  Peng Liu  <peng.l...@apple.com>
+
+        Fix build failures when video fullscreen and picture-in-picture is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=210777
+
+        Reviewed by Eric Carlson.
+
+        Wrap video fullscreen and picture-in-picture related code with "#if ENABLE(VIDEO_PRESENTATION_MODE)".
+
+        * Configurations/FeatureDefines.xcconfig:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
+        * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h:
+        * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm:
+        (WebCore::VideoLayerManagerObjC::setVideoLayer):
+        (WebCore::VideoLayerManagerObjC::requiresTextTrackRepresentation const):
+        (WebCore::VideoLayerManagerObjC::syncTextTrackBounds):
+        (WebCore::VideoLayerManagerObjC::setTextTrackRepresentation):
+
 2020-04-20  Nikos Mouchtaris  <nmouchta...@apple.com>
 
         WK2 Quicklook for attachments

Modified: trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig (260411 => 260412)


--- trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig	2020-04-21 04:06:11 UTC (rev 260412)
@@ -372,7 +372,10 @@
 
 ENABLE_VIDEO = ENABLE_VIDEO;
 
-ENABLE_VIDEO_PRESENTATION_MODE = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE = $(ENABLE_VIDEO_PRESENTATION_MODE_$(WK_PLATFORM_NAME));
+ENABLE_VIDEO_PRESENTATION_MODE_iphoneos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx = ENABLE_VIDEO_PRESENTATION_MODE;
 
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 

Modified: trunk/Source/WebCore/PAL/ChangeLog (260411 => 260412)


--- trunk/Source/WebCore/PAL/ChangeLog	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebCore/PAL/ChangeLog	2020-04-21 04:06:11 UTC (rev 260412)
@@ -1,3 +1,12 @@
+2020-04-20  Peng Liu  <peng.l...@apple.com>
+
+        Fix build failures when video fullscreen and picture-in-picture is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=210777
+
+        Reviewed by Eric Carlson.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2020-04-20  Darin Adler  <da...@apple.com>
 
         Use #import instead of #include in Objective-C and don't use #pragma once

Modified: trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig (260411 => 260412)


--- trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig	2020-04-21 04:06:11 UTC (rev 260412)
@@ -372,7 +372,10 @@
 
 ENABLE_VIDEO = ENABLE_VIDEO;
 
-ENABLE_VIDEO_PRESENTATION_MODE = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE = $(ENABLE_VIDEO_PRESENTATION_MODE_$(WK_PLATFORM_NAME));
+ENABLE_VIDEO_PRESENTATION_MODE_iphoneos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx = ENABLE_VIDEO_PRESENTATION_MODE;
 
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (260411 => 260412)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2020-04-21 04:06:11 UTC (rev 260412)
@@ -1805,10 +1805,12 @@
     if (!m_videoLayer)
         return;
 
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     // Do not attempt to change the video gravity while in full screen mode.
     // See setVideoFullscreenGravity().
     if (m_videoLayerManager->videoFullscreenLayer())
         return;
+#endif
 
     [CATransaction begin];
     [CATransaction setDisableActions:YES];    

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h (260411 => 260412)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h	2020-04-21 04:06:11 UTC (rev 260412)
@@ -46,13 +46,16 @@
     VideoLayerManagerObjC(const Logger&, const void*);
 
     PlatformLayer *videoInlineLayer() const { return m_videoInlineLayer.get(); }
+    void setVideoLayer(PlatformLayer *, IntSize contentSize);
+
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     PlatformLayer *videoFullscreenLayer() const { return m_videoFullscreenLayer.get(); }
     FloatRect videoFullscreenFrame() const { return m_videoFullscreenFrame; }
-
-    void setVideoLayer(PlatformLayer *, IntSize contentSize);
     void setVideoFullscreenLayer(PlatformLayer *, WTF::Function<void()>&& completionHandler, NativeImagePtr);
     void updateVideoFullscreenInlineImage(NativeImagePtr);
     void setVideoFullscreenFrame(FloatRect);
+#endif
+
     void didDestroyVideoLayer();
 
     bool requiresTextTrackRepresentation() const;
@@ -70,10 +73,12 @@
 
     RetainPtr<PlatformLayer> m_textTrackRepresentationLayer;
     RetainPtr<WebVideoContainerLayer> m_videoInlineLayer;
+    FloatRect m_videoInlineFrame;
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     RetainPtr<PlatformLayer> m_videoFullscreenLayer;
+    FloatRect m_videoFullscreenFrame;
+#endif
     RetainPtr<PlatformLayer> m_videoLayer;
-    FloatRect m_videoFullscreenFrame;
-    FloatRect m_videoInlineFrame;
 };
 
 }

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm (260411 => 260412)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm	2020-04-21 04:06:11 UTC (rev 260412)
@@ -66,15 +66,20 @@
     if ([videoLayer isKindOfClass:PAL::getAVPlayerLayerClass()])
         [m_videoInlineLayer setPlayerLayer:(AVPlayerLayer *)videoLayer];
 
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     if (m_videoFullscreenLayer) {
         [m_videoLayer setFrame:CGRectMake(0, 0, m_videoFullscreenFrame.width(), m_videoFullscreenFrame.height())];
         [m_videoFullscreenLayer insertSublayer:m_videoLayer.get() atIndex:0];
-    } else {
+    } else
+#endif
+    {
         [m_videoInlineLayer insertSublayer:m_videoLayer.get() atIndex:0];
         [m_videoLayer setFrame:m_videoInlineLayer.get().bounds];
     }
 }
 
+#if ENABLE(VIDEO_PRESENTATION_MODE)
+
 void VideoLayerManagerObjC::updateVideoFullscreenInlineImage(NativeImagePtr image)
 {
     if (m_videoInlineLayer)
@@ -140,6 +145,8 @@
     syncTextTrackBounds();
 }
 
+#endif
+
 void VideoLayerManagerObjC::didDestroyVideoLayer()
 {
     ALWAYS_LOG(LOGIDENTIFIER);
@@ -152,11 +159,16 @@
 
 bool VideoLayerManagerObjC::requiresTextTrackRepresentation() const
 {
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     return m_videoFullscreenLayer;
+#else
+    return false;
+#endif
 }
 
 void VideoLayerManagerObjC::syncTextTrackBounds()
 {
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     if (!m_videoFullscreenLayer || !m_textTrackRepresentationLayer)
         return;
 
@@ -169,10 +181,14 @@
     [m_textTrackRepresentationLayer setFrame:m_videoFullscreenFrame];
 
     [CATransaction commit];
+#endif
 }
 
 void VideoLayerManagerObjC::setTextTrackRepresentation(TextTrackRepresentation* representation)
 {
+#if !ENABLE(VIDEO_PRESENTATION_MODE)
+    UNUSED_PARAM(representation);
+#else
     ALWAYS_LOG(LOGIDENTIFIER);
 
     PlatformLayer* representationLayer = representation ? representation->platformLayer() : nil;
@@ -195,6 +211,7 @@
     }
 
     [CATransaction commit];
+#endif
 }
 
 WTFLogChannel& VideoLayerManagerObjC::logChannel() const

Modified: trunk/Source/WebKit/ChangeLog (260411 => 260412)


--- trunk/Source/WebKit/ChangeLog	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebKit/ChangeLog	2020-04-21 04:06:11 UTC (rev 260412)
@@ -1,3 +1,26 @@
+2020-04-20  Peng Liu  <peng.l...@apple.com>
+
+        Fix build failures when video fullscreen and picture-in-picture is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=210777
+
+        Reviewed by Eric Carlson.
+
+        Wrap video fullscreen and picture-in-picture related code with "#if ENABLE(VIDEO_PRESENTATION_MODE)".
+
+        * Configurations/FeatureDefines.xcconfig:
+        * GPUProcess/media/RemoteMediaPlayerProxy.cpp:
+        (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity):
+        (WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage):
+        (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode):
+        (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged):
+        (WebKit::RemoteMediaPlayerProxy::setBufferingPolicy):
+        * GPUProcess/media/RemoteMediaPlayerProxy.h:
+        * GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
+        * GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:
+        (WebKit::RemoteMediaPlayerProxy::prepareForPlayback):
+        * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
+        (WebKit::MediaPlayerPrivateRemote::prepareForPlayback):
+
 2020-04-20  Alex Christensen  <achristen...@webkit.org>
 
         SPI clients using fastServerTrustEvaluationEnabled need SPI to inform them of modern TLS negotiation

Modified: trunk/Source/WebKit/Configurations/FeatureDefines.xcconfig (260411 => 260412)


--- trunk/Source/WebKit/Configurations/FeatureDefines.xcconfig	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebKit/Configurations/FeatureDefines.xcconfig	2020-04-21 04:06:11 UTC (rev 260412)
@@ -372,7 +372,10 @@
 
 ENABLE_VIDEO = ENABLE_VIDEO;
 
-ENABLE_VIDEO_PRESENTATION_MODE = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE = $(ENABLE_VIDEO_PRESENTATION_MODE_$(WK_PLATFORM_NAME));
+ENABLE_VIDEO_PRESENTATION_MODE_iphoneos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx = ENABLE_VIDEO_PRESENTATION_MODE;
 
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 

Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp (260411 => 260412)


--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp	2020-04-21 04:06:11 UTC (rev 260412)
@@ -201,12 +201,12 @@
     m_player->setShouldMaintainAspectRatio(maintainRatio);
 }
 
+#if ENABLE(VIDEO_PRESENTATION_MODE)
 void RemoteMediaPlayerProxy::setVideoFullscreenGravity(WebCore::MediaPlayerEnums::VideoGravity gravity)
 {
-#if ENABLE(VIDEO_PRESENTATION_MODE)
     m_player->setVideoFullscreenGravity(gravity);
+}
 #endif
-}
 
 void RemoteMediaPlayerProxy::acceleratedRenderingStateChanged(bool renderingCanBeAccelerated)
 {
@@ -244,30 +244,27 @@
 }
 
 // MediaPlayerClient
+#if ENABLE(VIDEO_PRESENTATION_MODE)
 void RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage()
 {
-#if ENABLE(VIDEO_PRESENTATION_MODE)
     m_player->updateVideoFullscreenInlineImage();
-#endif
 }
 
 void RemoteMediaPlayerProxy::setVideoFullscreenMode(MediaPlayer::VideoFullscreenMode mode)
 {
-#if ENABLE(VIDEO_PRESENTATION_MODE)
     m_player->setVideoFullscreenMode(mode);
-#endif
-}
 
-void RemoteMediaPlayerProxy::setBufferingPolicy(MediaPlayer::BufferingPolicy policy)
-{
-    m_player->setBufferingPolicy(policy);
 }
 
 void RemoteMediaPlayerProxy::videoFullscreenStandbyChanged()
 {
-#if ENABLE(VIDEO_PRESENTATION_MODE)
     m_player->videoFullscreenStandbyChanged();
+}
 #endif
+
+void RemoteMediaPlayerProxy::setBufferingPolicy(MediaPlayer::BufferingPolicy policy)
+{
+    m_player->setBufferingPolicy(policy);
 }
 
 #if PLATFORM(IOS_FAMILY)
@@ -677,6 +674,7 @@
     return 0;
 }
 
+#if ENABLE(VIDEO_PRESENTATION_MODE)
 MediaPlayerEnums::VideoFullscreenMode RemoteMediaPlayerProxy::mediaPlayerFullscreenMode() const
 {
     notImplemented();
@@ -688,6 +686,7 @@
     notImplemented();
     return false;
 }
+#endif
 
 bool RemoteMediaPlayerProxy::mediaPlayerShouldDisableSleep() const
 {

Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h (260411 => 260412)


--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h	2020-04-21 04:06:11 UTC (rev 260412)
@@ -82,13 +82,14 @@
     MediaPlayerPrivateRemoteIdentifier idendifier() const { return m_id; }
     void invalidate();
 
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     void updateVideoFullscreenInlineImage();
     void setVideoFullscreenMode(WebCore::MediaPlayer::VideoFullscreenMode);
+    void videoFullscreenStandbyChanged();
+#endif
 
     void setBufferingPolicy(WebCore::MediaPlayer::BufferingPolicy);
 
-    void videoFullscreenStandbyChanged();
-
 #if PLATFORM(IOS_FAMILY)
     void accessLog(CompletionHandler<void(String)>&&);
     void errorLog(CompletionHandler<void(String)>&&);
@@ -122,9 +123,11 @@
 
     void setVisible(bool);
     void setShouldMaintainAspectRatio(bool);
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     void enterFullscreen(CompletionHandler<void()>&&);
     void exitFullscreen(CompletionHandler<void()>&&);
     void setVideoFullscreenGravity(WebCore::MediaPlayerEnums::VideoGravity);
+#endif
     void acceleratedRenderingStateChanged(bool);
     void setShouldDisableSleep(bool);
     void setRate(double);
@@ -135,8 +138,10 @@
 
 #if PLATFORM(COCOA)
     void setVideoInlineSizeFenced(const WebCore::IntSize&, const WTF::MachSendRight&);
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     void setVideoFullscreenFrameFenced(const WebCore::FloatRect&, const WTF::MachSendRight&);
 #endif
+#endif
 
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
     void setWirelessVideoPlaybackDisabled(bool);
@@ -252,8 +257,10 @@
     String mediaPlayerSourceApplicationIdentifier() const final;
 
     double mediaPlayerRequestedPlaybackRate() const final;
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     WebCore::MediaPlayerEnums::VideoFullscreenMode mediaPlayerFullscreenMode() const final;
     bool mediaPlayerIsVideoFullscreenStandby() const final;
+#endif
     Vector<String> mediaPlayerPreferredAudioCharacteristics() const final;
 
     bool mediaPlayerShouldDisableSleep() const final;
@@ -279,7 +286,9 @@
     Ref<IPC::Connection> m_webProcessConnection;
     RefPtr<WebCore::MediaPlayer> m_player;
     std::unique_ptr<LayerHostingContext> m_inlineLayerHostingContext;
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     std::unique_ptr<LayerHostingContext> m_fullscreenLayerHostingContext;
+#endif
     RemoteMediaPlayerManagerProxy& m_manager;
     WebCore::MediaPlayerEnums::MediaEngineIdentifier m_engineIdentifier;
     Vector<WebCore::ContentType> m_typesRequiringHardwareSupport;

Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in (260411 => 260412)


--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in	2020-04-21 04:06:11 UTC (rev 260412)
@@ -47,14 +47,18 @@
     PrepareForRendering()
     SetVisible(bool visible)
     SetShouldMaintainAspectRatio(bool maintainAspectRatio)
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     SetVideoFullscreenGravity(enum:uint8_t WebCore::MediaPlayerEnums::VideoGravity gravity)
+#endif
     AcceleratedRenderingStateChanged(bool canBeAccelerated)
     SetShouldDisableSleep(bool disable)
     SetRate(double rate)
 
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     UpdateVideoFullscreenInlineImage()
     SetVideoFullscreenMode(WebCore::MediaPlayer::VideoFullscreenMode mode)
     VideoFullscreenStandbyChanged()
+#endif
 
     SetBufferingPolicy(WebCore::MediaPlayer::BufferingPolicy policy)
 
@@ -64,11 +68,15 @@
 
 #if PLATFORM(COCOA)
     SetVideoInlineSizeFenced(WebCore::IntSize size, MachSendRight machSendRight)
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     SetVideoFullscreenFrameFenced(WebCore::FloatRect rect, MachSendRight machSendRight)
 #endif
+#endif
 
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     EnterFullscreen() -> () Async
     ExitFullscreen() -> () Async
+#endif
 
     # Paint
     # PaintCurrentFrameInContext

Modified: trunk/Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm (260411 => 260412)


--- trunk/Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm	2020-04-21 04:06:11 UTC (rev 260412)
@@ -45,9 +45,11 @@
     m_videoContentScale = videoContentScale;
     if (!m_inlineLayerHostingContext)
         m_inlineLayerHostingContext = LayerHostingContext::createForExternalHostingProcess();
+#if ENABLE(VIDEO_PRESENTATION_MODE)
     if (!m_fullscreenLayerHostingContext)
         m_fullscreenLayerHostingContext = LayerHostingContext::createForExternalHostingProcess();
     completionHandler(m_inlineLayerHostingContext->contextID(), m_fullscreenLayerHostingContext->contextID());
+#endif
 }
 
 void RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable()
@@ -72,6 +74,7 @@
     [CATransaction commit];
 }
 
+#if ENABLE(VIDEO_PRESENTATION_MODE)
 void RemoteMediaPlayerProxy::enterFullscreen(CompletionHandler<void()>&& completionHandler)
 {
     auto videoFullscreenLayer = m_player->createVideoFullscreenLayer();
@@ -93,6 +96,7 @@
     m_fullscreenLayerHostingContext->setFencePort(machSendRight.sendRight());
     m_player->setVideoFullscreenFrame(rect);
 }
+#endif
 
 } // namespace WebKit
 

Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp (260411 => 260412)


--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp	2020-04-21 04:06:11 UTC (rev 260412)
@@ -129,8 +129,9 @@
             return;
 
         m_videoInlineLayer = createVideoLayerRemote(this, inlineLayerHostingContextId.value());
-
+#if ENABLE(VIDEO_PRESENTATION_MODE)
         m_fullscreenLayerHostingContextId = fullscreenLayerHostingContextId;
+#endif
     }, m_id);
 }
 

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (260411 => 260412)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2020-04-21 04:06:11 UTC (rev 260412)
@@ -1,3 +1,12 @@
+2020-04-20  Peng Liu  <peng.l...@apple.com>
+
+        Fix build failures when video fullscreen and picture-in-picture is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=210777
+
+        Reviewed by Eric Carlson.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2020-04-20  Darin Adler  <da...@apple.com>
 
         Use #import instead of #include in Objective-C and don't use #pragma once

Modified: trunk/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig (260411 => 260412)


--- trunk/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig	2020-04-21 04:06:11 UTC (rev 260412)
@@ -372,7 +372,10 @@
 
 ENABLE_VIDEO = ENABLE_VIDEO;
 
-ENABLE_VIDEO_PRESENTATION_MODE = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE = $(ENABLE_VIDEO_PRESENTATION_MODE_$(WK_PLATFORM_NAME));
+ENABLE_VIDEO_PRESENTATION_MODE_iphoneos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx = ENABLE_VIDEO_PRESENTATION_MODE;
 
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 

Modified: trunk/Tools/ChangeLog (260411 => 260412)


--- trunk/Tools/ChangeLog	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Tools/ChangeLog	2020-04-21 04:06:11 UTC (rev 260412)
@@ -1,3 +1,12 @@
+2020-04-20  Peng Liu  <peng.l...@apple.com>
+
+        Fix build failures when video fullscreen and picture-in-picture is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=210777
+
+        Reviewed by Eric Carlson.
+
+        * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
+
 2020-04-20  Alex Christensen  <achristen...@webkit.org>
 
         SPI clients using fastServerTrustEvaluationEnabled need SPI to inform them of modern TLS negotiation

Modified: trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig (260411 => 260412)


--- trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig	2020-04-21 04:04:10 UTC (rev 260411)
+++ trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig	2020-04-21 04:06:11 UTC (rev 260412)
@@ -372,7 +372,10 @@
 
 ENABLE_VIDEO = ENABLE_VIDEO;
 
-ENABLE_VIDEO_PRESENTATION_MODE = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE = $(ENABLE_VIDEO_PRESENTATION_MODE_$(WK_PLATFORM_NAME));
+ENABLE_VIDEO_PRESENTATION_MODE_iphoneos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx = ENABLE_VIDEO_PRESENTATION_MODE;
 
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to