[Webkit-unassigned] [Bug 22624] [SOUP][GTK] Need API to get SoupSession from WebKit.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 24 07:38:00 PST 2008


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





------- Comment #4 from zecke at selfish.org  2008-12-24 07:38 PDT -------
(From update of attachment 26230)

> +static SoupCookieJar* cookie_jar = NULL;

No null, please use 0 which will be turned into a null pointer.


>  SoupCookieJar* getCookieJar()
>  {
> -    static SoupCookieJar* jar = soup_cookie_jar_new();
> -    return jar;
> +    if (cookie_jar == NULL) {
> +        cookie_jar = soup_cookie_jar_new();
> +    }


> +void setCookieJar(SoupCookieJar *jar)
> +{
> +    if (cookie_jar == NULL) {
> +        cookie_jar = jar;
> +    }
>  }

According to our coding style we do not use '{' in these two cases.



> +static void soupSessionInitalize()
> +{
> +    SoupSessionFeature *jar = 0;
> +    const char* soup_debug = g_getenv("WEBKIT_SOUP_LOGGING");

It would be cool if we could unite this with the LogNetworking WTFLogChannel
(WebCore/platform/Logging.h)



> +
> +    jar = soup_session_get_feature(session, SOUP_TYPE_COOKIE_JAR);
> +    if (!jar) {
>          soup_session_add_feature(session, SOUP_SESSION_FEATURE(getCookieJar()));
> +    } else {
> +        setCookieJar(SOUP_COOKIE_JAR(g_object_ref(jar)));
> +    }

Coding Style :)


>      WebKitWebViewPrivate* priv = webView->priv;
>      if (priv->zoomFullContent == zoomFullContent)
> -      return;
> +        return;

right, not for this patch though.

>  
>      priv->zoomFullContent = zoomFullContent;
>      webkit_web_view_apply_zoom_level(webView, webkit_web_view_get_zoom_level(webView));
> @@ -2593,4 +2612,24 @@ void webkit_web_view_set_full_content_zoom(WebKitWebView* webView, gboolean zoom
>      g_object_notify(G_OBJECT(webView), "full-content-zoom");
>  }
>  
> +/**
> + * webkit_web_view_get_session

I think you need a colon here for gtk-doc










General comments:
  - Coding Style, sepcially brackets on the if/else :)
  - on QtWebKit we allow to have something like a SoupSession per WebView...
would that make sense as well? E.g. sometimes you do not want two different
WebView to share the same cookie pool? If we want that the WebView should hold
a SoupSession and there should be one default session so by default every
WebView is sharing this session?


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list