[Webkit-unassigned] [Bug 69249] [GTK][WEBKIT2] Add webkit_web_view_load_html_string and webkit_web_view_load_plain_text APIs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 6 03:47:41 PDT 2011


--- Comment #18 from Nayan Kumar K <nayankk at motorola.com>  2011-10-06 03:47:41 PST ---
(From update of attachment 109608)
View in context: https://bugs.webkit.org/attachment.cgi?id=109608&action=review

>> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:274
>> + * Mime type of @html_string is assumed to be "text/html".
> Perhaps "The mime type of the document will be "text/html"."


>> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:276
>> +void webkit_web_view_load_html_string(WebKitWebView* webView, const gchar* htmlString, const gchar* baseUri)
> I agree with Carlos that this should be called webkit_web_view_load_html.

Sure. I will rename this function name.

>> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:286
>> +    WKRelease(baseUriRef);
> Is there no smart pointer for WK types? If there is we need to use it.

There is WKRetainPtr, as mentioned by Carlos. I will use it here.

>> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:295
>> + * have the mime-type "text/plain".
> Same style of sentence for the mime type here. Please use "mime type" everywhere and not "mime-type" in some places.


>> Source/WebKit2/UIProcess/API/gtk/tests/testloading.c:28
>> +#define HTML_TITLE "Hello WebKit GTK+!"
> I don't think you need to test the title when loading a string.

As we don't have the API to get the loaded content, I thought of asserting on expected text for now. But as you said, for now I will keep this test very simple, just asserting if load is not finished. Once we have the API to get content loaded, I will modify this test,

>> Source/WebKit2/UIProcess/API/gtk/tests/testloading.c:249
>> +    g_main_loop_quit(fixture->loop);
> I guess it's okay to structure the test like this for now, but when we add an API to get the WebView contents, we should restructure this test to simply load the page and assert that the contents are equal. These tests should be in the webkittests file since they are unit tests for the WebView.

Sorry, I didn't quite understand what you meant by webkittests file? Should I move this test to testwebview.c file?

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