[Webkit-unassigned] [Bug 69254] [GTK] Add webkit_web_view_load_alternate_html_string() to WebKit2 GTK+ API

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


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
 Attachment #109472|review+                     |review-
               Flag|                            |

--- Comment #4 from Martin Robinson <mrobinson at webkit.org>  2011-10-03 09:33:20 PST ---
(From update of attachment 109472)
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.

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