Speculation rules: fix moderate viewport heuristic range [chromium/src : main]

0 views
Skip to first unread message

Yoav Weiss (@Shopify) (Gerrit)

unread,
Apr 27, 2026, 11:58:55 AM (2 days ago) Apr 27
to Hiroki Nakagawa, Kouhei Ueno, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
Attention needed from Hiroki Nakagawa and Kouhei Ueno

Yoav Weiss (@Shopify) voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Hiroki Nakagawa
  • Kouhei Ueno
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I4dfff0e2778c4e223926afde600c504676886f0c
Gerrit-Change-Number: 7796864
Gerrit-PatchSet: 3
Gerrit-Owner: Yoav Weiss (@Shopify) <yoav...@chromium.org>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Apr 2026 15:58:41 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Barry Pollard (Gerrit)

unread,
Apr 27, 2026, 5:32:30 PM (2 days ago) Apr 27
to Yoav Weiss (@Shopify), Hiroki Nakagawa, Kouhei Ueno, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, adit...@google.com, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
Attention needed from Hiroki Nakagawa, Kouhei Ueno and Yoav Weiss (@Shopify)

Barry Pollard added 1 comment

File third_party/blink/renderer/core/loader/anchor_element_interaction_tracker.cc
Line 55, Patchset 3 (Latest): "distance_from_ptr_down_hi", 0.3};
Barry Pollard . unresolved

I've looked over the (internal only) doc (sorry Yoav!): https://docs.google.com/document/d/1X8_ZnlN5w1NEOTX2gGkZDy5k5xH-MpwW3Jg0Reb-v2Y/edit?tab=t.0

And also spoken to @adit...@google.com who worked on this previously who shared his (also internal-only - sorry again!) Colab: https://colab.corp.google.com/drive/1Wh1Iq3m3Am-l3rZC5Yw5PdMm93jmvinz?resourcekey=0-CXUeV4-JjPFS-Z5cOIrZrA&usp=sharing

Some things to note:
1) The graphs are unevenly balanced. So I don't think it should be -30% to +30%
2) Rerunning the Colab shows the histograms are still available but there are quite coarse and only in 10% buckets. Compared to the doc which shows the same shape of a graph, but with more granularity.
3) Looking at the code (https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/navigation_predictor/navigation_predictor_metrics_document_data.cc?q=SetDistanceFromLastPointerDown&ss=chromium%2Fchromium%2Fsrc&start=21) it rounds down. So the 0 value is actually covering 0% - 9.99%

Given all that, I think it could be argued that we should set this to `0.1` instead based on that data and update the comment and test appropriately.

Alternatively, we could re-enable the histograms (https://source.chromium.org/chromium/chromium/src/+/main:tools/metrics/histograms/metadata/blink/histograms.xml;l=177;drc=538f2d2b040a8dd2c9be8ec3ae8ef44217c052af) to collect more recent data.

Open in Gerrit

Related details

Attention is currently required from:
  • Hiroki Nakagawa
  • Kouhei Ueno
  • Yoav Weiss (@Shopify)
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I4dfff0e2778c4e223926afde600c504676886f0c
    Gerrit-Change-Number: 7796864
    Gerrit-PatchSet: 3
    Gerrit-Owner: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
    Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-CC: Barry Pollard <barryp...@chromium.org>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
    Gerrit-Attention: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Comment-Date: Mon, 27 Apr 2026 21:32:08 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Yoav Weiss (@Shopify) (Gerrit)

    unread,
    Apr 28, 2026, 1:08:38 AM (yesterday) Apr 28
    to Barry Pollard, Hiroki Nakagawa, Kouhei Ueno, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, adit...@google.com, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
    Attention needed from Barry Pollard, Hiroki Nakagawa and Kouhei Ueno

    Yoav Weiss (@Shopify) added 1 comment

    File third_party/blink/renderer/core/loader/anchor_element_interaction_tracker.cc
    Line 55, Patchset 3 (Latest): "distance_from_ptr_down_hi", 0.3};
    Barry Pollard . unresolved

    I've looked over the (internal only) doc (sorry Yoav!): https://docs.google.com/document/d/1X8_ZnlN5w1NEOTX2gGkZDy5k5xH-MpwW3Jg0Reb-v2Y/edit?tab=t.0

    And also spoken to @adit...@google.com who worked on this previously who shared his (also internal-only - sorry again!) Colab: https://colab.corp.google.com/drive/1Wh1Iq3m3Am-l3rZC5Yw5PdMm93jmvinz?resourcekey=0-CXUeV4-JjPFS-Z5cOIrZrA&usp=sharing

    Some things to note:
    1) The graphs are unevenly balanced. So I don't think it should be -30% to +30%
    2) Rerunning the Colab shows the histograms are still available but there are quite coarse and only in 10% buckets. Compared to the doc which shows the same shape of a graph, but with more granularity.
    3) Looking at the code (https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/navigation_predictor/navigation_predictor_metrics_document_data.cc?q=SetDistanceFromLastPointerDown&ss=chromium%2Fchromium%2Fsrc&start=21) it rounds down. So the 0 value is actually covering 0% - 9.99%

    Given all that, I think it could be argued that we should set this to `0.1` instead based on that data and update the comment and test appropriately.

    Alternatively, we could re-enable the histograms (https://source.chromium.org/chromium/chromium/src/+/main:tools/metrics/histograms/metadata/blink/histograms.xml;l=177;drc=538f2d2b040a8dd2c9be8ec3ae8ef44217c052af) to collect more recent data.

    Yoav Weiss (@Shopify)

    Thanks! I was going off of the public docs, which indicate a distance of 30%, regardless of direction. I guess it'd be good to add that nuance there.

    More importantly, at Shopify we're seeing significant gains for moderate on Desktop, but mobile gains are way more modest. So I think it'd be interesting to recollect data on that front (maybe with a split per technology stack), or alternatively to run an OT to experiment with different parameters.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Barry Pollard
    • Hiroki Nakagawa
    • Kouhei Ueno
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I4dfff0e2778c4e223926afde600c504676886f0c
    Gerrit-Change-Number: 7796864
    Gerrit-PatchSet: 3
    Gerrit-Owner: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
    Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-CC: Barry Pollard <barryp...@chromium.org>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Barry Pollard <barryp...@chromium.org>
    Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
    Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Comment-Date: Tue, 28 Apr 2026 05:08:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Barry Pollard <barryp...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages