QtLauncher is crashing if a page with HTML5 App Cache is visited. This is because the app cache is designed so that WebCore::cacheStorage().setCacheDirectory() needs to be called with a path before the app cache can be used.
As far as I can tell QtWebKit does not call WebCore::cacheStorage().setCacheDirectory to set the path for the app cache neither provides a public API for QtWebKit clients to set the path; the closes I found an internal API called qt_websettings_setOfflineWebApplicationCachePath() which indeed can be used as a work-around.
As I first step I would like to propose that QtWebKit would set the app cache path to a sensible default so that QtWebKit clients does not have to deal with the issue. Later we might want to revisit how can a client set the path puth a public APi if there is a need for that.
Created attachment 33856 [details]
We definately need to deal better with both
WebStorage - Local and Session
I actually have a patch adding support for that latter sitting around somewhere, but I stopped working on it as our API for these technologies is currently confusing, due to spec renaming.
For instance our WebDatabase is called OfflineStorageDatabase, which leads people to think that it has to do with the appcache or the webstorage. Also, the webdatabase is not limited to offline usage.
I believe that we need to deal with all this as soon as possible.
OK, I posted the patch in question
OK, my patch has been committed (r46628), feel free to update your patch. Notice that you can set the max size now as well.
When you set defaults, please update the documentation of the methods to mention these.
Comment on attachment 33856 [details]
Looks good! A minor nitpick, just fix before landing:
> +static void WebKitInitializeApplicationCachePathIfNecessary()
Should be named initializeApplicationCachePathIfNecessary(), ie no WebKit prefix, and start with lower-case.
Actually this is not in the coding style guidelines, but I think the lower case variant is more prevalent.
Landed with my bare hands due to https://bugs.webkit.org/show_bug.cgi?id=27930
Transmitting file data ..
Committed revision 46691.