Bug 143805 - Make WKWebsiteDataStore public
Summary: Make WKWebsiteDataStore public
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-15 15:39 PDT by Anders Carlsson
Modified: 2015-04-15 17:46 PDT (History)
2 users (show)

See Also:


Attachments
Patch (36.34 KB, patch)
2015-04-15 15:41 PDT, Anders Carlsson
no flags Details | Formatted Diff | Diff
Patch (36.92 KB, patch)
2015-04-15 16:57 PDT, Anders Carlsson
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2015-04-15 15:39:12 PDT
Make WKWebsiteDataStore public
Comment 1 Anders Carlsson 2015-04-15 15:41:14 PDT
Created attachment 250877 [details]
Patch
Comment 2 WebKit Commit Bot 2015-04-15 15:43:37 PDT
Attachment 250877 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:210:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 mitz 2015-04-15 15:57:22 PDT
Comment on attachment 250877 [details]
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:294
> +    webPageConfiguration.websiteDataStore = &((WKWebsiteDataStore *)[_configuration _websiteDataStore])->_websiteDataStore->websiteDataStore();

Do we need this already?

> Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.h:31
> +

Need WK_ASSUME_NONNULL_BEGIN/END around the rest of this header.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.h:36
> ++ (instancetype)defaultDataStore;

The return type here should be WKWebsiteDataStore *, not instancetype.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:32
> +#import "WKNSArray.h"

Doesn’t this one import APIArray.h?

> Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:37
> ++ (instancetype)defaultDataStore

Fix the return type.
Comment 4 Anders Carlsson 2015-04-15 16:57:46 PDT
Created attachment 250882 [details]
Patch
Comment 5 WebKit Commit Bot 2015-04-15 16:59:33 PDT
Attachment 250882 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:210:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 mitz 2015-04-15 17:08:20 PDT
Comment on attachment 250882 [details]
Patch

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

Something is off with the whitespace but I can’t quite put my finger on it.

> Source/WebKit2/ChangeLog:9
> +        @interface and @implementation that just derives from WKWebsiteDataStore.

There’s a little more to _WKWebsiteDataStore in this version of the patch.

> Source/WebKit2/ChangeLog:18
> +        * UIProcess/API/Cocoa/WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.

You should mention the other changes: stricter return types and unavailability of -init.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:294
> +    webPageConfiguration.websiteDataStore = &((WKWebsiteDataStore *)[_configuration _websiteDataStore])->_websiteDataStore->websiteDataStore();

This remains a mystery to me.

> Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:27
> +#include "config.h"
> +#include "_WKWebsiteDataStore.h"

#import
Comment 7 Anders Carlsson 2015-04-15 17:46:24 PDT
Committed r182873: <http://trac.webkit.org/changeset/182873>