[Webkit-unassigned] [Bug 9767] WebPreference methods setAllowsAnimatedImages: and setAllowsAnimatedImageLooping: don't actually affect WebView behaviors
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 14 00:45:52 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=9767
--- Comment #12 from Carlos Garcia Campos <cgarcia at igalia.com> 2012-02-14 00:45:51 PST ---
(From update of attachment 126910)
View in context: https://bugs.webkit.org/attachment.cgi?id=126910&action=review
I appreciate you added the new preference to all ports, there are some issues with WebKit2 GTK+, though.
> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:975
> +gboolean webkit_settings_get_allows_animated_images(WebKitSettings* settings)
> +{
> + g_return_val_if_fail(WEBKIT_IS_SETTINGS(settings), FALSE);
> +
> + return WKPreferencesGetAllowsAnimatedImages(settings->priv->preferences.get());
> +}
> +
> +/**
> + * webkit_settings_set_allows_animated_images:
> + * @settings: a #WebKitSettings
> + * @enabled: Value to be set
> + *
> + * Set the #WebKitSettings:allows-animated-images property.
> + */
> +void webkit_settings_set_allows_animated_images(WebKitSettings* settings, gboolean enabled)
> +{
> + g_return_if_fail(WEBKIT_IS_SETTINGS(settings));
> +
> + WebKitSettingsPrivate* priv = settings->priv;
> + bool currentValue = WKPreferencesGetAllowsAnimatedImages(priv->preferences.get());
> + if (currentValue == enabled)
> + return;
> +
> + WKPreferencesSetAllowsAnimatedImages(priv->preferences.get(), enabled);
> + g_object_notify(G_OBJECT(settings), "allow-animated-images");
> +}
This is not enough, you should install the property in webkit_settings_class_init() and implement get/set for the property in webKitSettingsGetProperty() and webKitSettingsSetProperty(). Prototypes should be added to the header too (Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h) and new symbols should be added to the documentation (Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt, in the section WebKitSettings add webkit_settings_get_allows_animated_images and webkit_settings_set_allows_animated_images at the end of the section).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list