RESOLVED FIXED71109
[GTK] Add methods to get/set the settings of a web view to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=71109
Summary [GTK] Add methods to get/set the settings of a web view to WebKit2 GTK+ API
Carlos Garcia Campos
Reported 2011-10-28 04:36:25 PDT
Add webkit_web_view_set_settings() and webkit_web_view_get_settings()
Attachments
Patch (11.94 KB, patch)
2011-10-28 04:39 PDT, Carlos Garcia Campos
mrobinson: review+
Carlos Garcia Campos
Comment 1 2011-10-28 04:39:44 PDT
WebKit Review Bot
Comment 2 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
Martin Robinson
Comment 3 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.
Carlos Garcia Campos
Comment 4 2011-10-31 04:45:56 PDT
Note You need to log in before you can comment on or make changes to this bug.