Diff
Modified: trunk/Source/WebCore/ChangeLog (261985 => 261986)
--- trunk/Source/WebCore/ChangeLog 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebCore/ChangeLog 2020-05-21 07:47:05 UTC (rev 261986)
@@ -1,3 +1,38 @@
+2020-05-21 Enrique Ocaña González <[email protected]>
+
+ [GStreamer][GTK][WPE] Expose and honor the media content types requiring hardware support setting
+ https://bugs.webkit.org/show_bug.cgi?id=211950
+
+ Reviewed by Adrian Perez de Castro.
+
+ Provide the needed information about media content types requiring hardware support
+ when asking the MediaPlayer about what types are supported. This was already being done
+ from HTMLMediaElement for player selection, but not in MediaSource nor in
+ MediaSource::addSourceBuffer() when the webpage used the MSE API to check type support.
+ In order to ask for the mediaContentTypesRequiringHardwareSupport setting we need a
+ reference to the current Document in all the places where we need to check type support.
+
+ * Modules/mediasource/MediaSource.cpp:
+ (WebCore::MediaSource::addSourceBuffer): Provide hardware content types extra info.
+ (WebCore::MediaSource::isTypeSupported): Get hardware content types extra info from
+ ScriptExecutionContext and provide it to a new refactored private version of
+ isTypeSupported() which can also be reused from addSourceBuffer().
+ * Modules/mediasource/MediaSource.h: Changed isTypeSupported() prototype to take
+ ScriptExecutionContext and added a new overloaded version of the method.
+ * Modules/mediasource/MediaSource.idl: isTypeSupported() now provides a reference to
+ ScriptExecutionContext. It's the only way to access the required document settings from a
+ static method.
+ * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
+ (WebCore::GStreamerRegistryScanner::isContentTypeSupported const): Factor ContentType
+ discrimination logic common to MediaPlayerPrivateGStreamer and
+ MediaPlayerPrivateGStreamerMSE.
+ * platform/graphics/gstreamer/GStreamerRegistryScanner.h: Added new method.
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::supportsType): Provide hardware content types extra
+ info when asking for type support.
+ * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
+ (WebCore::MediaPlayerPrivateGStreamerMSE::supportsType): Ditto.
+
2020-05-20 Simon Fraser <[email protected]>
[macOS] Scrolling synchronization part 1: Have the scrolling thread wait half a frame for the main thread to complete the rendering update
Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp (261985 => 261986)
--- trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp 2020-05-21 07:47:05 UTC (rev 261986)
@@ -42,6 +42,7 @@
#include "Logging.h"
#include "MediaSourcePrivate.h"
#include "MediaSourceRegistry.h"
+#include "Settings.h"
#include "SourceBuffer.h"
#include "SourceBufferList.h"
#include "SourceBufferPrivate.h"
@@ -677,7 +678,11 @@
// 2. If type contains a MIME type that is not supported ..., then throw a
// NotSupportedError exception and abort these steps.
- if (!isTypeSupported(type))
+ Vector<ContentType> mediaContentTypesRequiringHardwareSupport;
+ if (m_mediaElement)
+ mediaContentTypesRequiringHardwareSupport.appendVector(m_mediaElement->document().settings().mediaContentTypesRequiringHardwareSupport());
+
+ if (!isTypeSupported(type, WTFMove(mediaContentTypesRequiringHardwareSupport)))
return Exception { NotSupportedError };
// 4. If the readyState attribute is not in the "open" state then throw an
@@ -869,8 +874,19 @@
return { };
}
-bool MediaSource::isTypeSupported(const String& type)
+bool MediaSource::isTypeSupported(ScriptExecutionContext& context, const String& type)
{
+ Vector<ContentType> mediaContentTypesRequiringHardwareSupport;
+ if (context.isDocument()) {
+ auto& document = downcast<Document>(context);
+ mediaContentTypesRequiringHardwareSupport.appendVector(document.settings().mediaContentTypesRequiringHardwareSupport());
+ }
+
+ return isTypeSupported(type, WTFMove(mediaContentTypesRequiringHardwareSupport));
+}
+
+bool MediaSource::isTypeSupported(const String& type, Vector<ContentType>&& contentTypesRequiringHardwareSupport)
+{
// Section 2.2 isTypeSupported() method steps.
// https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#widl-MediaSource-isTypeSupported-boolean-DOMString-type
// 1. If type is an empty string, then return false.
@@ -891,6 +907,8 @@
MediaEngineSupportParameters parameters;
parameters.type = contentType;
parameters.isMediaSource = true;
+ parameters.contentTypesRequiringHardwareSupport = WTFMove(contentTypesRequiringHardwareSupport);
+
MediaPlayer::SupportsType supported = MediaPlayer::supportsType(parameters);
if (codecs.isEmpty())
Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.h (261985 => 261986)
--- trunk/Source/WebCore/Modules/mediasource/MediaSource.h 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.h 2020-05-21 07:47:05 UTC (rev 261986)
@@ -104,7 +104,7 @@
SourceBufferList* activeSourceBuffers() { return m_activeSourceBuffers.get(); }
ExceptionOr<Ref<SourceBuffer>> addSourceBuffer(const String& type);
ExceptionOr<void> removeSourceBuffer(SourceBuffer&);
- static bool isTypeSupported(const String& type);
+ static bool isTypeSupported(ScriptExecutionContext&, const String& type);
ScriptExecutionContext* scriptExecutionContext() const final;
@@ -131,6 +131,7 @@
void stop() final;
const char* activeDOMObjectName() const final;
bool virtualHasPendingActivity() const final;
+ static bool isTypeSupported(const String& type, Vector<ContentType>&& contentTypesRequiringHardwareSupport);
void setPrivateAndOpen(Ref<MediaSourcePrivate>&&) final;
void seekToTime(const MediaTime&) final;
Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.idl (261985 => 261986)
--- trunk/Source/WebCore/Modules/mediasource/MediaSource.idl 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.idl 2020-05-21 07:47:05 UTC (rev 261986)
@@ -61,7 +61,7 @@
[MayThrowException] void endOfStream(optional EndOfStreamError error);
- static boolean isTypeSupported (DOMString type);
+ [CallWith=ScriptExecutionContext] static boolean isTypeSupported (DOMString type);
[MayThrowException] void setLiveSeekableRange(double start, double end);
[MayThrowException] void clearLiveSeekableRange();
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp (261985 => 261986)
--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp 2020-05-21 07:47:05 UTC (rev 261986)
@@ -298,6 +298,39 @@
return supported;
}
+MediaPlayerEnums::SupportsType GStreamerRegistryScanner::isContentTypeSupported(const ContentType& contentType, const Vector<ContentType>& contentTypesRequiringHardwareSupport) const
+{
+ using SupportsType = MediaPlayerEnums::SupportsType;
+
+ const auto& containerType = contentType.containerType();
+ if (!isContainerTypeSupported(containerType))
+ return SupportsType::IsNotSupported;
+
+ const auto& codecs = contentType.codecs();
+
+ // Spec says we should not return "probably" if the codecs string is empty.
+ if (codecs.isEmpty())
+ return SupportsType::MayBeSupported;
+
+ for (const auto& codec : codecs) {
+ bool requiresHardwareSupport = contentTypesRequiringHardwareSupport
+ .findMatching([containerType, codec](auto& hardwareContentType) -> bool {
+ auto hardwareContainer = hardwareContentType.containerType();
+ if (!hardwareContainer.isEmpty()
+ && fnmatch(hardwareContainer.utf8().data(), containerType.utf8().data(), 0))
+ return false;
+ auto hardwareCodecs = hardwareContentType.codecs();
+ return hardwareCodecs.isEmpty()
+ || hardwareCodecs.findMatching([codec](auto& hardwareCodec) -> bool {
+ return !fnmatch(hardwareCodec.utf8().data(), codec.utf8().data(), 0);
+ }) != notFound;
+ }) != notFound;
+ if (!isCodecSupported(codec, requiresHardwareSupport))
+ return SupportsType::IsNotSupported;
+ }
+ return SupportsType::IsSupported;
+}
+
bool GStreamerRegistryScanner::areAllCodecsSupported(const Vector<String>& codecs, bool shouldCheckForHardwareUse) const
{
for (String codec : codecs) {
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.h (261985 => 261986)
--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.h 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.h 2020-05-21 07:47:05 UTC (rev 261986)
@@ -23,6 +23,7 @@
#include "MediaConfiguration.h"
+#include "MediaPlayerEnums.h"
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
@@ -51,6 +52,7 @@
RegistryLookupResult isDecodingSupported(MediaConfiguration&) const;
bool isCodecSupported(String codec, bool usingHardware = false) const;
+ MediaPlayerEnums::SupportsType isContentTypeSupported(const ContentType&, const Vector<ContentType>& contentTypesRequiringHardwareSupport) const;
bool areAllCodecsSupported(const Vector<String>& codecs, bool shouldCheckForHardwareUse = false) const;
protected:
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (261985 => 261986)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2020-05-21 07:47:05 UTC (rev 261986)
@@ -2701,13 +2701,8 @@
return result;
GST_DEBUG("Checking mime-type \"%s\"", parameters.type.raw().utf8().data());
- auto containerType = parameters.type.containerType();
auto& gstRegistryScanner = GStreamerRegistryScanner::singleton();
- if (gstRegistryScanner.isContainerTypeSupported(containerType)) {
- // Spec says we should not return "probably" if the codecs string is empty.
- Vector<String> codecs = parameters.type.codecs();
- result = codecs.isEmpty() ? MediaPlayer::SupportsType::MayBeSupported : (gstRegistryScanner.areAllCodecsSupported(codecs) ? MediaPlayer::SupportsType::IsSupported : MediaPlayer::SupportsType::IsNotSupported);
- }
+ result = gstRegistryScanner.isContentTypeSupported(parameters.type, parameters.contentTypesRequiringHardwareSupport);
auto finalResult = extendedSupportsType(parameters, result);
GST_DEBUG("Supported: %s", convertEnumerationToString(finalResult).utf8().data());
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp (261985 => 261986)
--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp 2020-05-21 07:47:05 UTC (rev 261986)
@@ -754,11 +754,7 @@
GST_DEBUG("Checking mime-type \"%s\"", parameters.type.raw().utf8().data());
auto& gstRegistryScanner = GStreamerRegistryScannerMSE::singleton();
- // Spec says we should not return "probably" if the codecs string is empty.
- if (gstRegistryScanner.isContainerTypeSupported(containerType)) {
- Vector<String> codecs = parameters.type.codecs();
- result = codecs.isEmpty() ? MediaPlayer::SupportsType::MayBeSupported : (gstRegistryScanner.areAllCodecsSupported(codecs) ? MediaPlayer::SupportsType::IsSupported : MediaPlayer::SupportsType::IsNotSupported);
- }
+ result = gstRegistryScanner.isContentTypeSupported(parameters.type, parameters.contentTypesRequiringHardwareSupport);
auto finalResult = extendedSupportsType(parameters, result);
GST_DEBUG("Supported: %s", convertEnumerationToString(finalResult).utf8().data());
Modified: trunk/Source/WebKit/ChangeLog (261985 => 261986)
--- trunk/Source/WebKit/ChangeLog 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebKit/ChangeLog 2020-05-21 07:47:05 UTC (rev 261986)
@@ -1,3 +1,25 @@
+2020-05-21 Enrique Ocaña González <[email protected]>
+
+ [GStreamer][GTK][WPE] Expose and honor the media content types requiring hardware support setting
+ https://bugs.webkit.org/show_bug.cgi?id=211950
+
+ Reviewed by Adrian Perez de Castro.
+
+ Expose mediaContentTypesRequiringHardwareSupport as a setting on WPE and WebKitGTK.
+
+ * UIProcess/API/glib/WebKitSettings.cpp:
+ (_WebKitSettingsPrivate::_WebKitSettingsPrivate):
+ (webKitSettingsSetProperty):
+ (webKitSettingsGetProperty):
+ (webkit_settings_class_init):
+ (webkit_settings_get_media_content_types_requiring_hardware_support):
+ (webkit_settings_set_media_content_types_requiring_hardware_support):
+ * UIProcess/API/gtk/WebKitSettings.h:
+ * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
+ * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
+ * UIProcess/API/wpe/WebKitSettings.h:
+ * UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
+
2020-05-20 Darin Adler <[email protected]>
Dictation context should be an object identifier, not a type-punned pointer
Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp (261985 => 261986)
--- trunk/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp 2020-05-21 07:47:05 UTC (rev 261986)
@@ -78,6 +78,7 @@
CString pictographFontFamily;
CString defaultCharset;
CString userAgent;
+ CString mediaContentTypesRequiringHardwareSupport;
bool allowModalDialogs { false };
bool zoomTextOnly { false };
double screenDpi { 96 };
@@ -170,6 +171,7 @@
#endif
PROP_ENABLE_JAVASCRIPT_MARKUP,
PROP_ENABLE_MEDIA,
+ PROP_MEDIA_CONTENT_TYPES_REQUIRING_HARDWARE_SUPPORT,
};
static void webKitSettingsDispose(GObject* object)
@@ -400,6 +402,9 @@
case PROP_ENABLE_MEDIA:
webkit_settings_set_enable_media(settings, g_value_get_boolean(value));
break;
+ case PROP_MEDIA_CONTENT_TYPES_REQUIRING_HARDWARE_SUPPORT:
+ webkit_settings_set_media_content_types_requiring_hardware_support(settings, g_value_get_string(value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, paramSpec);
break;
@@ -591,6 +596,9 @@
case PROP_ENABLE_MEDIA:
g_value_set_boolean(value, webkit_settings_get_enable_media(settings));
break;
+ case PROP_MEDIA_CONTENT_TYPES_REQUIRING_HARDWARE_SUPPORT:
+ g_value_set_string(value, webkit_settings_get_media_content_types_requiring_hardware_support(settings));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, paramSpec);
break;
@@ -1538,6 +1546,21 @@
TRUE,
readWriteConstructParamFlags));
+ /**
+ * WebKitSettings:media-content-types-requiring-hardware-support:
+ *
+ * List of media content types requiring hardware support, split by semicolons (:).
+ * For example: 'video/webm; codecs="vp*":video/mp4; codecs="avc*":video/*; codecs="av1*"'.
+ *
+ * Since: 2.30
+ */
+ g_object_class_install_property(gObjectClass,
+ PROP_MEDIA_CONTENT_TYPES_REQUIRING_HARDWARE_SUPPORT,
+ g_param_spec_string("media-content-types-requiring-hardware-support",
+ _("Media content types requiring hardware support"),
+ _("List of media content types requiring hardware support."),
+ nullptr, // A null string forces the default value.
+ readWriteConstructParamFlags));
}
WebPreferences* webkitSettingsGetPreferences(WebKitSettings* settings)
@@ -3808,3 +3831,46 @@
WebKitSettingsPrivate* priv = settings->priv;
priv->preferences->setMediaCaptureRequiresSecureConnection(required);
}
+
+/**
+ * webkit_settings_get_media_content_types_requiring_hardware_support:
+ * @settings: a #WebKitSettings
+ *
+ * Gets the #WebKitSettings:media-content-types-requiring-hardware-support property.
+ *
+ * Returns: Media content types requiring hardware support, or %NULL.
+ *
+ * Since: 2.30
+ */
+const gchar* webkit_settings_get_media_content_types_requiring_hardware_support(WebKitSettings* settings)
+{
+ g_return_val_if_fail(WEBKIT_IS_SETTINGS(settings), 0);
+
+ const auto& mediaContentTypesRequiringHardwareSupport = settings->priv->mediaContentTypesRequiringHardwareSupport;
+ if (!mediaContentTypesRequiringHardwareSupport.length())
+ return nullptr;
+ return mediaContentTypesRequiringHardwareSupport.data();
+}
+
+/**
+ * webkit_settings_set_media_content_types_requiring_hardware_support:
+ * @settings: a #WebKitSettings
+ * @content_types: (allow-none) list of media content types requiring hardware support split by semicolons (:) or %NULL to use the default value.
+ *
+ * Set the #WebKitSettings:media-content-types-requiring-hardware-support property.
+ *
+ * Since: 2.30
+ */
+void webkit_settings_set_media_content_types_requiring_hardware_support(WebKitSettings* settings, const gchar* mediaContentTypesRequiringHardwareSupport)
+{
+ g_return_if_fail(WEBKIT_IS_SETTINGS(settings));
+
+ WebKitSettingsPrivate* priv = settings->priv;
+ if (!g_strcmp0(priv->mediaContentTypesRequiringHardwareSupport.data(), mediaContentTypesRequiringHardwareSupport))
+ return;
+
+ String mediaContentTypesRequiringHardwareSupportString = String::fromUTF8(mediaContentTypesRequiringHardwareSupport);
+ priv->preferences->setMediaContentTypesRequiringHardwareSupport(mediaContentTypesRequiringHardwareSupportString);
+ priv->mediaContentTypesRequiringHardwareSupport = mediaContentTypesRequiringHardwareSupportString.utf8();
+ g_object_notify(G_OBJECT(settings), "media-content-types-requiring-hardware-support");
+}
Modified: trunk/Source/WebKit/UIProcess/API/gtk/WebKitSettings.h (261985 => 261986)
--- trunk/Source/WebKit/UIProcess/API/gtk/WebKitSettings.h 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebKit/UIProcess/API/gtk/WebKitSettings.h 2020-05-21 07:47:05 UTC (rev 261986)
@@ -506,6 +506,13 @@
webkit_settings_set_enable_media (WebKitSettings *settings,
gboolean enabled);
+WEBKIT_API const gchar *
+webkit_settings_get_media_content_types_requiring_hardware_support (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_media_content_types_requiring_hardware_support (WebKitSettings *settings,
+ const gchar *content_types);
+
G_END_DECLS
#endif /* WebKitSettings_h */
Modified: trunk/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt (261985 => 261986)
--- trunk/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt 2020-05-21 07:47:05 UTC (rev 261986)
@@ -549,6 +549,8 @@
webkit_settings_font_size_to_pixels
webkit_settings_get_enable_media
webkit_settings_set_enable_media
+webkit_settings_get_media_content_types_requiring_hardware_support
+webkit_settings_set_media_content_types_requiring_hardware_support
<SUBSECTION Standard>
WebKitSettingsClass
Modified: trunk/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml (261985 => 261986)
--- trunk/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml 2020-05-21 07:47:05 UTC (rev 261986)
@@ -163,5 +163,10 @@
<xi:include href="" /></xi:include>
</index>
+ <index id="api-index-2-30" role="2.30">
+ <title>Index of new symbols in 2.30</title>
+ <xi:include href="" /></xi:include>
+ </index>
+
<xi:include href="" /></xi:include>
</book>
Modified: trunk/Source/WebKit/UIProcess/API/wpe/WebKitSettings.h (261985 => 261986)
--- trunk/Source/WebKit/UIProcess/API/wpe/WebKitSettings.h 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebKit/UIProcess/API/wpe/WebKitSettings.h 2020-05-21 07:47:05 UTC (rev 261986)
@@ -463,6 +463,13 @@
webkit_settings_set_enable_media (WebKitSettings *settings,
gboolean enabled);
+WEBKIT_API const gchar *
+webkit_settings_get_media_content_types_requiring_hardware_support (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_media_content_types_requiring_hardware_support (WebKitSettings *settings,
+ const gchar *content_types);
+
G_END_DECLS
#endif /* WebKitSettings_h */
Modified: trunk/Source/WebKit/UIProcess/API/wpe/docs/wpe-1.0-sections.txt (261985 => 261986)
--- trunk/Source/WebKit/UIProcess/API/wpe/docs/wpe-1.0-sections.txt 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Source/WebKit/UIProcess/API/wpe/docs/wpe-1.0-sections.txt 2020-05-21 07:47:05 UTC (rev 261986)
@@ -543,6 +543,8 @@
webkit_settings_set_allow_top_navigation_to_data_urls
webkit_settings_get_enable_media
webkit_settings_set_enable_media
+webkit_settings_get_media_content_types_requiring_hardware_support
+webkit_settings_set_media_content_types_requiring_hardware_support
<SUBSECTION Standard>
WebKitSettingsClass
Modified: trunk/Tools/ChangeLog (261985 => 261986)
--- trunk/Tools/ChangeLog 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Tools/ChangeLog 2020-05-21 07:47:05 UTC (rev 261986)
@@ -1,3 +1,15 @@
+2020-05-21 Enrique Ocaña González <[email protected]>
+
+ [GStreamer][GTK][WPE] Expose and honor the media content types requiring hardware support setting
+ https://bugs.webkit.org/show_bug.cgi?id=211950
+
+ Reviewed by Adrian Perez de Castro.
+
+ Exercise the new mediaContentTypesRequiringHardwareSupport setting.
+
+ * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
+ (testWebKitSettings):
+
2020-05-20 Simon Fraser <[email protected]>
[macOS] Scrolling synchronization part 1: Have the scrolling thread wait half a frame for the main thread to complete the rendering update
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp (261985 => 261986)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp 2020-05-21 06:47:24 UTC (rev 261985)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp 2020-05-21 07:47:05 UTC (rev 261986)
@@ -341,6 +341,13 @@
webkit_settings_set_enable_media(settings, FALSE);
g_assert_false(webkit_settings_get_enable_media(settings));
+ // Default media content types requiring hardware support is nullptr.
+ g_assert_cmpstr(nullptr, ==, webkit_settings_get_media_content_types_requiring_hardware_support(settings));
+ webkit_settings_set_media_content_types_requiring_hardware_support(settings, "video/*; codecs=\"*\"");
+ g_assert_cmpstr("video/*; codecs=\"*\"", ==, webkit_settings_get_media_content_types_requiring_hardware_support(settings));
+ webkit_settings_set_media_content_types_requiring_hardware_support(settings, nullptr);
+ g_assert_cmpstr(nullptr, ==, webkit_settings_get_media_content_types_requiring_hardware_support(settings));
+
#if PLATFORM(GTK)
// Ondemand is the default hardware acceleration policy.
g_assert_cmpuint(webkit_settings_get_hardware_acceleration_policy(settings), ==, WEBKIT_HARDWARE_ACCELERATION_POLICY_ON_DEMAND);