Commit b77b4169 authored by Ryan Sturm's avatar Ryan Sturm Committed by Commit Bot

Report up to 100 links from the renderer to the browser

NavigationPredictor currently only recieves the first 40 links from the
renderer. Instead, we should report the first 100. In pages that have a
large number of small navigational links at the top, we may not see the
main content links in NavigationPredictor.

Bug: 1001593
Change-Id: I074bb70fb5cca14799a875b74c15ebdbdfe69a1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1797137
Auto-Submit: Ryan Sturm <ryansturm@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697035}
parent a841bb48
...@@ -95,7 +95,7 @@ struct NavigationPredictor::NavigationScore { ...@@ -95,7 +95,7 @@ struct NavigationPredictor::NavigationScore {
const bool is_url_incremented_by_one; const bool is_url_incremented_by_one;
// Rank in terms of anchor element area. It starts at 0, a lower rank implies // Rank in terms of anchor element area. It starts at 0, a lower rank implies
// a larger area. Capped at 40. // a larger area. Capped at 100.
const size_t area_rank; const size_t area_rank;
// Calculated navigation score, based on |area_rank| and other metrics. // Calculated navigation score, based on |area_rank| and other metrics.
......
...@@ -302,9 +302,9 @@ void AnchorElementMetrics::MaybeReportViewportMetricsOnLoad( ...@@ -302,9 +302,9 @@ void AnchorElementMetrics::MaybeReportViewportMetricsOnLoad(
anchor_elements_metrics.push_back(anchor_metric.value().CreateMetricsPtr()); anchor_elements_metrics.push_back(anchor_metric.value().CreateMetricsPtr());
// Webpages with more than 40 anchors will stop processing at the 40th // Webpages with more than 100 anchors will stop processing at the 100th
// anchor element. // anchor element.
if (anchor_elements_metrics.size() >= 40) if (anchor_elements_metrics.size() >= 100)
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment