Commit 49ee4cd4 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

[GTK] r114021 triggered media flakyness

https://bugs.webkit.org/show_bug.cgi?id=83874

Patch by Simon Pena <spena@igalia.com> on 2012-04-18
Reviewed by Philippe Normand.

Source/WebKit/gtk:

When the MediaPlaybackRequiresUserGesture setting was added, no gtk
API was implemented to access it.

This adds a property to gtk WebKit WebSettings, and connects it to
WebKit WebView, thus allowing clients to programmatically modify it.

* 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):

Tools:

Now that there is gtk API to update the
MediaPlaybackRequiresUserGesture property, set it to false from the
DumpRenderTree tool when resetting defaults to consistent values.

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues):

LayoutTests:

media/video-load-require-user-gesture.html and
media/video-play-require-user-gesture.html where enabling
MediaPlaybackRequiresUserGesture when run, so tests running
concurrently would fail -they would pass when run independently.

Since new API is added to ensure DumpRenderTree is able to reset
that setting, having media/video-load-require-user-gesture.html and
media/video-play-require-user-gesture.html no longer causes
flakiness.

* platform/gtk/test_expectations.txt: Unskip
media/video-load-require-user-gesture.html and
media/video-play-require-user-gesture.html

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9afdfc33
2012-04-18 Simon Pena <spena@igalia.com>
[GTK] r114021 triggered media flakyness
https://bugs.webkit.org/show_bug.cgi?id=83874
Reviewed by Philippe Normand.
media/video-load-require-user-gesture.html and
media/video-play-require-user-gesture.html where enabling
MediaPlaybackRequiresUserGesture when run, so tests running
concurrently would fail -they would pass when run independently.
Since new API is added to ensure DumpRenderTree is able to reset
that setting, having media/video-load-require-user-gesture.html and
media/video-play-require-user-gesture.html no longer causes
flakiness.
* platform/gtk/test_expectations.txt: Unskip
media/video-load-require-user-gesture.html and
media/video-play-require-user-gesture.html
2012-04-18 Yury Semikhatsky <yurys@chromium.org>
 
Web Inspector: DataGrid should use explicit root node
......@@ -1549,11 +1549,6 @@ BUGWKGTK : editing/spelling/spelling-marker-description.html = FAIL
BUGWK69933 : fast/borders/inline-mask-overlay-image-outset-vertical-rl.html = FAIL
BUGWK69933 : fast/borders/inline-mask-overlay-image-outset.html = FAIL
// Running those two make other media tests flaky, so skip until
// proper investigation can be made.
BUGWK83874 SKIP : media/video-load-require-user-gesture.html = FAIL
BUGWK83874 SKIP : media/video-play-require-user-gesture.html = FAIL
BUGWK84025 : media/sources-fallback-codecs.html = FAIL
BUGWK83906 : ietestcenter/css3/grid/grid-column-001.htm = IMAGE
......
2012-04-18 Simon Pena <spena@igalia.com>
[GTK] r114021 triggered media flakyness
https://bugs.webkit.org/show_bug.cgi?id=83874
Reviewed by Philippe Normand.
When the MediaPlaybackRequiresUserGesture setting was added, no gtk
API was implemented to access it.
This adds a property to gtk WebKit WebSettings, and connects it to
WebKit WebView, thus allowing clients to programmatically modify it.
* 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):
2012-04-17 Carlos Garnacho <carlos@lanedo.com>
 
[GTK] Enable back double buffering on WebKitWebView to fix flickering
......
......@@ -121,7 +121,8 @@ enum {
PROP_ENABLE_WEBGL,
PROP_ENABLE_WEB_AUDIO,
PROP_ENABLE_ACCELERATED_COMPOSITING,
PROP_ENABLE_SMOOTH_SCROLLING
PROP_ENABLE_SMOOTH_SCROLLING,
PROP_MEDIA_PLAYBACK_REQUIRES_USER_GESTURE
};
// Create a default user agent string
......@@ -972,6 +973,24 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
_("Whether to enable smooth scrolling"),
FALSE,
flags));
/**
* WebKitWebSettings:media-playback-requires-user-gesture
*
* Whether an user gesture would be required to start media playback or load
* media. This is off by default, so media playback could start
* automatically. Setting it on requires a gesture by the user to start
* playback, or to load the media.
*
* Since: 1.10.0
*/
g_object_class_install_property(gobject_class,
PROP_MEDIA_PLAYBACK_REQUIRES_USER_GESTURE,
g_param_spec_boolean("media-playback-requires-user-gesture",
_("Media playback requires user gesture"),
_("Whether media playback requires user gesture"),
FALSE,
flags));
}
static void webkit_web_settings_init(WebKitWebSettings* web_settings)
......@@ -1150,6 +1169,9 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
case PROP_ENABLE_SMOOTH_SCROLLING:
priv->enableSmoothScrolling = g_value_get_boolean(value);
break;
case PROP_MEDIA_PLAYBACK_REQUIRES_USER_GESTURE:
priv->mediaPlaybackRequiresUserGesture = g_value_get_boolean(value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
......@@ -1318,6 +1340,9 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa
case PROP_ENABLE_SMOOTH_SCROLLING:
g_value_set_boolean(value, priv->enableSmoothScrolling);
break;
case PROP_MEDIA_PLAYBACK_REQUIRES_USER_GESTURE:
g_value_set_boolean(value, priv->mediaPlaybackRequiresUserGesture);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
......
......@@ -81,6 +81,7 @@ struct _WebKitWebSettingsPrivate {
gboolean enableWebAudio;
gboolean enableAcceleratedCompositing;
gboolean enableSmoothScrolling;
gboolean mediaPlaybackRequiresUserGesture;
};
WEBKIT_API void webkit_web_settings_add_extra_plugin_directory(WebKitWebView*, const gchar* directory);
......
......@@ -3384,6 +3384,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
coreSettings->setJavaEnabled(settingsPrivate->enableJavaApplet);
coreSettings->setHyperlinkAuditingEnabled(settingsPrivate->enableHyperlinkAuditing);
coreSettings->setDNSPrefetchingEnabled(settingsPrivate->enableDNSPrefetching);
coreSettings->setMediaPlaybackRequiresUserGesture(settingsPrivate->mediaPlaybackRequiresUserGesture);
#if ENABLE(SQL_DATABASE)
AbstractDatabase::setIsAvailable(settingsPrivate->enableHTML5Database);
......@@ -3522,6 +3523,8 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
settings->setJavaEnabled(g_value_get_boolean(&value));
else if (name == g_intern_string("enable-hyperlink-auditing"))
settings->setHyperlinkAuditingEnabled(g_value_get_boolean(&value));
else if (name == g_intern_string("media-playback-requires-user-gesture"))
settings->setMediaPlaybackRequiresUserGesture(g_value_get_boolean(&value));
#if ENABLE(SPELLCHECK)
else if (name == g_intern_string("spell-checking-languages")) {
......
2012-04-18 Simon Pena <spena@igalia.com>
[GTK] r114021 triggered media flakyness
https://bugs.webkit.org/show_bug.cgi?id=83874
Reviewed by Philippe Normand.
Now that there is gtk API to update the
MediaPlaybackRequiresUserGesture property, set it to false from the
DumpRenderTree tool when resetting defaults to consistent values.
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues):
2012-04-18 Vivek Galatage <vivekgalatage@gmail.com>
 
Web Inspector: Disabling Inspector causes build failure on Windows
......@@ -427,6 +427,7 @@ static void resetDefaultsToConsistentValues()
"enable-hyperlink-auditing", FALSE,
"editing-behavior", WEBKIT_EDITING_BEHAVIOR_UNIX,
"enable-fullscreen", TRUE,
"media-playback-requires-user-gesture", FALSE,
NULL);
webkit_web_view_set_settings(webView, settings);
webkit_set_cache_model(WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment