<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[160434] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/160434">160434</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2013-12-11 08:28:27 -0800 (Wed, 11 Dec 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>[GTK] Add "enable-mediasource" property to WebKitWebSettings
https://bugs.webkit.org/show_bug.cgi?id=125566
Patch by Brendan Long <b.long@cablelabs.com> on 2013-12-11
Reviewed by Philippe Normand.
Source/WebKit/gtk:
* tests/testwebsettings.c:
(test_webkit_web_settings_copy):
* webkit/webkitwebsettings.cpp:
(webkit_web_settings_class_init):
(webkit_web_settings_set_property):
(webkit_web_settings_get_property):
* webkit/webkitwebsettingsprivate.h:
* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings):
(webkit_web_view_settings_notify):
Source/WebKit2:
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_enable_mediasource):
(webkit_settings_set_enable_mediasource):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings):
Tools:
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues): Turn MediaSource on by default for easier testing.
* DumpRenderTree/gtk/TestRunnerGtk.cpp:
(TestRunner::overridePreference): Allow overriding WebKitMediaSourceEnabled.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitgtkChangeLog">trunk/Source/WebKit/gtk/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitgtkteststestwebsettingsc">trunk/Source/WebKit/gtk/tests/testwebsettings.c</a></li>
<li><a href="#trunkSourceWebKitgtkwebkitwebkitwebsettingscpp">trunk/Source/WebKit/gtk/webkit/webkitwebsettings.cpp</a></li>
<li><a href="#trunkSourceWebKitgtkwebkitwebkitwebsettingsprivateh">trunk/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h</a></li>
<li><a href="#trunkSourceWebKitgtkwebkitwebkitwebviewcpp">trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitSettingscpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitSettingsh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkdocswebkit2gtksectionstxt">trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtktestsTestWebKitSettingscpp">trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreegtkDumpRenderTreecpp">trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreegtkTestRunnerGtkcpp">trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitgtkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/gtk/ChangeLog (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/gtk/ChangeLog        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Source/WebKit/gtk/ChangeLog        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2013-12-11 Brendan Long <b.long@cablelabs.com>
+
+ [GTK] Add "enable-mediasource" property to WebKitWebSettings
+ https://bugs.webkit.org/show_bug.cgi?id=125566
+
+ Reviewed by Philippe Normand.
+
+ * tests/testwebsettings.c:
+ (test_webkit_web_settings_copy):
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkit_web_settings_set_property):
+ (webkit_web_settings_get_property):
+ * webkit/webkitwebsettingsprivate.h:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
</ins><span class="cx"> 2013-12-10 Joanmarie Diggs <jdiggs@igalia.com>
</span><span class="cx">
</span><span class="cx"> AX: [ATK] Convert the get_text atktest.c unit tests to layout tests
</span></span></pre></div>
<a id="trunkSourceWebKitgtkteststestwebsettingsc"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/gtk/tests/testwebsettings.c (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/gtk/tests/testwebsettings.c        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Source/WebKit/gtk/tests/testwebsettings.c        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -34,24 +34,30 @@
</span><span class="cx"> "enable-webgl", TRUE,
</span><span class="cx"> "enable-fullscreen", TRUE,
</span><span class="cx"> "auto-load-images", FALSE,
</span><del>- "default-encoding", "utf-8", NULL);
</del><ins>+ "default-encoding", "utf-8",
+ "enable-mediasource", TRUE,
+ NULL);
</ins><span class="cx">
</span><span class="cx"> WebKitWebSettings *copy = webkit_web_settings_copy(settings);
</span><span class="cx">
</span><span class="cx"> gboolean enableWebGL = FALSE;
</span><span class="cx"> gboolean enableFullscreen = FALSE;
</span><span class="cx"> gboolean autoLoadImages = FALSE;
</span><ins>+ gboolean enableMediaSource = FALSE;
</ins><span class="cx"> char *defaultEncoding = 0;
</span><span class="cx"> g_object_get(copy,
</span><span class="cx"> "enable-fullscreen", &enableFullscreen,
</span><span class="cx"> "enable-webgl", &enableWebGL,
</span><span class="cx"> "auto-load-images", &autoLoadImages,
</span><del>- "default-encoding", &defaultEncoding, NULL);
</del><ins>+ "default-encoding", &defaultEncoding,
+ "enable-mediasource", &enableMediaSource,
+ NULL);
</ins><span class="cx">
</span><span class="cx"> g_assert(enableWebGL);
</span><span class="cx"> g_assert(enableFullscreen);
</span><span class="cx"> g_assert(!autoLoadImages);
</span><span class="cx"> g_assert_cmpstr(defaultEncoding, ==, "utf-8");
</span><ins>+ g_assert(enableMediaSource);
</ins><span class="cx"> g_free(defaultEncoding);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitgtkwebkitwebkitwebsettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/gtk/webkit/webkitwebsettings.cpp (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/gtk/webkit/webkitwebsettings.cpp        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebsettings.cpp        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -123,7 +123,8 @@
</span><span class="cx"> PROP_MEDIA_PLAYBACK_ALLOWS_INLINE,
</span><span class="cx"> PROP_ENABLE_CSS_SHADERS,
</span><span class="cx"> PROP_ENABLE_RUNNING_OF_INSECURE_CONTENT,
</span><del>- PROP_ENABLE_DISPLAY_OF_INSECURE_CONTENT
</del><ins>+ PROP_ENABLE_DISPLAY_OF_INSECURE_CONTENT,
+ PROP_ENABLE_MEDIA_SOURCE
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> static void webkit_web_settings_finalize(GObject* object);
</span><span class="lines">@@ -1024,6 +1025,26 @@
</span><span class="cx"> _("Whether non-HTTPS resources can run on HTTPS pages."),
</span><span class="cx"> TRUE,
</span><span class="cx"> flags));
</span><ins>+
+ /**
+ * WebKitWebSettings:enable-mediasource:
+ *
+ * Enable or disable support for MediaSource on pages. MediaSource is an
+ * experimental proposal which extends HTMLMediaElement to allow
+ * JavaScript to generate media streams for playback. The standard is
+ * currently a work-in-progress by the W3C HTML Media Task Force.
+ *
+ * See also http://www.w3.org/TR/media-source/
+ *
+ * Since: 2.4
+ */
+ g_object_class_install_property(gobject_class,
+ PROP_ENABLE_MEDIA_SOURCE,
+ g_param_spec_boolean("enable-mediasource",
+ _("Enable MediaSource"),
+ _("Whether MediaSource should be enabled."),
+ FALSE,
+ flags));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void webkit_web_settings_init(WebKitWebSettings* web_settings)
</span><span class="lines">@@ -1223,6 +1244,9 @@
</span><span class="cx"> case PROP_ENABLE_RUNNING_OF_INSECURE_CONTENT:
</span><span class="cx"> priv->enableRunningOfInsecureContent = g_value_get_boolean(value);
</span><span class="cx"> break;
</span><ins>+ case PROP_ENABLE_MEDIA_SOURCE:
+ priv->enableMediaSource = g_value_get_boolean(value);
+ break;
</ins><span class="cx"> default:
</span><span class="cx"> G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
</span><span class="cx"> break;
</span><span class="lines">@@ -1412,6 +1436,9 @@
</span><span class="cx"> case PROP_ENABLE_RUNNING_OF_INSECURE_CONTENT:
</span><span class="cx"> g_value_set_boolean(value, priv->enableRunningOfInsecureContent);
</span><span class="cx"> break;
</span><ins>+ case PROP_ENABLE_MEDIA_SOURCE:
+ g_value_set_boolean(value, priv->enableMediaSource);
+ break;
</ins><span class="cx"> default:
</span><span class="cx"> G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
</span><span class="cx"> break;
</span></span></pre></div>
<a id="trunkSourceWebKitgtkwebkitwebkitwebsettingsprivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -88,6 +88,7 @@
</span><span class="cx"> gboolean mediaPlaybackAllowsInline;
</span><span class="cx"> gboolean enableDisplayOfInsecureContent;
</span><span class="cx"> gboolean enableRunningOfInsecureContent;
</span><ins>+ gboolean enableMediaSource;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WEBKIT_API void webkit_web_settings_add_extra_plugin_directory(WebKitWebView*, const gchar* directory);
</span></span></pre></div>
<a id="trunkSourceWebKitgtkwebkitwebkitwebviewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -3623,6 +3623,10 @@
</span><span class="cx"> WebCore::RuntimeEnabledFeatures::sharedFeatures().setCSSRegionsEnabled(true);
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(MEDIA_SOURCE)
+ coreSettings.setMediaSourceEnabled(settingsPrivate->enableMediaSource);
+#endif
+
</ins><span class="cx"> // Use mock scrollbars if in DumpRenderTree mode (i.e. testing layout tests).
</span><span class="cx"> coreSettings.setMockScrollbarsEnabled(DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled());
</span><span class="cx">
</span><span class="lines">@@ -3771,6 +3775,11 @@
</span><span class="cx"> settings.setCSSCustomFilterEnabled(g_value_get_boolean(&value));
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(MEDIA_SOURCE)
+ else if (name == g_intern_string("enable-mediasource"))
+ settings.setMediaSourceEnabled(g_value_get_boolean(&value));
+#endif
+
</ins><span class="cx"> else if (!g_object_class_find_property(G_OBJECT_GET_CLASS(webSettings), name))
</span><span class="cx"> g_warning("Unexpected setting '%s'", name);
</span><span class="cx"> g_value_unset(&value);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Source/WebKit2/ChangeLog        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2013-12-11 Brendan Long <b.long@cablelabs.com>
+
+ [GTK] Add "enable-mediasource" property to WebKitWebSettings
+ https://bugs.webkit.org/show_bug.cgi?id=125566
+
+ Reviewed by Philippe Normand.
+
+ * UIProcess/API/gtk/WebKitSettings.cpp:
+ (webKitSettingsSetProperty):
+ (webKitSettingsGetProperty):
+ (webkit_settings_class_init):
+ (webkit_settings_get_enable_mediasource):
+ (webkit_settings_set_enable_mediasource):
+ * UIProcess/API/gtk/WebKitSettings.h:
+ * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
+ * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
+ (testWebKitSettings):
+
</ins><span class="cx"> 2013-12-11 Michał Pakuła vel Rutka <m.pakula@samsung.com>
</span><span class="cx">
</span><span class="cx"> [EFL] Fix build with CONTEXT_MENUS flag set OFF
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -137,7 +137,8 @@
</span><span class="cx"> PROP_ENABLE_ACCELERATED_2D_CANVAS,
</span><span class="cx"> PROP_ENABLE_WRITE_CONSOLE_MESSAGES_TO_STDOUT,
</span><span class="cx"> PROP_ENABLE_MEDIA_STREAM,
</span><del>- PROP_ENABLE_SPATIAL_NAVIGATION
</del><ins>+ PROP_ENABLE_SPATIAL_NAVIGATION,
+ PROP_ENABLE_MEDIASOURCE
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> static void webKitSettingsConstructed(GObject* object)
</span><span class="lines">@@ -305,6 +306,9 @@
</span><span class="cx"> case PROP_ENABLE_SPATIAL_NAVIGATION:
</span><span class="cx"> webkit_settings_set_enable_spatial_navigation(settings, g_value_get_boolean(value));
</span><span class="cx"> break;
</span><ins>+ case PROP_ENABLE_MEDIASOURCE:
+ webkit_settings_set_enable_mediasource(settings, g_value_get_boolean(value));
+ break;
</ins><span class="cx"> default:
</span><span class="cx"> G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, paramSpec);
</span><span class="cx"> break;
</span><span class="lines">@@ -457,6 +461,9 @@
</span><span class="cx"> case PROP_ENABLE_SPATIAL_NAVIGATION:
</span><span class="cx"> g_value_set_boolean(value, webkit_settings_get_enable_spatial_navigation(settings));
</span><span class="cx"> break;
</span><ins>+ case PROP_ENABLE_MEDIASOURCE:
+ g_value_set_boolean(value, webkit_settings_get_enable_mediasource(settings));
+ break;
</ins><span class="cx">
</span><span class="cx"> default:
</span><span class="cx"> G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, paramSpec);
</span><span class="lines">@@ -1189,6 +1196,25 @@
</span><span class="cx"> FALSE,
</span><span class="cx"> readWriteConstructParamFlags));
</span><span class="cx">
</span><ins>+ /**
+ * WebKitSettings:enable-mediasource:
+ *
+ * Enable or disable support for MediaSource on pages. MediaSource is an
+ * experimental proposal which extends HTMLMediaElement to allow
+ * JavaScript to generate media streams for playback. The standard is
+ * currently a work-in-progress by the W3C HTML Media Task Force.
+ *
+ * See also http://www.w3.org/TR/media-source/
+ *
+ * Since: 2.4
+ */
+ g_object_class_install_property(gObjectClass,
+ PROP_ENABLE_MEDIASOURCE,
+ g_param_spec_boolean("enable-mediasource",
+ _("Enable MediaSource"),
+ _("Whether MediaSource should be enabled."),
+ FALSE,
+ readWriteConstructParamFlags));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebPreferences* webkitSettingsGetPreferences(WebKitSettings* settings)
</span><span class="lines">@@ -2932,3 +2958,42 @@
</span><span class="cx">
</span><span class="cx"> return settings->priv->preferences->spatialNavigationEnabled();
</span><span class="cx"> }
</span><ins>+
+/**
+ * webkit_settings_get_enable_mediasource:
+ * @settings: a #WebKitSettings
+ *
+ * Get the #WebKitSettings:enable-mediasource property.
+ *
+ * Returns: %TRUE If MediaSource support is enabled or %FALSE otherwise.
+ *
+ * Since: 2.4
+ */
+gboolean webkit_settings_get_enable_mediasource(WebKitSettings* settings)
+{
+ g_return_val_if_fail(WEBKIT_IS_SETTINGS(settings), FALSE);
+
+ return settings->priv->preferences->mediaSourceEnabled();
+}
+
+/**
+ * webkit_settings_set_enable_mediasource:
+ * @settings: a #WebKitSettings
+ * @enabled: Value to be set
+ *
+ * Set the #WebKitSettings:enable-mediasource property.
+ *
+ * Since: 2.4
+ */
+void webkit_settings_set_enable_mediasource(WebKitSettings* settings, gboolean enabled)
+{
+ g_return_if_fail(WEBKIT_IS_SETTINGS(settings));
+
+ WebKitSettingsPrivate* priv = settings->priv;
+ bool currentValue = priv->preferences->mediaSourceEnabled();
+ if (currentValue == enabled)
+ return;
+
+ priv->preferences->setMediaSourceEnabled(enabled);
+ g_object_notify(G_OBJECT(settings), "enable-mediasource");
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitSettingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -407,6 +407,13 @@
</span><span class="cx"> webkit_settings_set_enable_spatial_navigation (WebKitSettings *settings,
</span><span class="cx"> gboolean enabled);
</span><span class="cx">
</span><ins>+WEBKIT_API gboolean
+webkit_settings_get_enable_mediasource (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_mediasource (WebKitSettings *settings,
+ gboolean enabled);
+
</ins><span class="cx"> G_END_DECLS
</span><span class="cx">
</span><span class="cx"> #endif /* WebKitSettings_h */
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkdocswebkit2gtksectionstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -368,6 +368,8 @@
</span><span class="cx"> webkit_settings_set_enable_media_stream
</span><span class="cx"> webkit_settings_get_enable_spatial_navigation
</span><span class="cx"> webkit_settings_set_enable_spatial_navigation
</span><ins>+webkit_settings_get_enable_mediasource
+webkit_settings_set_enable_mediasource
</ins><span class="cx">
</span><span class="cx"> <SUBSECTION Standard>
</span><span class="cx"> WebKitSettingsClass
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtktestsTestWebKitSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -268,6 +268,11 @@
</span><span class="cx"> webkit_settings_set_enable_spatial_navigation(settings, TRUE);
</span><span class="cx"> g_assert(webkit_settings_get_enable_spatial_navigation(settings));
</span><span class="cx">
</span><ins>+ // MediaSource is disabled by default
+ g_assert(!webkit_settings_get_enable_mediasource(settings));
+ webkit_settings_set_enable_mediasource(settings, TRUE);
+ g_assert(webkit_settings_get_enable_mediasource(settings));
+
</ins><span class="cx"> g_object_unref(G_OBJECT(settings));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Tools/ChangeLog        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2013-12-11 Brendan Long <b.long@cablelabs.com>
+
+ [GTK] Add "enable-mediasource" property to WebKitWebSettings
+ https://bugs.webkit.org/show_bug.cgi?id=125566
+
+ Reviewed by Philippe Normand.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues): Turn MediaSource on by default for easier testing.
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ (TestRunner::overridePreference): Allow overriding WebKitMediaSourceEnabled.
+
</ins><span class="cx"> 2013-12-11 Dan Bernstein <mitz@apple.com>
</span><span class="cx">
</span><span class="cx"> [Mac] Observe the activeURL property to keep the MiniBrowser URL field up to date
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreegtkDumpRenderTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -496,6 +496,7 @@
</span><span class="cx"> "enable-hyperlink-auditing", FALSE,
</span><span class="cx"> "editing-behavior", WEBKIT_EDITING_BEHAVIOR_UNIX,
</span><span class="cx"> "enable-fullscreen", TRUE,
</span><ins>+ "enable-mediasource", TRUE,
</ins><span class="cx"> NULL);
</span><span class="cx"> webkit_web_view_set_settings(webView, settings);
</span><span class="cx"> webkit_set_cache_model(WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER);
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreegtkTestRunnerGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp (160433 => 160434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp        2013-12-11 16:16:16 UTC (rev 160433)
+++ trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp        2013-12-11 16:28:27 UTC (rev 160434)
</span><span class="lines">@@ -695,6 +695,8 @@
</span><span class="cx"> propertyName = "auto-load-images";
</span><span class="cx"> else if (g_str_equal(originalName.get(), "WebKitShouldRespectImageOrientation"))
</span><span class="cx"> propertyName = "respect-image-orientation";
</span><ins>+ else if (g_str_equal(originalName.get(), "WebKitMediaSourceEnabled"))
+ propertyName = "enable-mediasource";
</ins><span class="cx"> else if (g_str_equal(originalName.get(), "WebKitTabToLinksPreferenceKey")) {
</span><span class="cx"> DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(booleanFromValue(valueAsString.get()));
</span><span class="cx"> return;
</span></span></pre>
</div>
</div>
</body>
</html>