[webkit-reviews] review denied: [Bug 69254] [GTK] Add webkit_web_view_load_alternate_html_string() to WebKit2 GTK+ API : [Attachment 109472] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 3 09:33:20 PDT 2011


Martin Robinson <mrobinson at webkit.org> has denied  review:
Bug 69254: [GTK] Add webkit_web_view_load_alternate_html_string() to WebKit2
GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=69254

Attachment 109472: Patch
https://bugs.webkit.org/attachment.cgi?id=109472&action=review

------- Additional Comments from Martin Robinson <mrobinson at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=109472&action=review


Great stuff, just some minor things below.

>> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:236
>> + * Request loading of an alternate content for a URI that is unreachable.
>> + * Using this method will preserve the back-forward list. The URI passed in

>> + * @base_uri has to be an absolute URI.
>> + * You can monitor the status of the load operation using the
>> + * #WebKitWebLoaderClient of @web_view. See
webkit_web_view_get_loader_client().
> 
> webkit_web_view_load_alternate_html_string is incorrectly named. Don't use
underscores in your identifier names.  [readability/naming] [4]

This is nice documentation. The only thing that I think it's lacking is a note
about when it's appropriate to call this method. Does the user call it during a
particular loader callback? Ther other quibble I have is that it seems useful
outside of load failures, because it does something different with the
back-forward list. I'm not exactly sure what from the documentation you have,
so that could be expanded a bit. I also think if it's useful in non-failure
cases unreachableURI might need a different name.

> Source/WebKit2/UIProcess/API/gtk/tests/testloading.c:30
> +#define HTML_ALTERNATE "<html><body>Alternate Content</body></html>"

Please use static const char* for these type of strings. If they are only used
in one place, be sure to place them in the innermost scope of their use.


More information about the webkit-reviews mailing list