Title: [219323] trunk
- Revision
- 219323
- Author
- [email protected]
- Date
- 2017-07-10 21:08:20 -0700 (Mon, 10 Jul 2017)
Log Message
Resource Load Statistics: Prune statistics in orders of importance
https://bugs.webkit.org/show_bug.cgi?id=174215
<rdar://problem/33164403>
Unreviewed test correction.
Source/WebKit2:
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::pruneResources): The revised algorithm did not update the remaining
count to be pruned, causing a test failure.
LayoutTests:
Drive-by fix after recent refactoring to correct the new function names in TestRunner.
* http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html:
* http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (219322 => 219323)
--- trunk/LayoutTests/ChangeLog 2017-07-11 03:46:16 UTC (rev 219322)
+++ trunk/LayoutTests/ChangeLog 2017-07-11 04:08:20 UTC (rev 219323)
@@ -1,3 +1,16 @@
+2017-07-10 Brent Fulgham <[email protected]>
+
+ Resource Load Statistics: Prune statistics in orders of importance
+ https://bugs.webkit.org/show_bug.cgi?id=174215
+ <rdar://problem/33164403>
+
+ Unreviewed test correction.
+
+ Drive-by fix after recent refactoring to correct the new function names in TestRunner.
+
+ * http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html:
+ * http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html:
+
2017-07-10 Simon Fraser <[email protected]>
[WK2 iOS] REGRESSION (r216803) During momentum scroll, getBoundingClientRect returns wrong coordinates (missing images on pinterest, elle.com and many other sites)
Modified: trunk/LayoutTests/http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html (219322 => 219323)
--- trunk/LayoutTests/http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html 2017-07-11 03:46:16 UTC (rev 219322)
+++ trunk/LayoutTests/http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html 2017-07-11 04:08:20 UTC (rev 219323)
@@ -93,7 +93,7 @@
testRunner.setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(false);
testRunner.setStatisticsMinimumTimeBetweenDataRecordsRemoval(0);
- testRunner.statisticsUpdateCookiePartitioningForOneDomain("localhost", true);
+ testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", true);
testRunner.setStatisticsPrevalentResource("http://localhost", true);
if (!testRunner.isStatisticsPrevalentResource("http://localhost"))
testFailed("Host did not get set as prevalent resource.");
Modified: trunk/LayoutTests/http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html (219322 => 219323)
--- trunk/LayoutTests/http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html 2017-07-11 03:46:16 UTC (rev 219322)
+++ trunk/LayoutTests/http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html 2017-07-11 04:08:20 UTC (rev 219323)
@@ -73,7 +73,7 @@
if (document.location.host === partitionHost && document.location.hash == "" && window.testRunner && window.internals) {
setEnableFeature(true);
- testRunner.statisticsUpdateCookiePartitioningForOneDomain("localhost", true);
+ testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", true);
testRunner.waitUntilDone();
testRunner.dumpChildFramesAsText();
Modified: trunk/Source/WebKit2/ChangeLog (219322 => 219323)
--- trunk/Source/WebKit2/ChangeLog 2017-07-11 03:46:16 UTC (rev 219322)
+++ trunk/Source/WebKit2/ChangeLog 2017-07-11 04:08:20 UTC (rev 219323)
@@ -1,3 +1,15 @@
+2017-07-10 Brent Fulgham <[email protected]>
+
+ Resource Load Statistics: Prune statistics in orders of importance
+ https://bugs.webkit.org/show_bug.cgi?id=174215
+ <rdar://problem/33164403>
+
+ Unreviewed test correction.
+
+ * UIProcess/WebResourceLoadStatisticsStore.cpp:
+ (WebKit::pruneResources): The revised algorithm did not update the remaining
+ count to be pruned, causing a test failure.
+
2017-07-10 John Wilander <[email protected]>
Resource Load Statistics: Prune statistics in orders of importance
Modified: trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp (219322 => 219323)
--- trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-07-11 03:46:16 UTC (rev 219322)
+++ trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-07-11 04:08:20 UTC (rev 219323)
@@ -940,9 +940,14 @@
return a.lastSeen < b.lastSeen;
});
}
-
- for (size_t i = 0, end = std::min(numberOfEntriesToPrune, statisticsToPrune.size()); i != end; ++i)
+
+ unsigned removed = 0;
+ for (size_t i = 0, end = std::min(numberOfEntriesToPrune, statisticsToPrune.size()); i != end; ++i) {
statisticsMap.remove(statisticsToPrune[i].topPrivatelyOwnedDomain);
+ ++removed;
+ }
+
+ numberOfEntriesToPrune -= removed;
}
static unsigned computeImportance(const ResourceLoadStatistics& resourceStatistic)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes