[Webkit-unassigned] [Bug 24001] [GTK] Cache control APIs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 4 05:57:52 PDT 2009


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





------- Comment #9 from gns at gnome.org  2009-05-04 05:57 PDT -------
(From update of attachment 28394)
> +/* not having this produces a warning when including glibtop.h */
> +#define TIME_WITH_SYS_TIME 1

I would prefer having this right before the include, in this case, and undef'ed
afterwards.

> +    // initialize glibtop so we can get memory and disk usage.
> +    glibtop_init();

I don't think we need to call this init here. We don't need all structs filled,
anyway. I believe you can safely use the global server with the get function
straight away, but do test please, because gtop's docs are way bad =(. Also, it
looks like gtop doesn't work on Windows, so I think we'd need a fallback for
this.

> +    WEBKIT_API void
> +    webkit_web_view_set_cache_model (WebKitCacheModel cache_model);
> +
> +    WEBKIT_API WebKitCacheModel
> +    webkit_web_view_cache_model (void);

These should not be webkit_web_view. They do not concern a specific webview, so
make them webkit_{set,get}_cache_model. Notice the get, too.

> +    WEBKIT_API gboolean
> +    webkit_web_view_did_set_cache_model (void);

I don't think we need this at all.

> +    PROP_CACHE_MODEL

Nor a property, since this will be handled globally.

> +    if (!webkit_web_view_did_set_cache_model())
> +    {
> +        // the Mac port checks the running app against a list of known
> +        // apps with preferred cache models, and then falls back on
> +        // WEBWEBKIT_CACHE_MODEL_DOCUMENT_VIEWER
> +        webkit_web_view_set_cache_model(WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER);
> +    }
> +

Move this to webkit_init. We should only do this once, really.

> +    if (s_didSetCacheModel && cacheModel == s_cacheModel)
> +        return;

The didSetCacheModel check should go away everywhere, I think.

> diff --git a/WebKitTools/GtkLauncher/main.c b/WebKitTools/GtkLauncher/main.c

Put this in a different patch, for the testing purposes, please.

Thanks for the patch!


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