[Android] Fix accessory bar positioning for "Suggest strong password" [chromium/src : main]

0 views
Skip to first unread message

Timofey Chudakov (Gerrit)

unread,
Feb 6, 2026, 8:14:48 AM (yesterday) Feb 6
to Piotr Kotynia, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
Attention needed from Christoph Schwering and Piotr Kotynia

Timofey Chudakov added 1 comment

File components/autofill/content/renderer/autofill_agent.cc
Line 1519, Patchset 2 (Latest):#if defined(ANDROID)
Timofey Chudakov . unresolved

If the fix is about setting correct field bounds, shouldn't we just set them an early return?

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Piotr Kotynia
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: I5a1adc0f0ac889a54c71d740a70a74c7590cc91d
Gerrit-Change-Number: 7545972
Gerrit-PatchSet: 2
Gerrit-Owner: Piotr Kotynia <piotrk...@google.com>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Piotr Kotynia <piotrk...@google.com>
Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Attention: Piotr Kotynia <piotrk...@google.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 13:14:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Piotr Kotynia (Gerrit)

unread,
Feb 6, 2026, 8:18:38 AM (yesterday) Feb 6
to Timofey Chudakov, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
Attention needed from Christoph Schwering and Timofey Chudakov

Piotr Kotynia voted and added 1 comment

Votes added by Piotr Kotynia

Commit-Queue+1

1 comment

File components/autofill/content/renderer/autofill_agent.cc
Timofey Chudakov . unresolved

If the fix is about setting correct field bounds, shouldn't we just set them an early return?

Attention is currently required from:
  • Christoph Schwering
  • Timofey Chudakov
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: I5a1adc0f0ac889a54c71d740a70a74c7590cc91d
Gerrit-Change-Number: 7545972
Gerrit-PatchSet: 2
Gerrit-Owner: Piotr Kotynia <piotrk...@google.com>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Piotr Kotynia <piotrk...@google.com>
Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
Gerrit-Attention: Timofey Chudakov <tchu...@google.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 13:18:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Timofey Chudakov <tchu...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Piotr Kotynia (Gerrit)

unread,
Feb 6, 2026, 8:20:04 AM (yesterday) Feb 6
to Timofey Chudakov, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
Attention needed from Christoph Schwering and Timofey Chudakov

Piotr Kotynia added 1 comment

File components/autofill/content/renderer/autofill_agent.cc
Timofey Chudakov . unresolved

If the fix is about setting correct field bounds, shouldn't we just set them an early return?

Piotr Kotynia

Unfortunately we set the field bounds much later: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view_impl.cc;l=141;drc=9b3ebe50b523222b93faee798b1e4cc2cf182118

Piotr Kotynia

What is even more interesting - we don't do an early return for an empty suggestions, so we still go through the "Show suggestions..." callstack. This bug only applies to the "Generate strong password" which consumes the event.

Gerrit-Comment-Date: Fri, 06 Feb 2026 13:19:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Timofey Chudakov <tchu...@google.com>
Comment-In-Reply-To: Piotr Kotynia <piotrk...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Christoph Schwering (Gerrit)

unread,
Feb 6, 2026, 9:28:49 AM (yesterday) Feb 6
to Piotr Kotynia, Timofey Chudakov, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
Attention needed from Piotr Kotynia and Timofey Chudakov

Christoph Schwering added 1 comment

File components/autofill/content/renderer/autofill_agent.cc
Timofey Chudakov . unresolved

If the fix is about setting correct field bounds, shouldn't we just set them an early return?

Piotr Kotynia

Unfortunately we set the field bounds much later: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view_impl.cc;l=141;drc=9b3ebe50b523222b93faee798b1e4cc2cf182118

Piotr Kotynia

What is even more interesting - we don't do an early return for an empty suggestions, so we still go through the "Show suggestions..." callstack. This bug only applies to the "Generate strong password" which consumes the event.

Christoph Schwering

The change looks good to me in the sense that it only affects the experiment, but I don't understand the mechanism yet. A few naive questions for my understanding:

- Does `ShowPasswordGenerationSuggestions()` call `AutofillKeyboardAccessoryControllerImpl::Show()`, but with incorrect coordinates? (Why are they incorrect?)
- IIRC the `autofill_driver->AskForValuesToFill()` call below calls `AutofillKeyboardAccessoryControllerImpl::Show()` with empty suggestions.
- Does that `Show()` call happen before the password-generation suggestion is shown? Or does it re-display the password-generation suggestion in the right place?
- Is there a race condition if `AutofillManager::AskForValuesToFill()` reparses the form asynchronously?
- How does the KA normally know which suggestions to show?
- Does `if (password_agent_handled_request) return;` lead to the same problem?
Open in Gerrit

Related details

Attention is currently required from:
  • Piotr Kotynia
  • Timofey Chudakov
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: I5a1adc0f0ac889a54c71d740a70a74c7590cc91d
Gerrit-Change-Number: 7545972
Gerrit-PatchSet: 2
Gerrit-Owner: Piotr Kotynia <piotrk...@google.com>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Piotr Kotynia <piotrk...@google.com>
Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
Gerrit-Attention: Timofey Chudakov <tchu...@google.com>
Gerrit-Attention: Piotr Kotynia <piotrk...@google.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 14:28:36 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Piotr Kotynia (Gerrit)

unread,
Feb 6, 2026, 10:05:29 AM (yesterday) Feb 6
to Timofey Chudakov, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
Attention needed from Christoph Schwering and Timofey Chudakov

Piotr Kotynia added 1 comment

File components/autofill/content/renderer/autofill_agent.cc
Timofey Chudakov . unresolved

If the fix is about setting correct field bounds, shouldn't we just set them an early return?

Piotr Kotynia

Unfortunately we set the field bounds much later: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view_impl.cc;l=141;drc=9b3ebe50b523222b93faee798b1e4cc2cf182118

Piotr Kotynia

What is even more interesting - we don't do an early return for an empty suggestions, so we still go through the "Show suggestions..." callstack. This bug only applies to the "Generate strong password" which consumes the event.

Christoph Schwering

The change looks good to me in the sense that it only affects the experiment, but I don't understand the mechanism yet. A few naive questions for my understanding:

- Does `ShowPasswordGenerationSuggestions()` call `AutofillKeyboardAccessoryControllerImpl::Show()`, but with incorrect coordinates? (Why are they incorrect?)
- IIRC the `autofill_driver->AskForValuesToFill()` call below calls `AutofillKeyboardAccessoryControllerImpl::Show()` with empty suggestions.
- Does that `Show()` call happen before the password-generation suggestion is shown? Or does it re-display the password-generation suggestion in the right place?
- Is there a race condition if `AutofillManager::AskForValuesToFill()` reparses the form asynchronously?
- How does the KA normally know which suggestions to show?
- Does `if (password_agent_handled_request) return;` lead to the same problem?
Piotr Kotynia
Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Timofey Chudakov
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: I5a1adc0f0ac889a54c71d740a70a74c7590cc91d
Gerrit-Change-Number: 7545972
Gerrit-PatchSet: 2
Gerrit-Owner: Piotr Kotynia <piotrk...@google.com>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Piotr Kotynia <piotrk...@google.com>
Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
Gerrit-Attention: Timofey Chudakov <tchu...@google.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 15:05:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Timofey Chudakov <tchu...@google.com>
Comment-In-Reply-To: Christoph Schwering <schw...@google.com>
Comment-In-Reply-To: Piotr Kotynia <piotrk...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Christoph Schwering (Gerrit)

unread,
Feb 6, 2026, 11:00:58 AM (yesterday) Feb 6
to Piotr Kotynia, Timofey Chudakov, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
Attention needed from Piotr Kotynia and Timofey Chudakov

Christoph Schwering voted and added 2 comments

Votes added by Christoph Schwering

Code-Review+1

2 comments

File components/autofill/content/renderer/autofill_agent.cc
Timofey Chudakov . unresolved

If the fix is about setting correct field bounds, shouldn't we just set them an early return?

Piotr Kotynia

Unfortunately we set the field bounds much later: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view_impl.cc;l=141;drc=9b3ebe50b523222b93faee798b1e4cc2cf182118

Piotr Kotynia

What is even more interesting - we don't do an early return for an empty suggestions, so we still go through the "Show suggestions..." callstack. This bug only applies to the "Generate strong password" which consumes the event.

Christoph Schwering

The change looks good to me in the sense that it only affects the experiment, but I don't understand the mechanism yet. A few naive questions for my understanding:

- Does `ShowPasswordGenerationSuggestions()` call `AutofillKeyboardAccessoryControllerImpl::Show()`, but with incorrect coordinates? (Why are they incorrect?)
- IIRC the `autofill_driver->AskForValuesToFill()` call below calls `AutofillKeyboardAccessoryControllerImpl::Show()` with empty suggestions.
- Does that `Show()` call happen before the password-generation suggestion is shown? Or does it re-display the password-generation suggestion in the right place?
- Is there a race condition if `AutofillManager::AskForValuesToFill()` reparses the form asynchronously?
- How does the KA normally know which suggestions to show?
- Does `if (password_agent_handled_request) return;` lead to the same problem?
Piotr Kotynia
Christoph Schwering

Thanks a lot for the detailed answers!

One more question: What'd happen if we remove the early return also on non-Android?

While centralized management would be simpler, changing it would likely be a difficult and time-consuming task.

Is there a plan to do this (as part of this feature?)? It sounds like a lot of complexity and constant source bugs

Does if (password_agent_handled_request) return; lead to the same problem? - I was thinking about it. I didn't observe such issue, probably because TryShowPasswordSuggestions goes here link and maybe triggers the KA field bounds setting logic, but from different place. I think that this PWM<->Autofill<->KA architecture is unstable, but there is nothing we can do about it in short term.

+1

I'd suspect for the other early returns, there are edge cases where the problem persists.

Line 1523, Patchset 2 (Latest): }
Christoph Schwering . unresolved

Could you add a comment why we don't want to early-return on Android?

If centralizing the KA access is realistic, could you file a bug for it if we don't have one yet and mention it in the comment?

Open in Gerrit

Related details

Attention is currently required from:
  • Piotr Kotynia
  • Timofey Chudakov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement 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: I5a1adc0f0ac889a54c71d740a70a74c7590cc91d
Gerrit-Change-Number: 7545972
Gerrit-PatchSet: 2
Gerrit-Owner: Piotr Kotynia <piotrk...@google.com>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Piotr Kotynia <piotrk...@google.com>
Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
Gerrit-Attention: Timofey Chudakov <tchu...@google.com>
Gerrit-Attention: Piotr Kotynia <piotrk...@google.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 16:00:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Timofey Chudakov (Gerrit)

unread,
8:31 AM (4 hours ago) 8:31 AM
to Piotr Kotynia, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
Attention needed from Piotr Kotynia

Timofey Chudakov added 1 comment

File components/autofill/content/renderer/autofill_agent.cc
Timofey Chudakov

What'd happen if we remove the early return also on non-Android?

+1 to the question, we should either always return early or always set the correct coordinates.

Open in Gerrit

Related details

Attention is currently required from:
  • Piotr Kotynia
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement 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: I5a1adc0f0ac889a54c71d740a70a74c7590cc91d
Gerrit-Change-Number: 7545972
Gerrit-PatchSet: 2
Gerrit-Owner: Piotr Kotynia <piotrk...@google.com>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Piotr Kotynia <piotrk...@google.com>
Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
Gerrit-Attention: Piotr Kotynia <piotrk...@google.com>
Gerrit-Comment-Date: Sat, 07 Feb 2026 13:31:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages