[Webkit-unassigned] [Bug 68371] [GTK][WEBKIT2] Add WebKitWebSettings GTK+ API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 22 00:44:05 PDT 2011


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


Carlos Garcia Campos <cgarcia at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #108286|1                           |0
        is obsolete|                            |




--- Comment #16 from Carlos Garcia Campos <cgarcia at igalia.com>  2011-09-22 00:44:05 PST ---
(From update of attachment 108286)
View in context: https://bugs.webkit.org/attachment.cgi?id=108286&action=review

This looks much better, I still have a few comments, though

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:81
> +static void webkitWebSettingsFinalize(GObject* object)
> +{
> +    G_OBJECT_CLASS(webkit_web_settings_parent_class)->finalize(object);
> +}

We don't need this, at least for now that all properties are boolean.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:83
> +static void webkitWebSettingsSetProperty(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)

It should be propId instead of prop_id

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:89
> +        webkit_web_settings_set_java_script_enabled(settings, (bool)g_value_get_boolean(value));

webkit_web_settings_set_java_script_enabled() takes a gboolean, bool cast is wrong there.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:92
> +        webkit_web_settings_set_loads_images_automatically(settings, (bool)g_value_get_boolean(value));

I think methods should follow the pattern webkit_web_settings_[get|set]_property_name(), in this case webkit_web_settings_set_auto_load_images()

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:229
> +                                                         "load-icon-ignoring-image-load-pref",

The name is long, but I think we should still use preference instead of pref

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:248
> +                                                         FALSE,

This is enabled by default in WebKit1, I think we should use the same default values to make the transition easier and consistent.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:360
> +                                                         TRUE,

This is FALSE by default in WebKit1

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:374
> +                                                         TRUE,

This is FALSE by default in WebKit1

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:406
> + * Returns: TRUE - If Java Script is enabled.

Use %TRUE and remove the -

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:412
> +    g_return_val_if_fail(WEBKIT_IS_WEB_SETTINGS(settings), false);

The function returns a gboolean, use FALSE instead of false here.

> Source/WebKit2/UIProcess/API/gtk/tests/testwebcontext.c:27
> -    g_assert(webkit_web_context_get_default(context) == webkit_web_context_get_default(context));
> +    g_assert(webkit_web_context_get_default() == webkit_web_context_get_default());

This change is unrelated. I already fixed it in bug https://bugs.webkit.org/show_bug.cgi?id=67931.

-- 
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