[EVP] Show a status indicator in the input field (part 1) [chromium/src : main]

0 views
Skip to first unread message

Christian Biesinger (Gerrit)

unread,
Jun 24, 2026, 5:43:41 PM (2 days ago) Jun 24
to Christian Biesinger, Nicolás Peña, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
Attention needed from Nicolás Peña

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Nicolás Peña
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Ic5035c39e7fa58f5c0976a8dd1172b9e123de1f2
Gerrit-Change-Number: 7998217
Gerrit-PatchSet: 4
Gerrit-Owner: Christian Biesinger <cbies...@chromium.org>
Gerrit-Reviewer: Christian Biesinger <cbies...@chromium.org>
Gerrit-Reviewer: Nicolás Peña <n...@chromium.org>
Gerrit-Attention: Nicolás Peña <n...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Jun 2026 21:43:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Nicolás Peña (Gerrit)

unread,
Jun 25, 2026, 11:16:44 AM (16 hours ago) Jun 25
to Christian Biesinger, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
Attention needed from Christian Biesinger

Nicolás Peña added 6 comments

Commit Message
Line 21, Patchset 4 (Latest):Bug: 524671711
Nicolás Peña . unresolved

Is there a screenshot? :)

File components/autofill/content/renderer/autofill_agent.cc
Line 1782, Patchset 4 (Latest): if (element) {
Nicolás Peña . unresolved

Consider early returns instead to avoid nesting.

Line 1790, Patchset 4 (Latest): blink::WebInputElement::EmailVerificationState::kNone);
Nicolás Peña . unresolved

Isnt this the default state? Or what's the difference?

