Enable Speculation Rules mobile viewport heuristics in DevTools mobile emulation [chromium/src : main]

0 views
Skip to first unread message

Takashi Toyoshima (Gerrit)

unread,
May 12, 2026, 3:38:00 AMMay 12
to Helmut Januschka, Hiroki Nakagawa, Barry Pollard, Nate Chapin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, prerendering-reviews, Chromium LUCI CQ, devtools-re...@chromium.org, loading...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavin...@chromium.org, kinuko...@chromium.org, tburkar...@chromium.org
Attention needed from Helmut Januschka and Hiroki Nakagawa

Takashi Toyoshima added 1 comment

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Takashi Toyoshima . unresolved

+nhiroki for speculationrules related changes in blink

Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
  • Hiroki Nakagawa
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Ib15101432ccd2dafe324b0e5eccf302b77b4c00d
Gerrit-Change-Number: 7800216
Gerrit-PatchSet: 7
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Barry Pollard <barryp...@chromium.org>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Comment-Date: Tue, 12 May 2026 07:37:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Hiroki Nakagawa (Gerrit)

unread,
May 12, 2026, 6:33:51 AMMay 12
to Helmut Januschka, Takashi Nakayama, Takashi Toyoshima, Barry Pollard, Nate Chapin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, prerendering-reviews, Chromium LUCI CQ, devtools-re...@chromium.org, loading...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavin...@chromium.org, kinuko...@chromium.org, tburkar...@chromium.org
Attention needed from Helmut Januschka and Takashi Nakayama

Hiroki Nakagawa added 1 comment

Patchset-level comments
Hiroki Nakagawa . resolved

tnak@: Can you review this CL? Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
  • Takashi Nakayama
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Ib15101432ccd2dafe324b0e5eccf302b77b4c00d
Gerrit-Change-Number: 7800216
Gerrit-PatchSet: 7
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Barry Pollard <barryp...@chromium.org>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
Gerrit-Comment-Date: Tue, 12 May 2026 10:33:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Takashi Nakayama (Gerrit)

unread,
May 13, 2026, 4:13:12 AMMay 13
to Helmut Januschka, Hiroki Nakagawa, Takashi Toyoshima, Barry Pollard, Nate Chapin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, prerendering-reviews, Chromium LUCI CQ, devtools-re...@chromium.org, loading...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavin...@chromium.org, kinuko...@chromium.org, tburkar...@chromium.org
Attention needed from Helmut Januschka

Takashi Nakayama added 3 comments

Patchset-level comments
Takashi Nakayama . unresolved

It seems that this CL changes how `Preloading{Eager/Moderate}ViewportHeuristics` feature flags are handled. At the same time, this CL lacks a feature flag for the kill switch. How about enabling `Preloading{Eager/Moderate}ViewportHeuristics` by default for DESKTOP and adding new feature params like boolean `only_for_devtools_emulation` to the features, which is `true` by default? I think we can minimize the changes of the semantics of the existing feature flags in that way.

File third_party/blink/renderer/core/html/anchor_element_metrics_sender.h
Line 123, Patchset 7 (Latest): int EffectiveSamplingPeriod() const;
Takashi Nakayama . unresolved

nit: Could you make this a private method?

File third_party/blink/renderer/core/loader/anchor_element_interaction_tracker.cc
Line 319, Patchset 7 (Latest): AnchorElementMetricsSender::GetForFrame(GetDocument()->GetFrame());
Takashi Nakayama . unresolved

This seems like an incomplete code.

Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
Gerrit-Comment-Date: Wed, 13 May 2026 08:12:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Helmut Januschka (Gerrit)

unread,
May 15, 2026, 9:20:05 AMMay 15
to Helmut Januschka, Takashi Nakayama, Hiroki Nakagawa, Takashi Toyoshima, Barry Pollard, Nate Chapin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, prerendering-reviews, Chromium LUCI CQ, blink-re...@chromium.org, devtools-re...@chromium.org, loading...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavin...@chromium.org, kinuko...@chromium.org, tburkar...@chromium.org
Attention needed from Takashi Nakayama

Helmut Januschka added 3 comments

Patchset-level comments
Takashi Nakayama . unresolved

