Title: [282829] trunk/Source
- Revision
- 282829
- Author
- [email protected]
- Date
- 2021-09-21 11:26:46 -0700 (Tue, 21 Sep 2021)
Log Message
[iOS] Enable MSE in WKWebViews by default on iPad
https://bugs.webkit.org/show_bug.cgi?id=230426
Reviewed by Tim Horton.
Source/WebKit:
Add a default value getter for the MediaSourceEnabled preference.
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultMediaSourceEnabled):
* Shared/WebPreferencesDefaultValues.h:
* Shared/ios/WebPreferencesDefaultValuesIOS.mm:
(WebKit::defaultMediaSourceEnabled):
Source/WTF:
Give a default value getter for the MediaSourceEnabled preference.
* Scripts/Preferences/WebPreferences.yaml:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (282828 => 282829)
--- trunk/Source/WTF/ChangeLog 2021-09-21 18:04:20 UTC (rev 282828)
+++ trunk/Source/WTF/ChangeLog 2021-09-21 18:26:46 UTC (rev 282829)
@@ -1,3 +1,14 @@
+2021-09-21 Jer Noble <[email protected]>
+
+ [iOS] Enable MSE in WKWebViews by default on iPad
+ https://bugs.webkit.org/show_bug.cgi?id=230426
+
+ Reviewed by Tim Horton.
+
+ Give a default value getter for the MediaSourceEnabled preference.
+
+ * Scripts/Preferences/WebPreferences.yaml:
+
2021-09-21 Philip Chimento <[email protected]>
Add LLVM/FLang's int128_t implementation to WTF
Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml (282828 => 282829)
--- trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml 2021-09-21 18:04:20 UTC (rev 282828)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml 2021-09-21 18:26:46 UTC (rev 282829)
@@ -1435,15 +1435,16 @@
type: bool
defaultValue:
WebKitLegacy:
- default: true
+ "ENABLE(MEDIA_SOURCE) && PLATFORM(IOS_FAMILY)": WebKit::defaultMediaSourceEnabled()
+ "ENABLE(MEDIA_SOURCE) && !PLATFORM(IOS_FAMILY)": true
+ default: false
WebKit:
- "PLATFORM(COCOA) && PLATFORM(MAC)": true
- "PLATFORM(COCOA) && !PLATFORM(MAC)": false
- default: true
+ "ENABLE(MEDIA_SOURCE) && PLATFORM(IOS_FAMILY)": WebKit::defaultMediaSourceEnabled()
+ "ENABLE(MEDIA_SOURCE) && !PLATFORM(IOS_FAMILY)": true
+ default: false
WebCore:
- "PLATFORM(COCOA) && PLATFORM(MAC)": true
- "PLATFORM(COCOA) && !PLATFORM(MAC)": false
- default: true
+ "ENABLE(MEDIA_SOURCE)": true
+ default: false
# FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
# FIXME: Seems to be unused. Remove once verified.
Modified: trunk/Source/WebKit/ChangeLog (282828 => 282829)
--- trunk/Source/WebKit/ChangeLog 2021-09-21 18:04:20 UTC (rev 282828)
+++ trunk/Source/WebKit/ChangeLog 2021-09-21 18:26:46 UTC (rev 282829)
@@ -1,3 +1,18 @@
+2021-09-21 Jer Noble <[email protected]>
+
+ [iOS] Enable MSE in WKWebViews by default on iPad
+ https://bugs.webkit.org/show_bug.cgi?id=230426
+
+ Reviewed by Tim Horton.
+
+ Add a default value getter for the MediaSourceEnabled preference.
+
+ * Shared/WebPreferencesDefaultValues.cpp:
+ (WebKit::defaultMediaSourceEnabled):
+ * Shared/WebPreferencesDefaultValues.h:
+ * Shared/ios/WebPreferencesDefaultValuesIOS.mm:
+ (WebKit::defaultMediaSourceEnabled):
+
2021-09-21 Alex Christensen <[email protected]>
Use typed identifier for WebSocketChannel identifiers
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (282828 => 282829)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2021-09-21 18:04:20 UTC (rev 282828)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2021-09-21 18:26:46 UTC (rev 282829)
@@ -105,6 +105,10 @@
bool defaultWebMParserEnabled();
#endif
+#if ENABLE(MEDIA_SOURCE) && PLATFORM(IOS_FAMILY)
+bool defaultMediaSourceEnabled();
+#endif
+
#if ENABLE(MEDIA_SESSION_COORDINATOR)
bool defaultMediaSessionCoordinatorEnabled();
#endif
Modified: trunk/Source/WebKit/Shared/ios/WebPreferencesDefaultValuesIOS.mm (282828 => 282829)
--- trunk/Source/WebKit/Shared/ios/WebPreferencesDefaultValuesIOS.mm 2021-09-21 18:04:20 UTC (rev 282828)
+++ trunk/Source/WebKit/Shared/ios/WebPreferencesDefaultValuesIOS.mm 2021-09-21 18:26:46 UTC (rev 282829)
@@ -29,6 +29,7 @@
#if PLATFORM(IOS_FAMILY)
#import "UserInterfaceIdiom.h"
+#import <WebCore/Device.h>
#import <pal/ios/ManagedConfigurationSoftLink.h>
#import <pal/spi/ios/ManagedConfigurationSPI.h>
@@ -63,6 +64,20 @@
}
#endif
+#if ENABLE(MEDIA_SOURCE)
+bool defaultMediaSourceEnabled()
+{
+#if PLATFORM(MACCATALYST)
+ return true;
+#elif PLATFORM(IOS)
+ return WebCore::deviceClass() != MGDeviceClassiPhone
+ && WebCore::deviceClass() != MGDeviceClassiPod;
+#else
+ return false;
+#endif
+}
+#endif
+
} // namespace WebKit
#endif // PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h (282828 => 282829)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h 2021-09-21 18:04:20 UTC (rev 282828)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h 2021-09-21 18:26:46 UTC (rev 282829)
@@ -85,6 +85,10 @@
bool defaultWebMParserEnabled();
#endif
+#if ENABLE(MEDIA_SOURCE) && PLATFORM(IOS_FAMILY)
+bool defaultMediaSourceEnabled();
+#endif
+
#if ENABLE(VP9)
bool defaultVP8DecoderEnabled();
bool defaultVP9DecoderEnabled();
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm (282828 => 282829)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm 2021-09-21 18:04:20 UTC (rev 282828)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm 2021-09-21 18:26:46 UTC (rev 282829)
@@ -275,13 +275,25 @@
#endif
+#if ENABLE(MEDIA_SOURCE) && PLATFORM(IOS_FAMILY)
+bool defaultMediaSourceEnabled()
+{
+#if PLATFORM(MACCATALYST)
+ return true;
+#elif PLATFORM(IOS)
+ return WebCore::deviceClass() != MGDeviceClassiPhone
+ && WebCore::deviceClass() != MGDeviceClassiPod;
+#else
+ return false;
+#endif
+}
+#endif
+
#if ENABLE(MEDIA_SOURCE)
-
bool defaultWebMParserEnabled()
{
return isFeatureFlagEnabled("webm_parser", true);
}
-
#endif // ENABLE(MEDIA_SOURCE)
#if ENABLE(VP9)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes