WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
178316
Implement Cache API support for WPE/GTK
https://bugs.webkit.org/show_bug.cgi?id=178316
Summary
Implement Cache API support for WPE/GTK
youenn fablet
Reported
2017-10-14 16:05:32 PDT
In the meantime, related tests should be skipped.
Attachments
Patch
(5.47 KB, patch)
2017-10-14 16:08 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(5.46 KB, patch)
2017-10-14 16:29 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
fixed cache quota test for wpe
(4.92 KB, patch)
2018-10-29 10:58 PDT
,
darshan
fred.wang
: review-
Details
Formatted Diff
Diff
fixed cache quota test for gkt
(5.11 KB, patch)
2018-11-01 10:42 PDT
,
darshan
no flags
Details
Formatted Diff
Diff
fixed cache quota test for gkt/wpe
(6.68 KB, patch)
2018-11-02 11:14 PDT
,
darshan
fred.wang
: review+
fred.wang
: commit-queue-
Details
Formatted Diff
Diff
fixed cache quota test with all the platform having same storage
(6.72 KB, patch)
2018-11-02 11:53 PDT
,
darshan
fred.wang
: review-
fred.wang
: commit-queue-
Details
Formatted Diff
Diff
fixed cache quota test for gkt/wpe
(7.11 KB, patch)
2018-11-03 07:20 PDT
,
darshan
no flags
Details
Formatted Diff
Diff
fixed cache quota test with all the platform having same storage
(7.19 KB, patch)
2018-11-03 09:38 PDT
,
darshan
no flags
Details
Formatted Diff
Diff
fixed cache quota test with all the platform having same storage
(8.12 KB, patch)
2018-11-03 10:57 PDT
,
darshan
no flags
Details
Formatted Diff
Diff
fixed cache quota test with all the platform having same storage
(9.29 KB, patch)
2018-11-03 11:49 PDT
,
darshan
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews122 for ios-simulator-wk2
(9.72 MB, application/zip)
2018-11-03 13:51 PDT
,
EWS Watchlist
no flags
Details
fixed cache quota test with all the platform having same storage
(9.30 KB, patch)
2018-11-03 23:23 PDT
,
darshan
youennf
: review+
Details
Formatted Diff
Diff
fixed cache quota test with all the platform having same storage-- with c api not removed
(7.21 KB, patch)
2018-11-09 10:01 PST
,
darshan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(9)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2017-10-14 16:08:48 PDT
Created
attachment 323828
[details]
Patch
WebKit Commit Bot
Comment 2
2017-10-14 16:09:55 PDT
Comment on
attachment 323828
[details]
Patch Rejecting
attachment 323828
[details]
from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 323828, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in LayoutTests/ChangeLog contains OOPS!. Full output:
http://webkit-queues.webkit.org/results/4858971
youenn fablet
Comment 3
2017-10-14 16:29:25 PDT
Created
attachment 323833
[details]
Patch
WebKit Commit Bot
Comment 4
2017-10-14 16:57:23 PDT
Comment on
attachment 323833
[details]
Patch Clearing flags on attachment: 323833 Committed
r223325
: <
https://trac.webkit.org/changeset/223325
>
WebKit Commit Bot
Comment 5
2017-10-14 16:57:24 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6
2017-10-14 16:58:28 PDT
<
rdar://problem/34995899
>
Michael Catanzaro
Comment 7
2017-10-14 17:05:06 PDT
Reopening
Frédéric Wang (:fredw)
Comment 8
2018-10-02 09:01:26 PDT
The remaining failure is http/wpt/cache-storage/cache-quota.any.html
Frédéric Wang (:fredw)
Comment 9
2018-10-07 23:47:07 PDT
(In reply to Frédéric Wang (:fredw) from
comment #8
)
> The remaining failure is http/wpt/cache-storage/cache-quota.any.html
@Youenn: Can you please write down details regarding what we discussed during the hackfest about how this is supposed to be fixed (reducing max cache size for test runner)?
youenn fablet
Comment 10
2018-10-08 08:43:03 PDT
(In reply to Frédéric Wang (:fredw) from
comment #9
)
> (In reply to Frédéric Wang (:fredw) from
comment #8
) > > The remaining failure is http/wpt/cache-storage/cache-quota.any.html > > @Youenn: Can you please write down details regarding what we discussed > during the hackfest about how this is supposed to be fixed (reducing max > cache size for test runner)?
Quota in WebKitTestRunner is set to 400 * 1024 in TestControllerCocoa.mm. GTK WTR should be set up the same.
Frédéric Wang (:fredw)
Comment 11
2018-10-25 12:14:05 PDT
***
Bug 190912
has been marked as a duplicate of this bug. ***
darshan
Comment 12
2018-10-29 10:58:42 PDT
Created
attachment 353300
[details]
fixed cache quota test for wpe
Frédéric Wang (:fredw)
Comment 13
2018-10-29 11:12:51 PDT
Comment on
attachment 353300
[details]
fixed cache quota test for wpe View in context:
https://bugs.webkit.org/attachment.cgi?id=353300&action=review
> LayoutTests/ChangeLog:3 > + Implement Cache API support for WPE/GTK
Can you please unskip the test on WPE too?
> LayoutTests/platform/gtk/TestExpectations:1143 > +
webkit.org/b/178316
http/wpt/cache-storage/cache-quota.any.html [ Pass ]
Please update your tree. In the latest revision, only http/wpt/cache-storage/cache-quota.any.html is marked as failing and you need to remove this expectation.
Frédéric Wang (:fredw)
Comment 14
2018-10-29 11:21:41 PDT
Comment on
attachment 353300
[details]
fixed cache quota test for wpe View in context:
https://bugs.webkit.org/attachment.cgi?id=353300&action=review
> Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp:117 > + WKWebsiteDataStoreSetCacheStoragePerOriginQuota(websiteDataStore, 400 * 1024);
We want the same on WPE too. I'm willing to see what the result of EWS is. if that works, we can try to move everything to the main TestController class as Michael suggested on another bug.
darshan
Comment 15
2018-11-01 10:42:01 PDT
Created
attachment 353616
[details]
fixed cache quota test for gkt
darshan
Comment 16
2018-11-02 11:14:04 PDT
Created
attachment 353717
[details]
fixed cache quota test for gkt/wpe Implemented the cache quota limit for wpt/gtk
darshan
Comment 17
2018-11-02 11:53:13 PDT
Created
attachment 353720
[details]
fixed cache quota test with all the platform having same storage
Frédéric Wang (:fredw)
Comment 18
2018-11-03 04:34:42 PDT
Comment on
attachment 353720
[details]
fixed cache quota test with all the platform having same storage View in context:
https://bugs.webkit.org/attachment.cgi?id=353720&action=review
> LayoutTests/ChangeLog:10 > +
The three ChangeLogs should be updated and completed with explanations in the final patch.
> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h:116 > +WK_EXPORT void WKWebsiteDataStoreSetCacheStoragePerOriginQuota(WKWebsiteDataStoreRef dataStoreRef, uint64_t quota);
It seems this new line was on purpose (to separate ServiceWorkerRegistrationDirectory) so you should not remove it
> Tools/WebKitTestRunner/TestController.cpp:479 > + initializeCacheStoragePerOriginQuota();
I think you can just call WKWebsiteDataStoreSetCacheStoragePerOriginQuota here and remove Cocoa-specific stuff.
> Tools/WebKitTestRunner/TestController.cpp:527 > +{
I don't think you need this function if it's only called in TestController::generatePageConfiguration()
Frédéric Wang (:fredw)
Comment 19
2018-11-03 04:39:38 PDT
Comment on
attachment 353717
[details]
fixed cache quota test for gkt/wpe View in context:
https://bugs.webkit.org/attachment.cgi?id=353717&action=review
OK, this patch looks good to me. Great that the tests are passing on WPE/GTK now! I'm marked r+ but I see you already started to do the refactoring suggested by Michael, so let's just finish that refactoring in this bug then. It is probably not be hard enough to justify a follow-up bug.
> LayoutTests/ChangeLog:10 > +
As I said for the other patch, you should give details of the changes in the ChangeLog.
> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h:-116 > -
As I said for the other patch, you probably don't want to remove that new line.
Michael Catanzaro
Comment 20
2018-11-03 07:08:19 PDT
Comment on
attachment 353720
[details]
fixed cache quota test with all the platform having same storage View in context:
https://bugs.webkit.org/attachment.cgi?id=353720&action=review
> Tools/WebKitTestRunner/TestController.cpp:529 > + WKWebsiteDataStoreSetCacheStoragePerOriginQuota(websiteDataStore, 400 * 1024);
Yes, the Cocoa call really needs to be removed from TestControllerCocoa.cpp, because it's redundant with this call. Doesn't make sense to do the same thing twice. And then remove the Cocoa SPI, since you'd be removing its only use. And then this will be good IMO!
darshan
Comment 21
2018-11-03 07:20:50 PDT
Created
attachment 353771
[details]
fixed cache quota test for gkt/wpe
darshan
Comment 22
2018-11-03 09:38:46 PDT
Created
attachment 353775
[details]
fixed cache quota test with all the platform having same storage
Frédéric Wang (:fredw)
Comment 23
2018-11-03 10:19:30 PDT
Comment on
attachment 353771
[details]
fixed cache quota test for gkt/wpe Let's focus on the platform independent way, now that you already started it, okay?
Frédéric Wang (:fredw)
Comment 24
2018-11-03 10:22:41 PDT
Comment on
attachment 353775
[details]
fixed cache quota test with all the platform having same storage View in context:
https://bugs.webkit.org/attachment.cgi?id=353775&action=review
> Source/WebKit/ChangeLog:8 > + Added a new API function WKWebsiteDataStoreSetCacheStoragePerOriginQuota which set the
sets
> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h:116 > +WK_EXPORT void WKWebsiteDataStoreSetCacheStoragePerOriginQuota(WKWebsiteDataStoreRef dataStoreRef, uint64_t quota);
nit: you should probably still add a new line to separate WKWebsiteDataStoreSetCacheStoragePerOriginQuota from the ServiceWorker API functions.
> Tools/ChangeLog:8 > + Called WKWebsiteDataStoreSetCacheStoragePerOriginQuota funtion to set the cache limit to 400 * 1200
s/funtion/function/
> Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm:-72 > - [poolWebsiteDataStore _setCacheStoragePerOriginQuota: 400 * 1024];
As Michael mentioned in
comment 20
, you can now probably remove the _setCacheStoragePerOriginQuota function and all the related logic.
darshan
Comment 25
2018-11-03 10:57:23 PDT
Created
attachment 353778
[details]
fixed cache quota test with all the platform having same storage
Frédéric Wang (:fredw)
Comment 26
2018-11-03 11:20:57 PDT
Comment on
attachment 353778
[details]
fixed cache quota test with all the platform having same storage View in context:
https://bugs.webkit.org/attachment.cgi?id=353778&action=review
> Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:-271 > -
I believe it should be removed from Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h too.
darshan
Comment 27
2018-11-03 11:49:13 PDT
Created
attachment 353779
[details]
fixed cache quota test with all the platform having same storage
EWS Watchlist
Comment 28
2018-11-03 13:51:38 PDT
Comment on
attachment 353779
[details]
fixed cache quota test with all the platform having same storage
Attachment 353779
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
https://webkit-queues.webkit.org/results/9847208
New failing tests: imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-tracks.https.html
EWS Watchlist
Comment 29
2018-11-03 13:51:40 PDT
Created
attachment 353782
[details]
Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Frédéric Wang (:fredw)
Comment 30
2018-11-03 15:19:15 PDT
Comment on
attachment 353779
[details]
fixed cache quota test with all the platform having same storage Thanks, this looks good to me now! The test failure seemed unrelated. @Youenn: Can you please review this? (as this patch removes the _setCacheStoragePerOriginQuota function from WKWebsiteDataStorePrivate.h)
Michael Catanzaro
Comment 31
2018-11-03 17:44:09 PDT
Comment on
attachment 353779
[details]
fixed cache quota test with all the platform having same storage View in context:
https://bugs.webkit.org/attachment.cgi?id=353779&action=review
I agree this version is much better. LGTM now.
> Tools/WebKitTestRunner/TestController.cpp:481 > + WKWebsiteDataStoreSetCacheStoragePerOriginQuota(websiteDataStore, 400 * 1024); > platformInitializeContext();
Leave a blank line there, because this code is not closely-related to the call to platformInitializeContext().
darshan
Comment 32
2018-11-03 23:23:41 PDT
Created
attachment 353797
[details]
fixed cache quota test with all the platform having same storage
darshan
Comment 33
2018-11-03 23:24:29 PDT
> Leave a blank line there, because this code is not closely-related to the > call to platformInitializeContext().
Donee
Frédéric Wang (:fredw)
Comment 34
2018-11-04 05:09:33 PST
@dkadu: You should not close this bug before the fix actually lands.
youenn fablet
Comment 35
2018-11-04 20:00:49 PST
Comment on
attachment 353797
[details]
fixed cache quota test with all the platform having same storage View in context:
https://bugs.webkit.org/attachment.cgi?id=353797&action=review
> Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:-51 > -@property (nonatomic, setter=_setCacheStoragePerOriginQuota:) NSUInteger _cacheStoragePerOriginQuota WK_API_AVAILABLE(macosx(10.13.4), ios(11.3));
I do not think we should remove the ObjC API. When adding a C API, we want to have a corresponding ObjC API as well. Other parts of the patch looks ok.
Frédéric Wang (:fredw)
Comment 36
2018-11-05 04:52:59 PST
(In reply to youenn fablet from
comment #35
)
> Comment on
attachment 353797
[details]
> fixed cache quota test with all the platform having same storage > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=353797&action=review
> > > Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:-51 > > -@property (nonatomic, setter=_setCacheStoragePerOriginQuota:) NSUInteger _cacheStoragePerOriginQuota WK_API_AVAILABLE(macosx(10.13.4), ios(11.3)); > > I do not think we should remove the ObjC API. > When adding a C API, we want to have a corresponding ObjC API as well. > Other parts of the patch looks ok.
OK, thanks! @Darshan: Can you please do this final change? I think the patch is ready to land after that!
Michael Catanzaro
Comment 37
2018-11-05 08:21:26 PST
(In reply to youenn fablet from
comment #35
)
> I do not think we should remove the ObjC API. > When adding a C API, we want to have a corresponding ObjC API as well. > Other parts of the patch looks ok.
Removing the ObjC API is what I've done in the past. What's the point of having an internal API that is no longer used anywhere?
Michael Catanzaro
Comment 38
2018-11-07 12:26:09 PST
Youenn, what do you think?
youenn fablet
Comment 39
2018-11-07 16:48:28 PST
(In reply to Michael Catanzaro from
comment #37
)
> (In reply to youenn fablet from
comment #35
) > > I do not think we should remove the ObjC API. > > When adding a C API, we want to have a corresponding ObjC API as well. > > Other parts of the patch looks ok. > > Removing the ObjC API is what I've done in the past. What's the point of > having an internal API that is no longer used anywhere?
These APIs can be used not only by WebKitTestRunner but by other apps as well for which ObjC is the preferred approach. There is of course a tension between keeping parity between the two and having APIs that do not get tested. An API test for the ObjC API might be good (not in this patch though).
youenn fablet
Comment 40
2018-11-07 16:49:50 PST
Comment on
attachment 353797
[details]
fixed cache quota test with all the platform having same storage Please do not remove the ObjC API.
Michael Catanzaro
Comment 41
2018-11-07 17:00:54 PST
(In reply to youenn fablet from
comment #39
)
> These APIs can be used not only by WebKitTestRunner but by other apps as > well for which ObjC is the preferred approach.
But it's in the Private.h header, so it shouldn't be accessible outside WebKit?
Michael Catanzaro
Comment 42
2018-11-07 17:01:30 PST
I mean, it's in WKWebsiteDataStorePrivate.h. Surely it should move to a public header if it's intended to be public?
youenn fablet
Comment 43
2018-11-07 17:24:46 PST
(In reply to Michael Catanzaro from
comment #42
)
> I mean, it's in WKWebsiteDataStorePrivate.h. Surely it should move to a > public header if it's intended to be public?
Indeed, it might move to public at some point.
darshan
Comment 44
2018-11-09 10:01:21 PST
Created
attachment 354355
[details]
fixed cache quota test with all the platform having same storage-- with c api not removed
Wenson Hsieh
Comment 45
2018-11-11 15:21:01 PST
(In reply to Michael Catanzaro from
comment #41
)
> (In reply to youenn fablet from
comment #39
) > > These APIs can be used not only by WebKitTestRunner but by other apps as > > well for which ObjC is the preferred approach. > > But it's in the Private.h header, so it shouldn't be accessible outside > WebKit?
FYI — WebKit headers that are marked private still appear in the Apple internal SDK, and as such, are generally accessible to Apple-internal clients such as Mail and Safari.
WebKit Commit Bot
Comment 46
2018-11-12 23:41:37 PST
Comment on
attachment 354355
[details]
fixed cache quota test with all the platform having same storage-- with c api not removed Clearing flags on attachment: 354355 Committed
r238125
: <
https://trac.webkit.org/changeset/238125
>
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