[webkit-qt] Exposing Document::firstPartyForCookies()

Mohammed Sameer msameer at foolab.org
Mon Jul 12 03:38:49 PDT 2010


Hi,

I think exposing that Document::firstPartyForCookies() would be a nice QtWebKit API addition.
The use case I have in mind is allowing third party cookies filtering.

Ideally it QNetworkCookieJar should be modified to be:
bool QNetworkCookieJar::setCookiesFromUrl(const QList<QNetworkCookie>& cookieList, const QUrl& url , const QUrl& firstPartyForCookies = QUrl()) and then QtWebKit should just call it.

Since I don't dare proposing such a change (Did I just do it ? ;-)) I thought the simplest
solution would be adding
QUrl QWebFrame::firstPartyForCookies() const

What do you think ?

Here's the bug report:
https://bugs.webkit.org/show_bug.cgi?id=41996

I also uploaded a patch there. I know it's missing a test but I'm not adding that
before an API agreement has been reached.

Cheers,

-- 
GPG-Key: 0xA3FD0DF7 - 9F73 032E EAC9 F7AD 951F  280E CB66 8E29 A3FD 0DF7
Debian User and Developer.
Homepage: www.foolab.org


More information about the webkit-qt mailing list