Bug 180679

Summary: Storage Access API: Implement frame-specific access in the network storage session layer
Product: WebKit Reporter: John Wilander <wilander>
Component: WebKit2Assignee: John Wilander <wilander>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, annulen, cdumez, commit-queue, dbates, esprehn+autocc, ews-watchlist, kangil.han, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description John Wilander 2017-12-11 16:34:58 PST
This is part 1 of making Storage Access API frame-specific.
Comment 1 Radar WebKit Bug Importer 2017-12-11 16:35:47 PST
<rdar://problem/35982116>
Comment 2 John Wilander 2017-12-11 18:49:13 PST
Created attachment 329076 [details]
Patch
Comment 3 John Wilander 2017-12-11 18:50:44 PST
Style errors are of the "Extra space before ( in function call" variety.
Comment 4 EWS Watchlist 2017-12-11 18:51:26 PST
Attachment 329076 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h:85:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:1414:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp:271:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:353:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/ChromeClient.h:471:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/WebProcess/WebPage/WebPage.cpp:5824:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h:148:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/WebProcess/WebPage/WebPage.h:1028:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:1264:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 9 in 35 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Alex Christensen 2017-12-12 16:08:34 PST
Comment on attachment 329076 [details]
Patch

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

> Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp:288
> +    WTFLogAlways("ResourceLoadLog | NetworkStorageSession::isStorageAccessGranted(), resourceDomain: %s, firstPartyDomain: %s, frameID: %llu, pageID: %llu.", resourceDomain.utf8().data(), firstPartyDomain.utf8().data(), frameID, pageID);

Let's not add a WTFLogAlways here.

> Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp:302
> +    WTFLogAlways("ResourceLoadLog | NetworkStorageSession::setStorageAccessGranted(), resourceDomain: %s, firstPartyDomain: %s, frameID: %llu, pageID: %llu.", resourceDomain.utf8().data(), firstPartyDomain.utf8().data(), frameID, pageID);

Also remove this log.

> Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:413
> +    // Dummy

Remove.

> LayoutTests/http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-and-try-access-from-right-frame-expected.txt:19
> +Client-side document.cookie: partitionedCookie=value

Once CookieJarMac is updated, this result will change.
Comment 6 John Wilander 2017-12-12 16:48:15 PST
Created attachment 329179 [details]
Patch for landing
Comment 7 John Wilander 2017-12-12 16:49:22 PST
Fixed the stray log calls and the dummy comment. Thanks, Alex!
Comment 8 WebKit Commit Bot 2017-12-12 17:20:12 PST
Comment on attachment 329179 [details]
Patch for landing

Clearing flags on attachment: 329179

Committed r225827: <https://trac.webkit.org/changeset/225827>
Comment 9 WebKit Commit Bot 2017-12-12 17:20:13 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Konstantin Tokarev 2017-12-14 04:11:29 PST
Could you consider renaming test files to make their names more concise? Linux users with eCryptfs cannot work with file names longer than 143 characters. Also, such long names may create troubles on Windows, where total path length is limited by 260 characters or so