It seems that this CL changes how `Preloading{Eager/Moderate}ViewportHeuristics` feature flags are handled. At the same time, this CL lacks a feature flag for the kill switch. How about enabling `Preloading{Eager/Moderate}ViewportHeuristics` by default for DESKTOP and adding new feature params like boolean `only_for_devtools_emulation` to the features, which is `true` by default? I think we can minimize the changes of the semantics of the existing feature flags in that way.

Helmut Januschka

changed the feature setup to keep the existing viewport heuristic features as the kill switch, enabled them by default on desktop, and added `only_for_devtools_emulation` params that default to true on desktop.

File third_party/blink/renderer/core/html/anchor_element_metrics_sender.h
Line 123, Patchset 7: int EffectiveSamplingPeriod() const;
Takashi Nakayama . resolved

nit: Could you make this a private method?

Helmut Januschka

Done

File third_party/blink/renderer/core/loader/anchor_element_interaction_tracker.cc
Line 319, Patchset 7: AnchorElementMetricsSender::GetForFrame(GetDocument()->GetFrame());
Takashi Nakayama . resolved

This seems like an incomplete code.

Helmut Januschka

Done. I now use the `GetForFrame()` result explicitly and return early if no metrics sender exists, instead of relying on an ignored side effect.

Open in Gerrit

Related details

Attention is currently required from:
  • Takashi Nakayama
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Ib15101432ccd2dafe324b0e5eccf302b77b4c00d
Gerrit-Change-Number: 7800216
Gerrit-PatchSet: 8
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Barry Pollard <barryp...@chromium.org>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
Gerrit-Comment-Date: Fri, 15 May 2026 13:19:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Takashi Nakayama <tn...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Takashi Nakayama (Gerrit)

unread,
May 20, 2026, 9:30:32 PMMay 20
to Helmut Januschka, Hiroki Nakagawa, Takashi Toyoshima, Barry Pollard, Nate Chapin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, prerendering-reviews, Chromium LUCI CQ, blink-re...@chromium.org, devtools-re...@chromium.org, loading...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavin...@chromium.org, kinuko...@chromium.org, tburkar...@chromium.org
Attention needed from Helmut Januschka

Takashi Nakayama added 13 comments

File chrome/browser/navigation_predictor/navigation_predictor.cc
Line 638, Patchset 8 (Latest): blink::features::kNavigationPredictorNewViewportFeatures) &&
Takashi Nakayama . unresolved

Hmm. This feature looks outdated now. Let me take time to discuss this internally and get back to you. Probably I would remove this feature flag.

File content/browser/preloading/anchor_element_interaction_host_impl.cc
Line 26, Patchset 8 (Latest):bool ViewportHeuristicAllowed(const base::Feature& feature) {
return base::FeatureList::IsEnabled(feature);
}
Takashi Nakayama . unresolved

This seems like just a function alias. Could you remove this?

File content/browser/preloading/preloading_decider.cc
Line 328, Patchset 8 (Latest): // The renderer already validates this IPC.
Takashi Nakayama . unresolved

I don't think this comment is necessary. It is hard to understand what the renderer "validates" just by reading this code. Could you remove this or break down your intents?

Line 328, Patchset 8 (Parent): CHECK(base::FeatureList::IsEnabled(
blink::features::kPreloadingModerateViewportHeuristics));
Takashi Nakayama . unresolved

Could you restore this CHECK?

Line 348, Patchset 8 (Parent): CHECK(base::FeatureList::IsEnabled(
blink::features::kPreloadingEagerViewportHeuristics));
Takashi Nakayama . unresolved

ditto

File third_party/blink/renderer/core/loader/anchor_element_interaction_tracker.cc
Line 95, Patchset 8 (Latest): return page->GetSettings().GetViewportStyle() ==
mojom::blink::ViewportStyle::kMobile;
Takashi Nakayama . unresolved

q: what is the value of `ViewportStyle` for Android Desktop mode or for Android Tablet?

Line 120, Patchset 8 (Latest): if (&feature == &features::kPreloadingModerateViewportHeuristics) {
only_for_devtools_emulation =
features::kPreloadingModerateViewportHeuristicsOnlyForDevToolsEmulation
.Get();
} else if (&feature == &features::kPreloadingEagerViewportHeuristics) {
only_for_devtools_emulation =
features::kPreloadingEagerViewportHeuristicsOnlyForDevToolsEmulation
.Get();
} else {
NOTREACHED();
}
Takashi Nakayama . unresolved

This pattern doesn't seem good. Could you split the function to the Moderate version and the Eager version instead?

Line 282, Patchset 8 (Parent): if (base::FeatureList::IsEnabled(
blink::features::kPreloadingModerateViewportHeuristics) ||
base::FeatureList::IsEnabled(
blink::features::kPreloadingEagerViewportHeuristics)) {
Takashi Nakayama . unresolved

After the flag change, we should keep this guard.

Line 609, Patchset 8 (Latest): if (!ShouldRunMobileViewportHeuristic(
*GetDocument(),
blink::features::kPreloadingEagerViewportHeuristics)) {
eager_viewport_heuristics_candidates_.clear();
eager_viewport_heuristic_timer_.Stop();
return;
}
// TODO(https://crbug.com/505056924): The state of IsPreloadingEligible may be
// dynamically changed in the future changes, make sure the state is reflected
// correctly at the point.
if (!IsPreloadingEligible()) {
eager_viewport_heuristics_candidates_.clear();
eager_viewport_heuristic_timer_.Stop();
return;
}
Takashi Nakayama . unresolved
nit: we can merge these `if`.
```suggestion
// TODO(https://crbug.com/505056924): The state of IsPreloadingEligible may be
// dynamically changed in the future changes, make sure the state is reflected
// correctly at the point.
if (!ShouldRunMobileEagerViewportHeuristic(*GetDocument()) || !IsPreloadingEligible()) {
eager_viewport_heuristics_candidates_.clear();
eager_viewport_heuristic_timer_.Stop();
return;
}
```
Line 658, Patchset 8 (Latest): if (!ShouldRunMobileViewportHeuristic(
*GetDocument(),
blink::features::kPreloadingModerateViewportHeuristics)) {
largest_anchor_element_in_viewport_ = nullptr;
moderate_viewport_heuristic_timer_.Stop();
return;
}
// TODO(https://crbug.com/505056924): The state of IsPreloadingEligible may be
// dynamically changed in the future changes, make sure the state is reflected
// correctly at the point.
if (!IsPreloadingEligible()) {
largest_anchor_element_in_viewport_ = nullptr;
moderate_viewport_heuristic_timer_.Stop();
return;
}
Takashi Nakayama . unresolved

ditto

Line 742, Patchset 8 (Latest): CHECK(ShouldRunMobileViewportHeuristic(
*GetDocument(), blink::features::kPreloadingModerateViewportHeuristics));
Takashi Nakayama . unresolved

The value of `ShouldRunMobileViewportHeuristic()` can be changed dynamically. How about removing this CHECK and dynamically check this together with `IsPreloadingEligible()` below?

Line 755, Patchset 8 (Latest): if (IsPreloadingEligible()) {
Takashi Nakayama . unresolved
```suggestion
if (ShouldRunMobileModerateViewportHeuristic() && IsPreloadingEligible()) {
```
Line 763, Patchset 8 (Latest): CHECK(ShouldRunMobileViewportHeuristic(
Takashi Nakayama . unresolved

ditto

Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Comment-Date: Thu, 21 May 2026 01:30:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Helmut Januschka (Gerrit)

unread,
May 27, 2026, 6:13:26 PMMay 27
to Helmut Januschka, Takashi Nakayama, Hiroki Nakagawa, Takashi Toyoshima, Barry Pollard, Nate Chapin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, prerendering-reviews, Chromium LUCI CQ, blink-re...@chromium.org, devtools-re...@chromium.org, loading...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavin...@chromium.org, kinuko...@chromium.org, tburkar...@chromium.org
Attention needed from Takashi Nakayama

Helmut Januschka added 12 comments

File chrome/browser/navigation_predictor/navigation_predictor.cc
Line 638, Patchset 8: blink::features::kNavigationPredictorNewViewportFeatures) &&
Takashi Nakayama . unresolved

Hmm. This feature looks outdated now. Let me take time to discuss this internally and get back to you. Probably I would remove this feature flag.

Helmut Januschka

any updates?

File content/browser/preloading/anchor_element_interaction_host_impl.cc
Line 26, Patchset 8:bool ViewportHeuristicAllowed(const base::Feature& feature) {
return base::FeatureList::IsEnabled(feature);
}
Takashi Nakayama . resolved

This seems like just a function alias. Could you remove this?

Helmut Januschka

Done

File content/browser/preloading/preloading_decider.cc
Line 328, Patchset 8: // The renderer already validates this IPC.
Takashi Nakayama . resolved

I don't think this comment is necessary. It is hard to understand what the renderer "validates" just by reading this code. Could you remove this or break down your intents?

Helmut Januschka

removed it.

Line 328, Patchset 8 (Parent): CHECK(base::FeatureList::IsEnabled(
blink::features::kPreloadingModerateViewportHeuristics));
Takashi Nakayama . resolved

Could you restore this CHECK?

Helmut Januschka

Done

Line 348, Patchset 8 (Parent): CHECK(base::FeatureList::IsEnabled(
blink::features::kPreloadingEagerViewportHeuristics));
Takashi Nakayama . resolved

ditto

Helmut Januschka

Done

File third_party/blink/renderer/core/loader/anchor_element_interaction_tracker.cc
Line 95, Patchset 8: return page->GetSettings().GetViewportStyle() ==
mojom::blink::ViewportStyle::kMobile;
Takashi Nakayama . resolved

q: what is the value of `ViewportStyle` for Android Desktop mode or for Android Tablet?

Helmut Januschka

`ViewportStyle` defaults to `kMobile` on Android and `kDefault` elsewhere. In `WebContentsImpl::ComputeWebPreferences`, Android overrides it back to `kDefault` when the device form factor is automotive or when the smallest screen width is >= `kAndroidMinimumTabletWidthDp`. So:

  • Android Tablet: `kDefault` (treated as non-mobile here).
  • Android Desktop mode: `viewport_style` is not changed by RDS itself, only `viewport_meta_enabled` is flipped to false. So on a phone in RDS it stays `kMobile`, and on a tablet it stays `kDefault`. The mobile-viewport heuristic therefore still fires on a phone in RDS, which matches the intent (the device is still a phone).
Line 120, Patchset 8: if (&feature == &features::kPreloadingModerateViewportHeuristics) {

only_for_devtools_emulation =
features::kPreloadingModerateViewportHeuristicsOnlyForDevToolsEmulation
.Get();
} else if (&feature == &features::kPreloadingEagerViewportHeuristics) {
only_for_devtools_emulation =
features::kPreloadingEagerViewportHeuristicsOnlyForDevToolsEmulation
.Get();
} else {
NOTREACHED();
}
Takashi Nakayama . resolved

This pattern doesn't seem good. Could you split the function to the Moderate version and the Eager version instead?

Helmut Januschka

Done. Split into `ShouldRunModerateMobileViewportHeuristic` and `ShouldRunEagerMobileViewportHeuristic`

Line 609, Patchset 8: if (!ShouldRunMobileViewportHeuristic(

*GetDocument(),
blink::features::kPreloadingEagerViewportHeuristics)) {
eager_viewport_heuristics_candidates_.clear();
eager_viewport_heuristic_timer_.Stop();
return;
}
// TODO(https://crbug.com/505056924): The state of IsPreloadingEligible may be
// dynamically changed in the future changes, make sure the state is reflected
// correctly at the point.
if (!IsPreloadingEligible()) {
eager_viewport_heuristics_candidates_.clear();
eager_viewport_heuristic_timer_.Stop();
return;
}
Takashi Nakayama . resolved
nit: we can merge these `if`.
```suggestion
// TODO(https://crbug.com/505056924): The state of IsPreloadingEligible may be
// dynamically changed in the future changes, make sure the state is reflected
// correctly at the point.
if (!ShouldRunMobileEagerViewportHeuristic(*GetDocument()) || !IsPreloadingEligible()) {
eager_viewport_heuristics_candidates_.clear();
eager_viewport_heuristic_timer_.Stop();
return;
}
```
Helmut Januschka

Done

Line 658, Patchset 8: if (!ShouldRunMobileViewportHeuristic(

*GetDocument(),
blink::features::kPreloadingModerateViewportHeuristics)) {
largest_anchor_element_in_viewport_ = nullptr;
moderate_viewport_heuristic_timer_.Stop();
return;
}
// TODO(https://crbug.com/505056924): The state of IsPreloadingEligible may be
// dynamically changed in the future changes, make sure the state is reflected
// correctly at the point.
if (!IsPreloadingEligible()) {
largest_anchor_element_in_viewport_ = nullptr;
moderate_viewport_heuristic_timer_.Stop();
return;
}
Takashi Nakayama . resolved

ditto

Helmut Januschka

Done

Line 742, Patchset 8: CHECK(ShouldRunMobileViewportHeuristic(
*GetDocument(), blink::features::kPreloadingModerateViewportHeuristics));
Takashi Nakayama . resolved

The value of `ShouldRunMobileViewportHeuristic()` can be changed dynamically. How about removing this CHECK and dynamically check this together with `IsPreloadingEligible()` below?

Helmut Januschka

Done

Line 755, Patchset 8: if (IsPreloadingEligible()) {
Takashi Nakayama . resolved
```suggestion
if (ShouldRunMobileModerateViewportHeuristic() && IsPreloadingEligible()) {
```
Helmut Januschka

Done

Line 763, Patchset 8: CHECK(ShouldRunMobileViewportHeuristic(
Takashi Nakayama . resolved

ditto

Helmut Januschka

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Takashi Nakayama
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Ib15101432ccd2dafe324b0e5eccf302b77b4c00d
Gerrit-Change-Number: 7800216
Gerrit-PatchSet: 9
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Barry Pollard <barryp...@chromium.org>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
Gerrit-Comment-Date: Wed, 27 May 2026 22:13:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Takashi Nakayama <tn...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Helmut Januschka (Gerrit)

unread,
Jun 15, 2026, 4:53:02 PMJun 15
to Helmut Januschka, Takashi Nakayama, Hiroki Nakagawa, Takashi Toyoshima, Barry Pollard, Nate Chapin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, prerendering-reviews, Chromium LUCI CQ, blink-re...@chromium.org, devtools-re...@chromium.org, loading...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavin...@chromium.org, kinuko...@chromium.org, tburkar...@chromium.org
Attention needed from Takashi Nakayama

Helmut Januschka added 1 comment

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Helmut Januschka . unresolved

hi all i think this was pretty much near landing, anything from my side i could do to move on with this CL?

Gerrit-Comment-Date: Mon, 15 Jun 2026 20:52:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Takashi Nakayama (Gerrit)

unread,
Jun 16, 2026, 7:46:19 AMJun 16
to Helmut Januschka, Hiroki Nakagawa, Takashi Toyoshima, Barry Pollard, Nate Chapin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, prerendering-reviews, Chromium LUCI CQ, blink-re...@chromium.org, devtools-re...@chromium.org, loading...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavin...@chromium.org, kinuko...@chromium.org, tburkar...@chromium.org
Attention needed from Helmut Januschka

Takashi Nakayama added 3 comments

Patchset-level comments
File-level comment, Patchset 7:
Takashi Nakayama . resolved

It seems that this CL changes how `Preloading{Eager/Moderate}ViewportHeuristics` feature flags are handled. At the same time, this CL lacks a feature flag for the kill switch. How about enabling `Preloading{Eager/Moderate}ViewportHeuristics` by default for DESKTOP and adding new feature params like boolean `only_for_devtools_emulation` to the features, which is `true` by default? I think we can minimize the changes of the semantics of the existing feature flags in that way.

Helmut Januschka

changed the feature setup to keep the existing viewport heuristic features as the kill switch, enabled them by default on desktop, and added `only_for_devtools_emulation` params that default to true on desktop.

Takashi Nakayama

LGTM w.r.t. the flag change.

Helmut Januschka . unresolved

hi all i think this was pretty much near landing, anything from my side i could do to move on with this CL?

Takashi Nakayama

Apologies. Please resolve other comments from me.

File chrome/browser/navigation_predictor/navigation_predictor.cc
Line 638, Patchset 8: blink::features::kNavigationPredictorNewViewportFeatures) &&
Takashi Nakayama . unresolved

Hmm. This feature looks outdated now. Let me take time to discuss this internally and get back to you. Probably I would remove this feature flag.

Helmut Januschka

any updates?

Takashi Nakayama

I sincerely apologize for the delay. The situation is rather complex, as the original authors of this feature are no longer on the team, yet some folks may still be utilizing it. I'd like to keep the feature as-is for the time being. Could you please just ignore this flag and attempt to avoid calling `ReportAnchorElementsPositionUpdate()` when DevTools is attached on Desktop?

Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Comment-Date: Tue, 16 Jun 2026 11:45:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Helmut Januschka <hel...@januschka.com>
Comment-In-Reply-To: Takashi Nakayama <tn...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Helmut Januschka (Gerrit)

unread,
Jun 16, 2026, 5:42:39 PMJun 16
to Helmut Januschka, Takashi Nakayama, Hiroki Nakagawa, Takashi Toyoshima, Barry Pollard, Nate Chapin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, prerendering-reviews, Chromium LUCI CQ, blink-re...@chromium.org, devtools-re...@chromium.org, loading...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavin...@chromium.org, kinuko...@chromium.org, tburkar...@chromium.org
Attention needed from Takashi Nakayama

Helmut Januschka added 4 comments

Patchset-level comments
File-level comment, Patchset 9:
Helmut Januschka . resolved

hi all i think this was pretty much near landing, anything from my side i could do to move on with this CL?

Takashi Nakayama

Apologies. Please resolve other comments from me.

Helmut Januschka

Done

File-level comment, Patchset 10 (Latest):
Helmut Januschka . resolved

thank you, and no worries if it takes a while, really appreciate your review time for an external.

File chrome/browser/navigation_predictor/navigation_predictor.cc
Line 638, Patchset 8: blink::features::kNavigationPredictorNewViewportFeatures) &&
Takashi Nakayama . resolved

Hmm. This feature looks outdated now. Let me take time to discuss this internally and get back to you. Probably I would remove this feature flag.

Helmut Januschka

any updates?

Takashi Nakayama

I sincerely apologize for the delay. The situation is rather complex, as the original authors of this feature are no longer on the team, yet some folks may still be utilizing it. I'd like to keep the feature as-is for the time being. Could you please just ignore this flag and attempt to avoid calling `ReportAnchorElementsPositionUpdate()` when DevTools is attached on Desktop?

Helmut Januschka

Done. Kept the browser-side feature flag check as-is and restricted the renderer-side DevTools mobile-emulation fallback to Android, so desktop DevTools no longer sends `ReportAnchorElementsPositionUpdate()` while the flag is disabled.

File third_party/blink/renderer/core/loader/anchor_element_interaction_tracker.cc
if (base::FeatureList::IsEnabled(
blink::features::kPreloadingModerateViewportHeuristics) ||

base::FeatureList::IsEnabled(
blink::features::kPreloadingEagerViewportHeuristics)) {
Takashi Nakayama . resolved

After the flag change, we should keep this guard.

Helmut Januschka

Done.

Open in Gerrit

Related details

Attention is currently required from:
  • Takashi Nakayama
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Ib15101432ccd2dafe324b0e5eccf302b77b4c00d
Gerrit-Change-Number: 7800216
Gerrit-PatchSet: 10
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Barry Pollard <barryp...@chromium.org>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
Gerrit-Comment-Date: Tue, 16 Jun 2026 21:42:20 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Takashi Nakayama (Gerrit)

unread,
Jun 17, 2026, 12:54:34 AMJun 17
to Helmut Januschka, Hiroki Nakagawa, Takashi Toyoshima, Barry Pollard, Nate Chapin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, prerendering-reviews, Chromium LUCI CQ, blink-re...@chromium.org, devtools-re...@chromium.org, loading...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavin...@chromium.org, kinuko...@chromium.org, tburkar...@chromium.org
Attention needed from Helmut Januschka

Takashi Nakayama added 2 comments

File third_party/blink/renderer/core/html/anchor_element_viewport_position_tracker.cc
Line 75, Patchset 10 (Latest):bool ShouldReportViewportPositions(const Document& document) {
return base::FeatureList::IsEnabled(
features::kNavigationPredictorNewViewportFeatures) ||
IsDevToolsMobileEmulationActive(document);
}
Takashi Nakayama . unresolved

I think we can keep this function as-is, i.e., don't have to report viewport positions here for DevTools emulations.

File third_party/blink/renderer/core/loader/anchor_element_interaction_test.cc
Line 754, Patchset 10 (Latest): {"PreloadingModerateViewportHeuristicsOnlyForDevToolsEmulation",
Takashi Nakayama . unresolved

`only_for_devtools_emulation`? (ditto for the following)

Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Comment-Date: Wed, 17 Jun 2026 04:54:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Helmut Januschka (Gerrit)

unread,
Jun 18, 2026, 2:59:48 PMJun 18
to Helmut Januschka, Takashi Nakayama, Hiroki Nakagawa, Takashi Toyoshima, Barry Pollard, Nate Chapin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, prerendering-reviews, Chromium LUCI CQ, blink-re...@chromium.org, devtools-re...@chromium.org, loading...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavin...@chromium.org, kinuko...@chromium.org, tburkar...@chromium.org
Attention needed from Takashi Nakayama

Helmut Januschka added 2 comments

File third_party/blink/renderer/core/html/anchor_element_viewport_position_tracker.cc
Line 75, Patchset 10 (Latest):bool ShouldReportViewportPositions(const Document& document) {
return base::FeatureList::IsEnabled(
features::kNavigationPredictorNewViewportFeatures) ||
IsDevToolsMobileEmulationActive(document);
}
Takashi Nakayama . unresolved

I think we can keep this function as-is, i.e., don't have to report viewport positions here for DevTools emulations.

Helmut Januschka

I'd prefer to keep the `IsDevToolsMobileEmulationActive(document)` check here. `kNavigationPredictorNewViewportFeatures` is disabled by default off-Android, so without this branch `ShouldReportViewportPositions()` returns false on desktop and the position tracker never dispatches anchor position updates.

File third_party/blink/renderer/core/loader/anchor_element_interaction_test.cc
Line 754, Patchset 10 (Latest): {"PreloadingModerateViewportHeuristicsOnlyForDevToolsEmulation",
Takashi Nakayama . unresolved

`only_for_devtools_emulation`? (ditto for the following)

Helmut Januschka

```
third_party/blink/common/features.cc:2113: The 5-argument BASE_FEATURE_PARAM macro with a string literal name is discouraged. Use the 4-argument version instead.
```

fails then, and 4-arg version cant use snake case names :/

Open in Gerrit

Related details

Attention is currently required from:
  • Takashi Nakayama
Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
Gerrit-Comment-Date: Thu, 18 Jun 2026 18:59:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Takashi Nakayama <tn...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Takashi Toyoshima (Gerrit)

unread,
2:01 AM (2 hours ago) 2:01 AM
to Helmut Januschka, Takashi Nakayama, Hiroki Nakagawa, Barry Pollard, Nate Chapin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, prerendering-reviews, Chromium LUCI CQ, blink-re...@chromium.org, devtools-re...@chromium.org, loading...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavin...@chromium.org, kinuko...@chromium.org, tburkar...@chromium.org
Attention needed from Helmut Januschka, Hiroki Nakagawa and Takashi Nakayama

Takashi Toyoshima added 2 comments

File content/browser/preloading/anchor_element_interaction_host_impl.cc
Line 1, Patchset 11 (Latest):// Copyright 2022 The Chromium Authors
Takashi Toyoshima . unresolved

This file seems unrelated to this patch and reformat changes only.
Can we exclude this kind of things from the patch unless you have another essential change for the same file?

File third_party/blink/renderer/core/html/anchor_element_metrics_sender.cc
Line 56, Patchset 11 (Latest):#if BUILDFLAG(IS_ANDROID)
Takashi Toyoshima . unresolved

Maybe Android and others are swapped mistakenly here?

Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
  • Hiroki Nakagawa
  • Takashi Nakayama
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Ib15101432ccd2dafe324b0e5eccf302b77b4c00d
Gerrit-Change-Number: 7800216
Gerrit-PatchSet: 11
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Barry Pollard <barryp...@chromium.org>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Comment-Date: Thu, 09 Jul 2026 06:00:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages