Bug 71109 - [GTK] Add methods to get/set the settings of a web view to WebKit2 GTK+ API
Summary: [GTK] Add methods to get/set the settings of a web view to WebKit2 GTK+ API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2011-10-28 04:36 PDT by Carlos Garcia Campos
Modified: 2011-10-31 04:45 PDT (History)
5 users (show)

See Also:


Attachments
Patch (11.94 KB, patch)
2011-10-28 04:39 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2011-10-28 04:36:25 PDT
Add webkit_web_view_set_settings() and webkit_web_view_get_settings()
Comment 1 Carlos Garcia Campos 2011-10-28 04:39:44 PDT
Created attachment 112848 [details]
Patch
Comment 2 WebKit Review Bot 2011-10-28 04:41:39 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Martin Robinson 2011-10-28 09:26:51 PDT
Comment on attachment 112848 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=112848&action=review

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:617
> + * Sets the #WebKitSettings to be applied to @web_view. The
> + * existing #WebKitSettings of @web_view will be replaced by
> + * @settings. The same #WebKitSettings object can be shared
> + * by multiple #WebKitWebView<!-- -->s.

Might want to note that the settings on the WebView are updated immediately.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:638
> + * #WebKitSettings will be returned. This method always return

return -> returns

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:645
> + * @web_view settings and update it directly. Take into account that
> + * #WebKitSettings objects can be shared by multiple

I'd just remove "Take into account that" here.

> Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp:70
> +    GRefPtr<GtkWidget> webView2 = webkit_web_view_new();
> +    test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(webView2.get()));
> +    webkit_web_view_set_settings(WEBKIT_WEB_VIEW(webView2.get()), settings);
> +    g_assert(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webView2.get())) == settings);
> +

Might want to add an assertion here that the default settings object on webView2 is different than the one from test->m_webView.
Comment 4 Carlos Garcia Campos 2011-10-31 04:45:56 PDT
Committed r98845: <http://trac.webkit.org/changeset/98845>