WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
50780
WebKit2: Need to be able to set and get the Cookie Storage Policy
https://bugs.webkit.org/show_bug.cgi?id=50780
Summary
WebKit2: Need to be able to set and get the Cookie Storage Policy
Jessie Berlin
Reported
2010-12-09 12:41:03 PST
It should be similar to the WebKit1 cookieStorageAcceptPolicy/setCookieStorageAcceptPolicy. <
rdar://problem/8750856
>
Attachments
Patch (Part 1) - Getting and setting the policy in WebKit2
(34.70 KB, patch)
2011-03-24 09:38 PDT
,
Jessie Berlin
no flags
Details
Formatted Diff
Diff
Patch (Part 1) - Getting and setting the policy in WebKit2 (Take 2)
(56.41 KB, patch)
2011-03-25 08:37 PDT
,
Jessie Berlin
no flags
Details
Formatted Diff
Diff
Patch (Part 1) - Getting and setting the policy in WebKit2 (Take 3)
(51.31 KB, patch)
2011-03-25 10:30 PDT
,
Jessie Berlin
no flags
Details
Formatted Diff
Diff
Patch (Part 2) - Make it possible to specify the initial policy on Windows
(8.11 KB, patch)
2011-03-25 13:49 PDT
,
Jessie Berlin
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Jessie Berlin
Comment 1
2011-03-10 11:08:49 PST
It doesn't have to be a preference. It should probably be done on the WKCookieManager instead.
Jessie Berlin
Comment 2
2011-03-24 09:38:25 PDT
Created
attachment 86784
[details]
Patch (Part 1) - Getting and setting the policy in WebKit2
Darin Adler
Comment 3
2011-03-24 10:17:32 PDT
Comment on
attachment 86784
[details]
Patch (Part 1) - Getting and setting the policy in WebKit2 I’m not sure WebCore should be involved so much here. It’s right to have WebKit2 send the cookie acceptance policy from the UI to the Web process, but I’m not sure we need the platform layer inside WebCore involved in communicating this to the networking code in a platform-independent way. It seems to me that WebKit2 code can directly call setHTTPCookieAcceptPolicyOnAllCookieStorages for the CFNetwork case and we need not introduce this concept for all the other networking layers unless there really is a cross-platform need for this.
Jessie Berlin
Comment 4
2011-03-24 10:32:46 PDT
(In reply to
comment #3
)
> (From update of
attachment 86784
[details]
) > I’m not sure WebCore should be involved so much here. It’s right to have WebKit2 send the cookie acceptance policy from the UI to the Web process, but I’m not sure we need the platform layer inside WebCore involved in communicating this to the networking code in a platform-independent way. > > It seems to me that WebKit2 code can directly call setHTTPCookieAcceptPolicyOnAllCookieStorages for the CFNetwork case and we need not introduce this concept for all the other networking layers unless there really is a cross-platform need for this.
The reason I went with getting and setting the policy in WebCore is that we get the list of hostnames in WebCore that have cookies associated with them and delete cookies associated with specific hostnames in WebCore (necessary for other platforms that still use WebKit1 API). Another minor point is this approach allows for WebCore to keep whether or not Private Browsing is enabled a detail that the WebCookieManager doesn't need to know about. However, I do not have very strong feelings on this and could be persuaded that keeping as much of it as possible in the WebKit2 layer is the best way to go. One question that I am not quite sure about - as other ports adopt WebKit2, won't they need to introduce this concept for their networking layers anyways since they will have to implement this API?
Jessie Berlin
Comment 5
2011-03-24 13:06:14 PDT
Comment on
attachment 86784
[details]
Patch (Part 1) - Getting and setting the policy in WebKit2 I am going to take another pass at this that avoids having to give separate implementations for all of the different platforms when the only implementations that will really be used are the CFNetwork and Mac ones.
Jessie Berlin
Comment 6
2011-03-25 08:37:06 PDT
Created
attachment 86947
[details]
Patch (Part 1) - Getting and setting the policy in WebKit2 (Take 2)
Jessie Berlin
Comment 7
2011-03-25 09:41:57 PDT
Comment on
attachment 86947
[details]
Patch (Part 1) - Getting and setting the policy in WebKit2 (Take 2) Per discussion with Anders on IRC, it would be better to have more of this done entirely in WebKit2 (instead of doing the actual setting and getting in WebCore). I will rework it and send out another patch.
Jessie Berlin
Comment 8
2011-03-25 10:30:09 PDT
Created
attachment 86955
[details]
Patch (Part 1) - Getting and setting the policy in WebKit2 (Take 3)
Jessie Berlin
Comment 9
2011-03-25 12:33:11 PDT
Comment on
attachment 86955
[details]
Patch (Part 1) - Getting and setting the policy in WebKit2 (Take 3) Committed with a Mac build fix in
http://trac.webkit.org/changeset/81980
Jessie Berlin
Comment 10
2011-03-25 13:49:06 PDT
Created
attachment 86978
[details]
Patch (Part 2) - Make it possible to specify the initial policy on Windows
Jessie Berlin
Comment 11
2011-04-14 09:24:13 PDT
Comment on
attachment 86978
[details]
Patch (Part 2) - Make it possible to specify the initial policy on Windows Committed in
http://trac.webkit.org/changeset/81997
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug