Diff
Modified: trunk/Source/WTF/ChangeLog (282953 => 282954)
--- trunk/Source/WTF/ChangeLog 2021-09-23 08:19:24 UTC (rev 282953)
+++ trunk/Source/WTF/ChangeLog 2021-09-23 09:54:21 UTC (rev 282954)
@@ -1,3 +1,15 @@
+2021-09-23 Jean-Yves Avenard <[email protected]>
+
+ Opus and Vorbis codecs aren't available on iPad.
+ https://bugs.webkit.org/show_bug.cgi?id=230595
+ rdar://problem/83382734
+
+ Vorbis and Opus are usable on platforms other than macOS and are being checked
+ at runtime already.
+ Reviewed by Eric Carlson.
+
+ * wtf/PlatformEnableCocoa.h:
+
2021-09-22 Chris Dumez <[email protected]>
Drop makeRef() and use Ref { } instead
Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (282953 => 282954)
--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2021-09-23 08:19:24 UTC (rev 282953)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2021-09-23 09:54:21 UTC (rev 282954)
@@ -655,7 +655,7 @@
#define ENABLE_WKPDFVIEW 1
#endif
-#if !defined(ENABLE_VORBIS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110300
+#if !defined(ENABLE_VORBIS) && (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110300 || PLATFORM(IOS) || PLATFORM(IOS_SIMULATOR))
#define ENABLE_VORBIS 1
#endif
@@ -667,7 +667,7 @@
#define ENABLE_WEBM_FORMAT_READER 1
#endif
-#if !defined(ENABLE_OPUS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
+#if !defined(ENABLE_OPUS) && (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000 || PLATFORM(IOS) || PLATFORM(IOS_SIMULATOR))
#define ENABLE_OPUS 1
#endif
Modified: trunk/Source/WebCore/ChangeLog (282953 => 282954)
--- trunk/Source/WebCore/ChangeLog 2021-09-23 08:19:24 UTC (rev 282953)
+++ trunk/Source/WebCore/ChangeLog 2021-09-23 09:54:21 UTC (rev 282954)
@@ -1,3 +1,29 @@
+2021-09-23 Jean-Yves Avenard <[email protected]>
+
+ Opus and Vorbis codecs aren't available on iPad.
+ https://bugs.webkit.org/show_bug.cgi?id=230595
+ rdar://problem/83382734
+
+ Vorbis and Opus are usable on platforms other than macOS and are being checked
+ at runtime.
+
+ Reviewed by Eric Carlson.
+
+ Covered by existing tests.
+
+ * platform/audio/PlatformMediaSessionManager.cpp:
+ (WebCore::PlatformMediaSessionManager::vorbisDecoderEnabled):
+ (WebCore::PlatformMediaSessionManager::setVorbisDecoderEnabled):
+ (WebCore::PlatformMediaSessionManager::opusDecoderEnabled):
+ (WebCore::PlatformMediaSessionManager::setOpusDecoderEnabled):
+ * platform/audio/PlatformMediaSessionManager.h:
+ * platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm:
+ (WebCore::registerDecoderFactory):
+ (WebCore::isOpusDecoderAvailable):
+ (WebCore::registerOpusDecoderIfNeeded):
+ (WebCore::isVorbisDecoderAvailable):
+ (WebCore::registerVorbisDecoderIfNeeded):
+
2021-09-09 Sergio Villar Senin <[email protected]>
Improve the handling of CompositeEditCommand::splitTreeToNode() return values
Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp (282953 => 282954)
--- trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp 2021-09-23 08:19:24 UTC (rev 282953)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp 2021-09-23 09:54:21 UTC (rev 282954)
@@ -39,11 +39,11 @@
bool PlatformMediaSessionManager::m_webMFormatReaderEnabled;
#endif
-#if ENABLE(VORBIS) && PLATFORM(MAC)
+#if ENABLE(VORBIS)
bool PlatformMediaSessionManager::m_vorbisDecoderEnabled;
#endif
-#if ENABLE(OPUS) && PLATFORM(MAC)
+#if ENABLE(OPUS)
bool PlatformMediaSessionManager::m_opusDecoderEnabled;
#endif
@@ -656,7 +656,7 @@
bool PlatformMediaSessionManager::vorbisDecoderEnabled()
{
-#if ENABLE(VORBIS) && PLATFORM(MAC)
+#if ENABLE(VORBIS)
return m_vorbisDecoderEnabled;
#else
return false;
@@ -665,7 +665,7 @@
void PlatformMediaSessionManager::setVorbisDecoderEnabled(bool enabled)
{
-#if ENABLE(VORBIS) && PLATFORM(MAC)
+#if ENABLE(VORBIS)
m_vorbisDecoderEnabled = enabled;
#else
UNUSED_PARAM(enabled);
@@ -674,7 +674,7 @@
bool PlatformMediaSessionManager::opusDecoderEnabled()
{
-#if ENABLE(OPUS) && PLATFORM(MAC)
+#if ENABLE(OPUS)
return m_opusDecoderEnabled;
#else
return false;
@@ -683,7 +683,7 @@
void PlatformMediaSessionManager::setOpusDecoderEnabled(bool enabled)
{
-#if ENABLE(OPUS) && PLATFORM(MAC)
+#if ENABLE(OPUS)
m_opusDecoderEnabled = enabled;
#else
UNUSED_PARAM(enabled);
Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h (282953 => 282954)
--- trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h 2021-09-23 08:19:24 UTC (rev 282953)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h 2021-09-23 09:54:21 UTC (rev 282954)
@@ -223,10 +223,10 @@
#if ENABLE(WEBM_FORMAT_READER)
static bool m_webMFormatReaderEnabled;
#endif
-#if ENABLE(VORBIS) && PLATFORM(MAC)
+#if ENABLE(VORBIS)
static bool m_vorbisDecoderEnabled;
#endif
-#if ENABLE(OPUS) && PLATFORM(MAC)
+#if ENABLE(OPUS)
static bool m_opusDecoderEnabled;
#endif
Modified: trunk/Source/WebCore/platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm (282953 => 282954)
--- trunk/Source/WebCore/platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm 2021-09-23 08:19:24 UTC (rev 282953)
+++ trunk/Source/WebCore/platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm 2021-09-23 09:54:21 UTC (rev 282954)
@@ -54,6 +54,7 @@
if (comp)
return true; // Already registered.
+#if PLATFORM(MAC)
constexpr char audioComponentsDylib[] = "/System/Library/Components/AudioCodecs.component/Contents/MacOS/AudioCodecs";
void *handle = dlopen(audioComponentsDylib, RTLD_LAZY | RTLD_LOCAL);
if (!handle)
@@ -69,6 +70,10 @@
}
return true;
+#else
+ UNUSED_PARAM(decoderName);
+ return false;
+#endif
}
static RetainPtr<CMFormatDescriptionRef> createAudioFormatDescriptionForFormat(OSType formatID, Vector<uint8_t>&& magicCookie)
@@ -331,7 +336,7 @@
bool isOpusDecoderAvailable()
{
-#if ENABLE(OPUS) && PLATFORM(MAC)
+#if ENABLE(OPUS)
if (!PlatformMediaSessionManager::opusDecoderEnabled())
return false;
@@ -343,7 +348,7 @@
bool registerOpusDecoderIfNeeded()
{
-#if ENABLE(OPUS) && PLATFORM(MAC)
+#if ENABLE(OPUS)
static bool available;
static dispatch_once_t onceToken;
@@ -434,7 +439,7 @@
bool isVorbisDecoderAvailable()
{
-#if ENABLE(VORBIS) && PLATFORM(MAC)
+#if ENABLE(VORBIS)
if (!PlatformMediaSessionManager::vorbisDecoderEnabled())
return false;
@@ -446,7 +451,7 @@
bool registerVorbisDecoderIfNeeded()
{
-#if ENABLE(VORBIS) && PLATFORM(MAC)
+#if ENABLE(VORBIS)
static bool available;
static dispatch_once_t onceToken;
Modified: trunk/Source/WebKit/ChangeLog (282953 => 282954)
--- trunk/Source/WebKit/ChangeLog 2021-09-23 08:19:24 UTC (rev 282953)
+++ trunk/Source/WebKit/ChangeLog 2021-09-23 09:54:21 UTC (rev 282954)
@@ -1,3 +1,19 @@
+2021-09-23 Jean-Yves Avenard <[email protected]>
+
+ Opus and Vorbis codecs aren't available on iPad.
+ https://bugs.webkit.org/show_bug.cgi?id=230595
+ rdar://problem/83382734
+
+ Vorbis and Opus are usable on platforms other than macOS and are being checked
+ at runtime.
+
+ Reviewed by Eric Carlson.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::platformInitializeWebProcess):
+
2021-09-23 Chris Lord <[email protected]>
[GTK] Allow sending precise mouse wheel events in LayoutTests
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (282953 => 282954)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-09-23 08:19:24 UTC (rev 282953)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-09-23 09:54:21 UTC (rev 282954)
@@ -4050,11 +4050,11 @@
PlatformMediaSessionManager::setWebMFormatReaderEnabled(RuntimeEnabledFeatures::sharedFeatures().webMFormatReaderEnabled());
#endif
-#if ENABLE(VORBIS) && PLATFORM(MAC)
+#if ENABLE(VORBIS)
PlatformMediaSessionManager::setVorbisDecoderEnabled(RuntimeEnabledFeatures::sharedFeatures().vorbisDecoderEnabled());
#endif
-#if ENABLE(OPUS) && PLATFORM(MAC)
+#if ENABLE(OPUS)
PlatformMediaSessionManager::setOpusDecoderEnabled(RuntimeEnabledFeatures::sharedFeatures().opusDecoderEnabled());
#endif
}
Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (282953 => 282954)
--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2021-09-23 08:19:24 UTC (rev 282953)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2021-09-23 09:54:21 UTC (rev 282954)
@@ -390,11 +390,11 @@
PlatformMediaSessionManager::setWebMFormatReaderEnabled(RuntimeEnabledFeatures::sharedFeatures().webMFormatReaderEnabled());
#endif
-#if ENABLE(VORBIS) && PLATFORM(MAC)
+#if ENABLE(VORBIS)
PlatformMediaSessionManager::setVorbisDecoderEnabled(RuntimeEnabledFeatures::sharedFeatures().vorbisDecoderEnabled());
#endif
-#if ENABLE(OPUS) && PLATFORM(MAC)
+#if ENABLE(OPUS)
PlatformMediaSessionManager::setOpusDecoderEnabled(RuntimeEnabledFeatures::sharedFeatures().opusDecoderEnabled());
#endif