[Webkit-unassigned] [Bug 108052] Expose WebContext::setCookieStorageDirectory() to Qt API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 29 08:20:47 PST 2013


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





--- Comment #3 from Jocelyn Turcotte <jocelyn.turcotte at digia.com>  2013-01-29 08:22:45 PST ---
(In reply to comment #2)
> (In reply to comment #1)
> > I didn't read deeply through the code, but a comment in Source/WebKit2/UIProcess/API/C/WKContextPrivate.h says:
> > // FIXME: These functions are only effective if called before the Web process is launched. But
> > // we should really change these settings to be on WebPreferences and changeable at runtime.
> > 
> > So you would have to fix this first, else you might notice that WKContextSetCookieStorageDirectory won't have any effect unless you kill the process.
> 
> I see. In my case it might not be something I would worry about, as I would set this setting only when instantiating the WebView and I wouldn't change it later -- but I see that it could be a problem. 

The thing is that WebContext applies to all web view. The context is destroyed after the last web view closed, but still waits something like 30 seconds before closing the WebProcess. So this would ultimately force you to restart your whole UI process as well to work around this, probably not what you want.

> 
> I've been trying to follow the execution flow to find out what pieces I need to change, and so far I've come up with these:
> 
> - WebCore/page/settings.in (definition of the cookieStorageDirectory preference)
> - WebKit2/Share/WebPreferencesStore.h (setter and getters)
> - WebCore/platform/network/qt/CookieJarQt.cpp (implementation of the cookie jar)
> 
> However, I still didn't figure out how the CookieJarQt class could access the value of cookieStorageDirectory from the WebPreferences and how to get notified of its changes.
> I see that the WebProcess receives the PreferencesDidChange message and processes it by updating the preferences in the WebCore::Settings object, but I don't understand how and when the CookieJarQt object could pick the setting from there. Can someone help me with this?

The issue is that WebPreference applies on a WebPage level, and this wouldn't make sense for the cookie jar, which applies to all pages. There is no mechanism currently, as far as I know, to update WebContext/WebProcess parameters after the web process creation.

We also make sure that all other WebKit2 ports are updated if we change the way this behaves.

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