Bug 182698

Summary: Add C SPI for support of Website Data Store in Website Policies
Product: WebKit Reporter: Maureen Daum <mdaum>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, aestes, commit-queue, ews-watchlist, mdaum, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
patch (with alphabetical sorting issue addressed)
none
patch (referring to "C API" instead of "Legacy WebKit")
aestes: review+, aestes: commit-queue-
patch none

Description Maureen Daum 2018-02-12 09:48:48 PST
Add SPI for Website Data Store in Website Policies for legacy WebKit.
Comment 1 Maureen Daum 2018-02-12 09:49:49 PST
<rdar://problem/37412008>
Comment 2 Maureen Daum 2018-02-12 10:04:45 PST
Created attachment 333602 [details]
patch
Comment 3 EWS Watchlist 2018-02-12 10:06:24 PST
Attachment 333602 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/API/C/WKWebsitePolicies.cpp:31:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Maureen Daum 2018-02-12 10:18:22 PST
Created attachment 333604 [details]
patch (with alphabetical sorting issue addressed)
Comment 5 Sam Weinig 2018-02-12 12:41:57 PST
From the patch, it looks like you mean "the C-SPI". Legacy WebKit is what we refer to the original "WebKit 1" framework and API as.
Comment 6 Maureen Daum 2018-02-12 12:56:59 PST
You're correct that I should be referring to "the C-SPI". Thanks for explaining what "Legacy WebKit" refers to!
Comment 7 Maureen Daum 2018-02-12 13:06:07 PST
Created attachment 333623 [details]
patch (referring to "C API" instead of "Legacy WebKit")
Comment 8 Andy Estes 2018-02-13 14:29:04 PST
Comment on attachment 333623 [details]
patch (referring to "C API" instead of "Legacy WebKit")

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

> Source/WebKit/UIProcess/API/C/WKFramePolicyListener.cpp:54
> +        RELEASE_ASSERT_WITH_MESSAGE(sessionID.isEphemeral() || sessionID == PAL::SessionID::defaultSessionID(), "WebsiteDataStore must be nil, default, or non-persistent.");

The wording here isn't quite right, since "default" and "non-persistent" apply to the data store's session, not the data store itself. Also, "nil" isn't the right term in C.

> Source/WebKit/UIProcess/API/C/WKFramePolicyListener.cpp:55
> +        RELEASE_ASSERT_WITH_MESSAGE(toImpl(policyListenerRef)->isMainFrame(), "WebsiteDataStore must be nil for subframe navigations.");

Same comment about "nil".

> Source/WebKit/UIProcess/WebFrameListenerProxy.h:50
> +    bool isMainFrame();

This should be const-qualified.
Comment 9 Maureen Daum 2018-02-13 17:31:30 PST
Comment on attachment 333623 [details]
patch (referring to "C API" instead of "Legacy WebKit")

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

>> Source/WebKit/UIProcess/API/C/WKFramePolicyListener.cpp:54
>> +        RELEASE_ASSERT_WITH_MESSAGE(sessionID.isEphemeral() || sessionID == PAL::SessionID::defaultSessionID(), "WebsiteDataStore must be nil, default, or non-persistent.");
> 
> The wording here isn't quite right, since "default" and "non-persistent" apply to the data store's session, not the data store itself. Also, "nil" isn't the right term in C.

Changed to "If WebsitePolicies specifies a WebsiteDataStore, the data store's session must be default or non-persistent."

>> Source/WebKit/UIProcess/API/C/WKFramePolicyListener.cpp:55
>> +        RELEASE_ASSERT_WITH_MESSAGE(toImpl(policyListenerRef)->isMainFrame(), "WebsiteDataStore must be nil for subframe navigations.");
> 
> Same comment about "nil".

Changed to "WebsitePolicies cannot specify a WebsiteDataStore for subframe navigations."

>> Source/WebKit/UIProcess/WebFrameListenerProxy.h:50
>> +    bool isMainFrame();
> 
> This should be const-qualified.

Done.
Comment 10 Maureen Daum 2018-02-13 17:39:07 PST
Created attachment 333754 [details]
patch
Comment 11 WebKit Commit Bot 2018-02-14 10:52:20 PST
Comment on attachment 333754 [details]
patch

Clearing flags on attachment: 333754

Committed r228472: <https://trac.webkit.org/changeset/228472>
Comment 12 WebKit Commit Bot 2018-02-14 10:52:22 PST
All reviewed patches have been landed.  Closing bug.