[Webkit-unassigned] [Bug 69524] [GTK] Add methods to get/set a custom text enconding to WebKit2 GTK+ API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 6 08:50:11 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=69524


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #109953|review?                     |review-
               Flag|                            |




--- Comment #2 from Martin Robinson <mrobinson at webkit.org>  2011-10-06 08:50:11 PST ---
(From update of attachment 109953)
View in context: https://bugs.webkit.org/attachment.cgi?id=109953&action=review

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:48
>      GRefPtr<WebKitWebLoaderClient> loaderClient;
> +
> +    CString customEncoding;

Again, I think tihs should be above under context.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:293
> + * not the default-encoding

I guess a period is needed at the nd of this comment. default-encoding -> default encoding

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:322
> + * Sets the current custom text encoding name of @web_view. Any load
> + * operation will be stopped and the page will be reloaded. This method
> + * doesn't change the default enconding.
> + * Setting custom text encoding to %NULL, makes @web_view to use the

Might want to mention what the effect of setting it a little more clearly. I'm guessing that is makes text documents load with a different mime type, but I'm not certain.

> Source/WebKit2/UIProcess/API/gtk/tests/testwebview.c:43
> +    WebKitWebView *view = WEBKIT_WEB_VIEW(webkit_web_view_new());
> +    g_object_ref_sink(view);
> +
> +    g_assert(!webkit_web_view_get_custom_text_encoding(view));
> +    webkit_web_view_set_custom_text_encoding(view, "utf8");
> +    g_assert_cmpstr(webkit_web_view_get_custom_text_encoding(view), ==, "utf8");
> +    /* Go back to the default enconding */
> +    webkit_web_view_set_custom_text_encoding(view, NULL);
> +    g_assert(!webkit_web_view_get_custom_text_encoding(view));
> +    g_object_unref(view);

Here I think you should load a text document and verify that the mime type is what you expect.

-- 
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