- Revision
- 276918
- Author
- [email protected]
- Date
- 2021-05-03 12:58:44 -0700 (Mon, 03 May 2021)
Log Message
[macCatalyst] "Enter Full Screen" button in media controls disappears
https://bugs.webkit.org/show_bug.cgi?id=225210
<rdar://problem/77010150>
Reviewed by Eric Carlson.
In order for the "Enter Full Screen" media controls button to stay visible the `<video>`
must return `true` for `HTMLMediaElement::webkitSupportsFullscreen`, which calls into
`MediaPlayerPrivate::supportsFullscreen`. On macOS and iOS, this will always return `true`
because of `ENABLE(FULLSCREEN_API)`, but on macCatalyst that's not enabled, so we instead
use `DeprecatedGlobalSettings::avKitEnabled`, but this is only set in the WebProcess (and
WK1). With the GPUProcess enabled, this value is not set, so the `RemoteMediaPlayerProxy`
will instead get `false`.
This patch removes `DeprecatedGlobalSettings::avKitEnabled` since it's enabled on WK1 and
non-GPUProcess WK2, and the related iOS-only SPI appears to not be used anywhere internally,
instead having callsites just check `HAVE(AVKIT)`.
Source/WebCore:
* page/DeprecatedGlobalSettings.h:
(WebCore::DeprecatedGlobalSettings::setAVKitEnabled): Deleted.
(WebCore::DeprecatedGlobalSettings::avKitEnabled): Deleted.
* page/DeprecatedGlobalSettings.cpp:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen const):
Source/WebKit:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/cocoa/VideoFullscreenManager.mm:
(WebKit::VideoFullscreenManager::supportsVideoFullscreen const):
Source/WebKitLegacy/mac:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::supportsVideoFullscreen):
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferencesPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences avKitEnabled]): Deleted.
(-[WebPreferences setAVKitEnabled:]): Deleted.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (276917 => 276918)
--- trunk/Source/WebCore/ChangeLog 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebCore/ChangeLog 2021-05-03 19:58:44 UTC (rev 276918)
@@ -1,3 +1,31 @@
+2021-05-03 Devin Rousso <[email protected]>
+
+ [macCatalyst] "Enter Full Screen" button in media controls disappears
+ https://bugs.webkit.org/show_bug.cgi?id=225210
+ <rdar://problem/77010150>
+
+ Reviewed by Eric Carlson.
+
+ In order for the "Enter Full Screen" media controls button to stay visible the `<video>`
+ must return `true` for `HTMLMediaElement::webkitSupportsFullscreen`, which calls into
+ `MediaPlayerPrivate::supportsFullscreen`. On macOS and iOS, this will always return `true`
+ because of `ENABLE(FULLSCREEN_API)`, but on macCatalyst that's not enabled, so we instead
+ use `DeprecatedGlobalSettings::avKitEnabled`, but this is only set in the WebProcess (and
+ WK1). With the GPUProcess enabled, this value is not set, so the `RemoteMediaPlayerProxy`
+ will instead get `false`.
+
+ This patch removes `DeprecatedGlobalSettings::avKitEnabled` since it's enabled on WK1 and
+ non-GPUProcess WK2, and the related iOS-only SPI appears to not be used anywhere internally,
+ instead having callsites just check `HAVE(AVKIT)`.
+
+ * page/DeprecatedGlobalSettings.h:
+ (WebCore::DeprecatedGlobalSettings::setAVKitEnabled): Deleted.
+ (WebCore::DeprecatedGlobalSettings::avKitEnabled): Deleted.
+ * page/DeprecatedGlobalSettings.cpp:
+
+ * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+ (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen const):
+
2021-05-03 Philippe Normand <[email protected]>
[GTK] Build with VIDEO=OFF fails
Modified: trunk/Source/WebCore/page/DeprecatedGlobalSettings.cpp (276917 => 276918)
--- trunk/Source/WebCore/page/DeprecatedGlobalSettings.cpp 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebCore/page/DeprecatedGlobalSettings.cpp 2021-05-03 19:58:44 UTC (rev 276918)
@@ -55,7 +55,6 @@
#if PLATFORM(IOS_FAMILY)
bool DeprecatedGlobalSettings::gNetworkDataUsageTrackingEnabled = false;
-bool DeprecatedGlobalSettings::gAVKitEnabled = false;
bool DeprecatedGlobalSettings::gShouldOptOutOfNetworkStateObservation = false;
bool DeprecatedGlobalSettings::gDisableScreenSizeOverride = false;
#endif
Modified: trunk/Source/WebCore/page/DeprecatedGlobalSettings.h (276917 => 276918)
--- trunk/Source/WebCore/page/DeprecatedGlobalSettings.h 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebCore/page/DeprecatedGlobalSettings.h 2021-05-03 19:58:44 UTC (rev 276918)
@@ -78,10 +78,6 @@
static void setDisableScreenSizeOverride(bool flag) { gDisableScreenSizeOverride = flag; }
static bool disableScreenSizeOverride() { return gDisableScreenSizeOverride; }
-#if HAVE(AVKIT)
- static void setAVKitEnabled(bool flag) { gAVKitEnabled = flag; }
-#endif
- static bool avKitEnabled() { return gAVKitEnabled; }
static void setShouldOptOutOfNetworkStateObservation(bool flag) { gShouldOptOutOfNetworkStateObservation = flag; }
static bool shouldOptOutOfNetworkStateObservation() { return gShouldOptOutOfNetworkStateObservation; }
@@ -114,7 +110,6 @@
#endif
#if PLATFORM(IOS_FAMILY)
static bool gNetworkDataUsageTrackingEnabled;
- WEBCORE_EXPORT static bool gAVKitEnabled;
WEBCORE_EXPORT static bool gShouldOptOutOfNetworkStateObservation;
WEBCORE_EXPORT static bool gDisableScreenSizeOverride;
#endif
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp (276917 => 276918)
--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp 2021-05-03 19:58:44 UTC (rev 276918)
@@ -451,14 +451,10 @@
bool MediaPlayerPrivateAVFoundation::supportsFullscreen() const
{
-#if ENABLE(FULLSCREEN_API)
+ // FIXME: WebVideoFullscreenController assumes a QTKit/QuickTime media engine
+#if ENABLE(FULLSCREEN_API) || (PLATFORM(IOS_FAMILY) && HAVE(AVKIT))
return true;
#else
- // FIXME: WebVideoFullscreenController assumes a QTKit/QuickTime media engine
-#if PLATFORM(IOS_FAMILY)
- if (DeprecatedGlobalSettings::avKitEnabled())
- return true;
-#endif
return false;
#endif
}
Modified: trunk/Source/WebKit/ChangeLog (276917 => 276918)
--- trunk/Source/WebKit/ChangeLog 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebKit/ChangeLog 2021-05-03 19:58:44 UTC (rev 276918)
@@ -1,3 +1,29 @@
+2021-05-03 Devin Rousso <[email protected]>
+
+ [macCatalyst] "Enter Full Screen" button in media controls disappears
+ https://bugs.webkit.org/show_bug.cgi?id=225210
+ <rdar://problem/77010150>
+
+ Reviewed by Eric Carlson.
+
+ In order for the "Enter Full Screen" media controls button to stay visible the `<video>`
+ must return `true` for `HTMLMediaElement::webkitSupportsFullscreen`, which calls into
+ `MediaPlayerPrivate::supportsFullscreen`. On macOS and iOS, this will always return `true`
+ because of `ENABLE(FULLSCREEN_API)`, but on macCatalyst that's not enabled, so we instead
+ use `DeprecatedGlobalSettings::avKitEnabled`, but this is only set in the WebProcess (and
+ WK1). With the GPUProcess enabled, this value is not set, so the `RemoteMediaPlayerProxy`
+ will instead get `false`.
+
+ This patch removes `DeprecatedGlobalSettings::avKitEnabled` since it's enabled on WK1 and
+ non-GPUProcess WK2, and the related iOS-only SPI appears to not be used anywhere internally,
+ instead having callsites just check `HAVE(AVKIT)`.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
+ * WebProcess/cocoa/VideoFullscreenManager.mm:
+ (WebKit::VideoFullscreenManager::supportsVideoFullscreen const):
+
2021-05-03 Aditya Keerthi <[email protected]>
[iOS] Crash when tapping fields on cycle.travel
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (276917 => 276918)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-05-03 19:58:44 UTC (rev 276918)
@@ -3906,10 +3906,7 @@
#if PLATFORM(IOS_FAMILY)
setForceAlwaysUserScalable(m_forceAlwaysUserScalable || store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey()));
-#if HAVE(AVKIT)
- DeprecatedGlobalSettings::setAVKitEnabled(true);
#endif
-#endif
#if ENABLE(SERVICE_WORKER)
if (store.getBoolValueForKey(WebPreferencesKey::serviceWorkerEntitlementDisabledForTestingKey()))
Modified: trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm (276917 => 276918)
--- trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm 2021-05-03 19:58:44 UTC (rev 276918)
@@ -227,8 +227,12 @@
{
#if PLATFORM(IOS_FAMILY)
UNUSED_PARAM(mode);
- return DeprecatedGlobalSettings::avKitEnabled();
+#if HAVE(AVKIT)
+ return true;
#else
+ return false;
+#endif
+#else
return mode == HTMLMediaElementEnums::VideoFullscreenModeStandard || (mode == HTMLMediaElementEnums::VideoFullscreenModePictureInPicture && supportsPictureInPicture());
#endif
}
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (276917 => 276918)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2021-05-03 19:58:44 UTC (rev 276918)
@@ -1,3 +1,36 @@
+2021-05-03 Devin Rousso <[email protected]>
+
+ [macCatalyst] "Enter Full Screen" button in media controls disappears
+ https://bugs.webkit.org/show_bug.cgi?id=225210
+ <rdar://problem/77010150>
+
+ Reviewed by Eric Carlson.
+
+ In order for the "Enter Full Screen" media controls button to stay visible the `<video>`
+ must return `true` for `HTMLMediaElement::webkitSupportsFullscreen`, which calls into
+ `MediaPlayerPrivate::supportsFullscreen`. On macOS and iOS, this will always return `true`
+ because of `ENABLE(FULLSCREEN_API)`, but on macCatalyst that's not enabled, so we instead
+ use `DeprecatedGlobalSettings::avKitEnabled`, but this is only set in the WebProcess (and
+ WK1). With the GPUProcess enabled, this value is not set, so the `RemoteMediaPlayerProxy`
+ will instead get `false`.
+
+ This patch removes `DeprecatedGlobalSettings::avKitEnabled` since it's enabled on WK1 and
+ non-GPUProcess WK2, and the related iOS-only SPI appears to not be used anywhere internally,
+ instead having callsites just check `HAVE(AVKIT)`.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::supportsVideoFullscreen):
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences avKitEnabled]): Deleted.
+ (-[WebPreferences setAVKitEnabled:]): Deleted.
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
2021-05-03 Sam Weinig <[email protected]>
Remove default parameter values for color space and pixel format from ImageBuffer::create to make it clear everwhere we are explicitly requesting SRGB/BGRA8 buffers
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm (276917 => 276918)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm 2021-05-03 19:58:44 UTC (rev 276918)
@@ -946,11 +946,11 @@
bool WebChromeClient::supportsVideoFullscreen(HTMLMediaElementEnums::VideoFullscreenMode)
{
-#if PLATFORM(IOS_FAMILY)
- if (!DeprecatedGlobalSettings::avKitEnabled())
- return false;
+#if !PLATFORM(IOS_FAMILY) || HAVE(AVKIT)
+ return true;
+#else
+ return false;
#endif
- return true;
}
#if ENABLE(VIDEO_PRESENTATION_MODE)
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (276917 => 276918)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h 2021-05-03 19:58:44 UTC (rev 276918)
@@ -147,7 +147,6 @@
#define WebKitAnimatedImageAsyncDecodingEnabledPreferenceKey @"WebKitAnimatedImageAsyncDecodingEnabled"
#if TARGET_OS_IPHONE
#define WebKitAudioSessionCategoryOverride @"WebKitAudioSessionCategoryOverride"
-#define WebKitAVKitEnabled @"WebKitAVKitEnabled"
#endif
#define WebKitShouldRespectImageOrientationKey @"WebKitShouldRespectImageOrientation"
#define WebKitRequestAnimationFrameEnabledPreferenceKey @"WebKitRequestAnimationFrameEnabled"
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (276917 => 276918)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm 2021-05-03 19:58:44 UTC (rev 276918)
@@ -433,10 +433,7 @@
@(static_cast<int>(InterpolationQuality::Low)), WebKitInterpolationQualityPreferenceKey,
@NO, WebKitNetworkDataUsageTrackingEnabledPreferenceKey,
@"", WebKitNetworkInterfaceNamePreferenceKey,
-#if HAVE(AVKIT)
- @YES, WebKitAVKitEnabled,
#endif
-#endif
nil];
#if !PLATFORM(IOS_FAMILY)
@@ -2100,18 +2097,6 @@
[self _setUnsignedIntValue:override forKey:WebKitAudioSessionCategoryOverride];
}
-- (BOOL)avKitEnabled
-{
- return [self _boolValueForKey:WebKitAVKitEnabled];
-}
-
-- (void)setAVKitEnabled:(BOOL)flag
-{
-#if HAVE(AVKIT)
- [self _setBoolValue:flag forKey:WebKitAVKitEnabled];
-#endif
-}
-
- (BOOL)networkDataUsageTrackingEnabled
{
return [self _boolValueForKey:WebKitNetworkDataUsageTrackingEnabledPreferenceKey];
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (276917 => 276918)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h 2021-05-03 19:58:44 UTC (rev 276918)
@@ -273,7 +273,6 @@
@property (nonatomic) BOOL storageTrackerEnabled;
@property (nonatomic) unsigned audioSessionCategoryOverride;
-@property (nonatomic, getter=avKitEnabled) BOOL AVKitEnabled;
// WARNING: this affect network performance. This must not be enabled for production use.
// Enabling this makes WebCore reports the network data usage.
// This is a global setting.
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (276917 => 276918)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2021-05-03 19:56:18 UTC (rev 276917)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2021-05-03 19:58:44 UTC (rev 276918)
@@ -2948,9 +2948,6 @@
WebCore::DeprecatedGlobalSettings::setAudioSessionCategoryOverride([preferences audioSessionCategoryOverride]);
WebCore::DeprecatedGlobalSettings::setNetworkDataUsageTrackingEnabled([preferences networkDataUsageTrackingEnabled]);
WebCore::DeprecatedGlobalSettings::setNetworkInterfaceName([preferences networkInterfaceName]);
-#if HAVE(AVKIT)
- WebCore::DeprecatedGlobalSettings::setAVKitEnabled([preferences avKitEnabled]);
-#endif
ASSERT_WITH_MESSAGE(settings.backForwardCacheSupportsPlugins(), "BackForwardCacheSupportsPlugins should be enabled on iOS.");
#endif