Changeset 236578 in webkit


Ignore:
Timestamp:
Sep 27, 2018 5:23:37 PM (6 years ago)
Author:
wilander@apple.com
Message:

Resource Load Statistics: Non-redirected top frame navigation should not get captured in statistics
https://bugs.webkit.org/show_bug.cgi?id=190055
<rdar://problem/44843460>

Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html

  • loader/ResourceLoadStatistics.cpp:

(WebCore::ResourceLoadStatistics::decode):

Corrects legacy statistics for frames and triggers a re-classification.

Source/WebKit:

  • UIProcess/ResourceLoadStatisticsMemoryStore.cpp:

Bumped the statisticsModelVersion to 14 to be able to
correct legacy statistics.

(WebKit::ResourceLoadStatisticsMemoryStore::logFrameNavigation):

Now skips capture if it's the main frame.

LayoutTests:

  • http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-expected.txt: Added.
  • http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r236573 r236578  
     12018-09-27  John Wilander  <wilander@apple.com>
     2
     3        Resource Load Statistics: Non-redirected top frame navigation should not get captured in statistics
     4        https://bugs.webkit.org/show_bug.cgi?id=190055
     5        <rdar://problem/44843460>
     6
     7        Reviewed by Chris Dumez.
     8
     9        * http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-expected.txt: Added.
     10        * http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html: Added.
     11
    1122018-09-27  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r236577 r236578  
     12018-09-27  John Wilander  <wilander@apple.com>
     2
     3        Resource Load Statistics: Non-redirected top frame navigation should not get captured in statistics
     4        https://bugs.webkit.org/show_bug.cgi?id=190055
     5        <rdar://problem/44843460>
     6
     7        Reviewed by Chris Dumez.
     8
     9        Test: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html
     10
     11        * loader/ResourceLoadStatistics.cpp:
     12        (WebCore::ResourceLoadStatistics::decode):
     13            Corrects legacy statistics for frames and triggers a re-classification.
     14
    1152018-09-27  Jer Noble  <jer.noble@apple.com>
    216
  • trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp

    r235897 r236578  
    214214
    215215    // Subframe stats
    216     decodeHashCountedSet(decoder, "subframeUnderTopFrameOrigins", subframeUnderTopFrameOrigins);
    217    
     216    if (modelVersion >= 14)
     217        decodeHashCountedSet(decoder, "subframeUnderTopFrameOrigins", subframeUnderTopFrameOrigins);
     218
    218219    // Subresource stats
    219220    decodeHashCountedSet(decoder, "subresourceUnderTopFrameOrigins", subresourceUnderTopFrameOrigins);
     
    229230        if (!decoder.decodeBool("isVeryPrevalentResource", isVeryPrevalentResource))
    230231            return false;
     232    }
     233
     234    // Trigger re-classification based on model 14.
     235    if (modelVersion < 14) {
     236        isPrevalentResource = false;
     237        isVeryPrevalentResource = false;
    231238    }
    232239
  • trunk/Source/WebKit/ChangeLog

    r236571 r236578  
     12018-09-27  John Wilander  <wilander@apple.com>
     2
     3        Resource Load Statistics: Non-redirected top frame navigation should not get captured in statistics
     4        https://bugs.webkit.org/show_bug.cgi?id=190055
     5        <rdar://problem/44843460>
     6
     7        Reviewed by Chris Dumez.
     8
     9        * UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
     10            Bumped the statisticsModelVersion to 14 to be able to
     11            correct legacy statistics.
     12        (WebKit::ResourceLoadStatisticsMemoryStore::logFrameNavigation):
     13            Now skips capture if it's the main frame.
     14
    1152018-09-27  Brent Fulgham  <bfulgham@apple.com>
    216
  • trunk/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp

    r236563 r236578  
    4747using namespace WebCore;
    4848
    49 constexpr unsigned statisticsModelVersion { 13 };
     49constexpr unsigned statisticsModelVersion { 14 };
    5050constexpr unsigned maxNumberOfRecursiveCallsInRedirectTraceBack { 50 };
    5151constexpr Seconds minimumStatisticsProcessingInterval { 5_s };
     
    597597
    598598    bool statisticsWereUpdated = false;
    599     if (targetHost != mainFrameHost && !(areTargetAndMainFrameDomainsAssociated || areTargetAndSourceDomainsAssociated)) {
     599    if (!isMainFrame && targetHost != mainFrameHost && !(areTargetAndMainFrameDomainsAssociated || areTargetAndSourceDomainsAssociated)) {
    600600        auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
    601601        targetStatistics.lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime::now());
Note: See TracChangeset for help on using the changeset viewer.