Bug 209000 - Resource load statistics data summary should return all third party data
Summary: Resource load statistics data summary should return all third party data
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kate Cheney
Keywords: InRadar
Depends on:
Reported: 2020-03-12 09:19 PDT by Kate Cheney
Modified: 2020-03-12 14:23 PDT (History)
4 users (show)

See Also:

Patch (8.96 KB, patch)
2020-03-12 09:24 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch (12.44 KB, patch)
2020-03-12 13:13 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kate Cheney 2020-03-12 09:19:08 PDT
It would be more informative to return all third party data, not just prevalent domains.
Comment 1 Kate Cheney 2020-03-12 09:19:35 PDT
Comment 2 Kate Cheney 2020-03-12 09:24:56 PDT
Created attachment 393383 [details]
Comment 3 John Wilander 2020-03-12 10:33:38 PDT
Comment on attachment 393383 [details]

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

r=me. Please address my comment on the cookie blocking mode.

> Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:844
> +        || sortedStatistics.bindText(1, "%")

I think this should be made conditional on the configured WebCore::ThirdPartyCookieBlockingMode. If == WebCore::ThirdPartyCookieBlockingMode::All, send back all third party data, otherwise keep the old behavior. You already have a thirdPartyCookieBlockingMode() getter in the ResourceLoadStatisticsStore base class. Then your API tests might have to enable WebCore::ThirdPartyCookieBlockingMode::All if they aren't already running under that configuration.

> Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:986
> +    // Set two third parties to be prevalent, leave evil1.com as non-prevalent to ensure

Personally, I'd prefer not to call prevalent domains "evil" since there's nothing inherently evil about them. But I know it's existing code.
Comment 4 Kate Cheney 2020-03-12 13:13:50 PDT
Created attachment 393405 [details]
Comment 5 Kate Cheney 2020-03-12 13:14:26 PDT
(In reply to katherine_cheney from comment #4)
> Created attachment 393405 [details]
> Patch

Thanks John! Made these changes.

Waiting on EWS before cq+
Comment 6 WebKit Commit Bot 2020-03-12 14:22:53 PDT
Comment on attachment 393405 [details]

Clearing flags on attachment: 393405

Committed r258357: <https://trac.webkit.org/changeset/258357>
Comment 7 WebKit Commit Bot 2020-03-12 14:22:55 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2020-03-12 14:23:17 PDT