Resource Load Statistics: Shortcut classification for redirect to prevalent resource
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jun 2018 20:06:15 +0000 (20:06 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jun 2018 20:06:15 +0000 (20:06 +0000)
commitd887fb5b16bd5d5e5a80b7470db6187100be9668
tree5a0b4dba37061bbf80e0d67419e5aa9a96de766e
parent644351e6ab1b33b61ba056d3f1a6e944a5bc0f4f
Resource Load Statistics: Shortcut classification for redirect to prevalent resource
https://bugs.webkit.org/show_bug.cgi?id=186627
<rdar://problem/41132308>

Reviewed by Brent Fulgham.

Source/WebKit:

This patch shortcuts classification of redirect collusion so that we more seldom
have to rely on the recursive backtrace of the redirect graph. The initial
implementation of Resource Load Statistics actually had this classification method.

* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::markAsPrevalentIfHasRedirectedToPrevalent):
    Iterates through a non-classified resource's data for where it has redirected
    and classifies it as prevalent if has redirected to
(WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
    Now calls WebResourceLoadStatisticsStore::markAsPrevalentIfHasRedirectedToPrevalent()
    before regular classification steps.
* UIProcess/WebResourceLoadStatisticsStore.h:

LayoutTests:

* http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-expected.txt: Added.
* http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent.html: Added.
* http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-expected.txt: Added.
* http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent.html: Added.
* platform/wk2/TestExpectations:
    New tests marked as [ Pass ].

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent.html [new file with mode: 0644]
LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent.html [new file with mode: 0644]
LayoutTests/platform/wk2/TestExpectations
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp
Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h