File third_party/blink/renderer/core/exported/web_input_element.cc
Line 108, Patchset 4 (Latest):void WebInputElement::SetEmailVerificationState(EmailVerificationState state) {
Nicolás Peña . unresolved

Do we need both enums? If we could consolidate, perhaps we wouldn't need this method

File third_party/blink/renderer/core/html/forms/email_input_type.cc
Line 345, Patchset 4 (Latest): container->AppendChild(indicator);
Nicolás Peña . unresolved

Please fix this WARNING reported by autoreview issue finding: If the `email_verification_state_` is updated before the shadow subtree is created (e.g. shadow tree creation is scheduled lazily), `UpdateEmailVerificationIndicator()` in `SetEmailVerificationState` returns early. Then when `CreateShadowSubtree()` is eventually called, the new `indicator` will default to `state="none"` regardless of the current `email_verification_state_`.

You should call `UpdateEmailVerificationIndicator();` here to ensure the indicator's attributes reflect the actual state.

Line 378, Patchset 4 (Latest): if (GetElement().IsInCanvasSubtree()) {
Nicolás Peña . unresolved

In this case I guess we could early return before querying `indicator`?

Open in Gerrit

Related details

Attention is currently required from:
  • Christian Biesinger
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: Ic5035c39e7fa58f5c0976a8dd1172b9e123de1f2
    Gerrit-Change-Number: 7998217
    Gerrit-PatchSet: 4
    Gerrit-Owner: Christian Biesinger <cbies...@chromium.org>
    Gerrit-Reviewer: Christian Biesinger <cbies...@chromium.org>
    Gerrit-Reviewer: Nicolás Peña <n...@chromium.org>
    Gerrit-Attention: Christian Biesinger <cbies...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 15:16:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Christian Biesinger (Gerrit)

    unread,
    Jun 25, 2026, 3:11:40 PM (13 hours ago) Jun 25
    to Christian Biesinger, Nicolás Peña, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
    Attention needed from Nicolás Peña

    Christian Biesinger added 7 comments

    Patchset-level comments
    File-level comment, Patchset 4:
    Christian Biesinger . resolved

    PTAL

    Commit Message
    Line 21, Patchset 4:Bug: 524671711
    Nicolás Peña . resolved

    Is there a screenshot? :)

    Christian Biesinger
    File components/autofill/content/renderer/autofill_agent.cc
    Line 1782, Patchset 4: if (element) {
    Nicolás Peña . resolved

    Consider early returns instead to avoid nesting.

    Christian Biesinger

    Done

    Line 1790, Patchset 4: blink::WebInputElement::EmailVerificationState::kNone);
    Nicolás Peña . resolved

    Isnt this the default state? Or what's the difference?

    Christian Biesinger

    I removed it, but not for the reason you mentioned :-) This function doesn't get called with an empty token.

    We should clear the state when the email address changes but that can be done in a followup.

    File third_party/blink/renderer/core/exported/web_input_element.cc
    Line 108, Patchset 4:void WebInputElement::SetEmailVerificationState(EmailVerificationState state) {
    Nicolás Peña . resolved

    Do we need both enums? If we could consolidate, perhaps we wouldn't need this method

    Christian Biesinger

    Done, but we do need this method as a bridge between internal blink code and components/autofill/content/renderer.

    (Gemini thinks this of your suggestion: `This structure is exceptionally clean`)

    File third_party/blink/renderer/core/html/forms/email_input_type.cc
    Line 345, Patchset 4: container->AppendChild(indicator);
    Nicolás Peña . resolved

    Please fix this WARNING reported by autoreview issue finding: If the `email_verification_state_` is updated before the shadow subtree is created (e.g. shadow tree creation is scheduled lazily), `UpdateEmailVerificationIndicator()` in `SetEmailVerificationState` returns early. Then when `CreateShadowSubtree()` is eventually called, the new `indicator` will default to `state="none"` regardless of the current `email_verification_state_`.

    You should call `UpdateEmailVerificationIndicator();` here to ensure the indicator's attributes reflect the actual state.

    Christian Biesinger

    Done

    Line 378, Patchset 4: if (GetElement().IsInCanvasSubtree()) {
    Nicolás Peña . unresolved

    In this case I guess we could early return before querying `indicator`?

    Christian Biesinger

    We could avoid setting the state attribute entirely maybe, but IMO it's more consistent to still set it in this case.

    (we need `indicator` on the next line to call `setAttribute`)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Nicolás Peña
    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: Ic5035c39e7fa58f5c0976a8dd1172b9e123de1f2
    Gerrit-Change-Number: 7998217
    Gerrit-PatchSet: 4
    Gerrit-Owner: Christian Biesinger <cbies...@chromium.org>
    Gerrit-Reviewer: Christian Biesinger <cbies...@chromium.org>
    Gerrit-Reviewer: Nicolás Peña <n...@chromium.org>
    Gerrit-Attention: Nicolás Peña <n...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 19:11:32 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Nicolás Peña <n...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nicolás Peña (Gerrit)

    unread,
    Jun 25, 2026, 3:25:58 PM (12 hours ago) Jun 25
    to Christian Biesinger, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
    Attention needed from Christian Biesinger

    Nicolás Peña voted and added 1 comment

    Votes added by Nicolás Peña

    Code-Review+1

    1 comment

    File third_party/blink/renderer/core/html/forms/email_input_type.cc
    Line 378, Patchset 4: if (GetElement().IsInCanvasSubtree()) {
    Nicolás Peña . unresolved

    In this case I guess we could early return before querying `indicator`?

    Christian Biesinger

    We could avoid setting the state attribute entirely maybe, but IMO it's more consistent to still set it in this case.

    (we need `indicator` on the next line to call `setAttribute`)

    Nicolás Peña

    Actually thinking about the comment below more, doesnt the website get the token before the form is submitted anyways? Why do we need to treat canvas subtrees differently?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Christian Biesinger
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: Ic5035c39e7fa58f5c0976a8dd1172b9e123de1f2
      Gerrit-Change-Number: 7998217
      Gerrit-PatchSet: 5
      Gerrit-Owner: Christian Biesinger <cbies...@chromium.org>
      Gerrit-Reviewer: Christian Biesinger <cbies...@chromium.org>
      Gerrit-Reviewer: Nicolás Peña <n...@chromium.org>
      Gerrit-Attention: Christian Biesinger <cbies...@chromium.org>
      Gerrit-Comment-Date: Thu, 25 Jun 2026 19:25:50 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Christian Biesinger <cbies...@chromium.org>
      Comment-In-Reply-To: Nicolás Peña <n...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Christian Biesinger (Gerrit)

      unread,
      Jun 25, 2026, 3:29:17 PM (12 hours ago) Jun 25
      to Christian Biesinger, Philip Rogers, Jihad Hanna, Nicolás Peña, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
      Attention needed from Jihad Hanna, Joey Arhar, Nicolás Peña and Philip Rogers

      Christian Biesinger added 2 comments

      Patchset-level comments
      File-level comment, Patchset 5 (Latest):
      Christian Biesinger . resolved

      +Joey for forms
      +pdr for blink/public
      +Jihad for components

      File third_party/blink/renderer/core/html/forms/email_input_type.cc
      Line 378, Patchset 4: if (GetElement().IsInCanvasSubtree()) {
      Nicolás Peña . unresolved

      In this case I guess we could early return before querying `indicator`?

      Christian Biesinger

      We could avoid setting the state attribute entirely maybe, but IMO it's more consistent to still set it in this case.

      (we need `indicator` on the next line to call `setAttribute`)

      Nicolás Peña

      Actually thinking about the comment below more, doesnt the website get the token before the form is submitted anyways? Why do we need to treat canvas subtrees differently?

      Christian Biesinger

      It does not, no. That is, it would only get the token immediately before submit. In addition, once this is fully implemented, the website would be able to tell the difference between "user denied permission" and "user is not logged in" based on the indicator.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Jihad Hanna
      • Joey Arhar
      • Nicolás Peña
      • Philip Rogers
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: Ic5035c39e7fa58f5c0976a8dd1172b9e123de1f2
      Gerrit-Change-Number: 7998217
      Gerrit-PatchSet: 5
      Gerrit-Owner: Christian Biesinger <cbies...@chromium.org>
      Gerrit-Reviewer: Christian Biesinger <cbies...@chromium.org>
      Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
      Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
      Gerrit-Reviewer: Nicolás Peña <n...@chromium.org>
      Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
      Gerrit-Attention: Joey Arhar <jar...@chromium.org>
      Gerrit-Attention: Philip Rogers <p...@chromium.org>
      Gerrit-Attention: Jihad Hanna <jihad...@google.com>
      Gerrit-Attention: Nicolás Peña <n...@chromium.org>
      Gerrit-Comment-Date: Thu, 25 Jun 2026 19:29:09 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Nicolás Peña (Gerrit)

      unread,
      Jun 25, 2026, 4:17:49 PM (11 hours ago) Jun 25
      to Christian Biesinger, Philip Rogers, Jihad Hanna, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
      Attention needed from Christian Biesinger, Jihad Hanna, Joey Arhar and Philip Rogers

      Nicolás Peña added 1 comment

      File third_party/blink/renderer/core/html/forms/email_input_type.cc
      Line 378, Patchset 4: if (GetElement().IsInCanvasSubtree()) {
      Nicolás Peña . resolved

      In this case I guess we could early return before querying `indicator`?

      Christian Biesinger

      We could avoid setting the state attribute entirely maybe, but IMO it's more consistent to still set it in this case.

      (we need `indicator` on the next line to call `setAttribute`)

      Nicolás Peña

      Actually thinking about the comment below more, doesnt the website get the token before the form is submitted anyways? Why do we need to treat canvas subtrees differently?

      Christian Biesinger

      It does not, no. That is, it would only get the token immediately before submit. In addition, once this is fully implemented, the website would be able to tell the difference between "user denied permission" and "user is not logged in" based on the indicator.

      Nicolás Peña

      Acknowledged

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Christian Biesinger
      • Jihad Hanna
      • Joey Arhar
      • Philip Rogers
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • 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: Ic5035c39e7fa58f5c0976a8dd1172b9e123de1f2
        Gerrit-Change-Number: 7998217
        Gerrit-PatchSet: 5
        Gerrit-Owner: Christian Biesinger <cbies...@chromium.org>
        Gerrit-Reviewer: Christian Biesinger <cbies...@chromium.org>
        Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
        Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
        Gerrit-Reviewer: Nicolás Peña <n...@chromium.org>
        Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
        Gerrit-Attention: Joey Arhar <jar...@chromium.org>
        Gerrit-Attention: Philip Rogers <p...@chromium.org>
        Gerrit-Attention: Christian Biesinger <cbies...@chromium.org>
        Gerrit-Attention: Jihad Hanna <jihad...@google.com>
        Gerrit-Comment-Date: Thu, 25 Jun 2026 20:17:38 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Joey Arhar (Gerrit)

        unread,
        Jun 25, 2026, 7:18:34 PM (8 hours ago) Jun 25
        to Christian Biesinger, Philip Rogers, Jihad Hanna, Nicolás Peña, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
        Attention needed from Christian Biesinger, Jihad Hanna and Philip Rogers

        Joey Arhar added 3 comments

        File third_party/blink/renderer/core/html/forms/email_input_type.cc
        Line 338, Patchset 5 (Latest): if (!container) {
        return;
        }
        Joey Arhar . unresolved

        Is this element ever null? Based on a quick skim, I would expect that TextFieldInputType::CreateShadowSubtree would create this element, right?

        Line 381, Patchset 5 (Latest): indicator->setAttribute(AtomicString("state"), AtomicString("none"));
        Joey Arhar . unresolved

        Maybe would be nicer to use data-state since state isn't a standardized attribute?

        Line 400, Patchset 5 (Latest): RuntimeEnabledFeatures::EmailVerificationStatusIndicatorEnabled(
        Joey Arhar . unresolved

        would it make sense to just make the EmailVerificationStatusIndicator flag depend_on EmailVerificationProtocol instead of having to check two flags here? Or is that not possible when they're set up to use origin trials?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Christian Biesinger
        • Jihad Hanna
        • Philip Rogers
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not 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: Ic5035c39e7fa58f5c0976a8dd1172b9e123de1f2
          Gerrit-Change-Number: 7998217
          Gerrit-PatchSet: 5
          Gerrit-Owner: Christian Biesinger <cbies...@chromium.org>
          Gerrit-Reviewer: Christian Biesinger <cbies...@chromium.org>
          Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
          Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
          Gerrit-Reviewer: Nicolás Peña <n...@chromium.org>
          Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
          Gerrit-Attention: Philip Rogers <p...@chromium.org>
          Gerrit-Attention: Christian Biesinger <cbies...@chromium.org>
          Gerrit-Attention: Jihad Hanna <jihad...@google.com>
          Gerrit-Comment-Date: Thu, 25 Jun 2026 23:18:05 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages