Bug 232336 - WKAPI does not have any APIs to set cookie path to WKWebsiteDataStoreConfigurationRef
Summary: WKAPI does not have any APIs to set cookie path to WKWebsiteDataStoreConfigur...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Takashi Komori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-26 15:03 PDT by Takashi Komori
Modified: 2021-10-29 00:24 PDT (History)
17 users (show)

See Also:


Attachments
Patch (10.32 KB, patch)
2021-10-26 15:29 PDT, Takashi Komori
no flags Details | Formatted Diff | Diff
Patch (10.36 KB, patch)
2021-10-26 15:42 PDT, Takashi Komori
no flags Details | Formatted Diff | Diff
Patch (10.42 KB, patch)
2021-10-28 18:06 PDT, Takashi Komori
no flags Details | Formatted Diff | Diff
Patch for landing (10.42 KB, patch)
2021-10-28 23:23 PDT, Takashi Komori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Takashi Komori 2021-10-26 15:03:53 PDT
WKAPI doesn't have any APIs for setting cookie DB location to WKWebsiteDataStoreConfigurationRef.
Comment 1 Takashi Komori 2021-10-26 15:29:29 PDT
Created attachment 442537 [details]
Patch
Comment 2 Takashi Komori 2021-10-26 15:42:19 PDT
Created attachment 442538 [details]
Patch
Comment 3 Alex Christensen 2021-10-26 18:31:40 PDT
Comment on attachment 442538 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442538&action=review

This is reasonable but the test needs some love.

> Tools/TestWebKitAPI/PlatformPlayStation.cmake:33
> +        Tests/WebKit/curl/CookieStorageFile.cpp

There's nothing curl-specific about this test.

> Tools/TestWebKitAPI/Tests/WebKit/curl/CookieStorageFile.cpp:76
> +    WKPageConfigurationSetContext(pageConfiguration.get(), context.get());

This doesn't do anything.

> Tools/TestWebKitAPI/Tests/WebKit/curl/CookieStorageFile.cpp:84
> +    loaderClient.base.clientInfo = this;

Instead of using a static bool didFinishLoad, use a local bool didFinishLoad and point clientInfo at it.  Or put m_didFinishLoad in the CookieStorageFile class.
Comment 4 Takashi Komori 2021-10-28 18:06:13 PDT
Created attachment 442770 [details]
Patch
Comment 5 Takashi Komori 2021-10-28 18:11:56 PDT
(In reply to Alex Christensen from comment #3)
> Comment on attachment 442538 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=442538&action=review
> 
> This is reasonable but the test needs some love.
> 
> > Tools/TestWebKitAPI/PlatformPlayStation.cmake:33
> > +        Tests/WebKit/curl/CookieStorageFile.cpp
> 
> There's nothing curl-specific about this test.

Moved the test to Tests/WebKit/ directory.

> > Tools/TestWebKitAPI/Tests/WebKit/curl/CookieStorageFile.cpp:76
> > +    WKPageConfigurationSetContext(pageConfiguration.get(), context.get());
> 
> This doesn't do anything.

On WinCairo port, the WebKit::WebView constructor uses the context which is set by WKPageConfigurationSetContext.
Therefore, it is necessary.

Source/WebKit/UIProcess/win/WebView.cpp

> > Tools/TestWebKitAPI/Tests/WebKit/curl/CookieStorageFile.cpp:84
> > +    loaderClient.base.clientInfo = this;
> 
> Instead of using a static bool didFinishLoad, use a local bool didFinishLoad
> and point clientInfo at it.  Or put m_didFinishLoad in the CookieStorageFile
> class.

Fixed.
Comment 6 Takashi Komori 2021-10-28 23:23:25 PDT
Created attachment 442786 [details]
Patch for landing
Comment 7 EWS 2021-10-29 00:23:12 PDT
Committed r285020 (243664@main): <https://commits.webkit.org/243664@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442786 [details].
Comment 8 Radar WebKit Bug Importer 2021-10-29 00:24:17 PDT
<rdar://problem/84798584>