Move MayContainSensitiveData to HTMLFormControlElement [chromium/src : main]

0 views
Skip to first unread message

Nan Lin (Gerrit)

unread,
May 11, 2026, 9:26:53 PM (16 hours ago) May 11
to David Baron, Chromium LUCI CQ, chromium...@chromium.org, aleventh...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from David Baron

Nan Lin voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
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: I485456ad51cad6bf0fb0f95c3588be6362b85a7c
Gerrit-Change-Number: 7838559
Gerrit-PatchSet: 2
Gerrit-Owner: Nan Lin <lin...@chromium.org>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Comment-Date: Tue, 12 May 2026 01:26:47 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

David Baron (Gerrit)

unread,
9:58 AM (4 hours ago) 9:58 AM
to Nan Lin, David Baron, Chromium LUCI CQ, chromium...@chromium.org, aleventh...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Nan Lin

David Baron added 3 comments

File third_party/blink/renderer/core/html/forms/html_form_control_element.h
Line 155, Patchset 2 (Latest): bool MayContainSensitiveData() const;
David Baron . unresolved

I think this should probably have some sort of comment saying what its definition of "sensitive" is and when it's appropriate to use. (For example, I could imagine some people expecting that dates could be sensitive.)

File third_party/blink/renderer/core/html/forms/html_form_control_element.cc
Line 527, Patchset 2 (Latest): case mojom::blink::FormControlType::kSelectOne:
David Baron . unresolved

I don't understand why `kSelectOne` is in one category but `kSelectMultiple` is in the other.

(Also, other than the inclusion of `kSelectOne`, I *think* this is equivalent to `blink::Element::IsTextControl()`.)

Line 554, Patchset 2 (Latest): return false;
David Baron . unresolved

I'm inclined to think this should be `NOTREACHED()` rather than `return false`.

Open in Gerrit

Related details

Attention is currently required from:
  • Nan Lin
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: I485456ad51cad6bf0fb0f95c3588be6362b85a7c
    Gerrit-Change-Number: 7838559
    Gerrit-PatchSet: 2
    Gerrit-Owner: Nan Lin <lin...@chromium.org>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
    Gerrit-Attention: Nan Lin <lin...@chromium.org>
    Gerrit-Comment-Date: Tue, 12 May 2026 13:58:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nan Lin (Gerrit)

    unread,
    10:26 AM (3 hours ago) 10:26 AM
    to David Baron, Chromium LUCI CQ, chromium...@chromium.org, aleventh...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from David Baron

    Nan Lin added 4 comments

    Patchset-level comments
    File-level comment, Patchset 2:
    Nan Lin . resolved

    Thanks!

    File third_party/blink/renderer/core/html/forms/html_form_control_element.h
    Line 155, Patchset 2: bool MayContainSensitiveData() const;
    David Baron . resolved

    I think this should probably have some sort of comment saying what its definition of "sensitive" is and when it's appropriate to use. (For example, I could imagine some people expecting that dates could be sensitive.)

    Nan Lin

    Updated with the comment, it's mostly tied to autofill. Thanks.

    File third_party/blink/renderer/core/html/forms/html_form_control_element.cc
    Line 527, Patchset 2: case mojom::blink::FormControlType::kSelectOne:
    David Baron . resolved

    I don't understand why `kSelectOne` is in one category but `kSelectMultiple` is in the other.

    (Also, other than the inclusion of `kSelectOne`, I *think* this is equivalent to `blink::Element::IsTextControl()`.)

    Nan Lin

    This mostly mirrors [ToAutofillFormControlType](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/content/renderer/form_autofill_util.cc;drc=a636e7dace1ec22bdd5eb4ab27ccbca9712020d3;bpv=1;bpt=1;l=2287). The only difference was `kInputDate` which was not included as it's not possible for credit card and passwords. As we move to renderer/core, it makes sense to include this as well to be complete. Thanks for catching.

    Line 554, Patchset 2: return false;
    David Baron . resolved

    I'm inclined to think this should be `NOTREACHED()` rather than `return false`.

    Nan Lin

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Baron
    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: I485456ad51cad6bf0fb0f95c3588be6362b85a7c
      Gerrit-Change-Number: 7838559
      Gerrit-PatchSet: 2
      Gerrit-Owner: Nan Lin <lin...@chromium.org>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
      Gerrit-Attention: David Baron <dba...@chromium.org>
      Gerrit-Comment-Date: Tue, 12 May 2026 14:26:01 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: David Baron <dba...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Nan Lin (Gerrit)

      unread,
      10:28 AM (3 hours ago) 10:28 AM
      to Stephen McGruer, android-bu...@system.gserviceaccount.com, David Baron, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org, aleventh...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, mfoltz+wa...@chromium.org
      Attention needed from David Baron and Stephen McGruer

      Nan Lin added 1 comment

      Patchset-level comments
      File-level comment, Patchset 3:
      Nan Lin . resolved

      Hi Stephen, could you PTAL at //components/autofill, thanks!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • David Baron
      • Stephen McGruer
      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: I485456ad51cad6bf0fb0f95c3588be6362b85a7c
      Gerrit-Change-Number: 7838559
      Gerrit-PatchSet: 3
      Gerrit-Owner: Nan Lin <lin...@chromium.org>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
      Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
      Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
      Gerrit-Attention: David Baron <dba...@chromium.org>
      Gerrit-Comment-Date: Tue, 12 May 2026 14:28:13 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      David Baron (Gerrit)

      unread,
      10:57 AM (3 hours ago) 10:57 AM
      to Nan Lin, David Baron, Stephen McGruer, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org, aleventh...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, mfoltz+wa...@chromium.org
      Attention needed from Nan Lin and Stephen McGruer

      David Baron voted and added 2 comments

      Votes added by David Baron

      Code-Review+1

      2 comments

      Patchset-level comments
      File-level comment, Patchset 5 (Latest):
      David Baron . resolved

      ok, LGTM with one comment

      File third_party/blink/renderer/core/html/forms/html_form_control_element.h
      Line 162, Patchset 5 (Latest): bool IsPotentialSensitiveAutofillControl() const;
      David Baron . unresolved

      I think it's probably better to add an `ly` to the name so that it's `IsPotentiallySensitiveAutofillControl`.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Nan Lin
      • Stephen McGruer
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement 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: I485456ad51cad6bf0fb0f95c3588be6362b85a7c
        Gerrit-Change-Number: 7838559
        Gerrit-PatchSet: 5
        Gerrit-Owner: Nan Lin <lin...@chromium.org>
        Gerrit-Reviewer: David Baron <dba...@chromium.org>
        Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
        Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
        Gerrit-Attention: Nan Lin <lin...@chromium.org>
        Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
        Gerrit-Comment-Date: Tue, 12 May 2026 14:57:14 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Nan Lin (Gerrit)

        unread,
        12:08 PM (2 hours ago) 12:08 PM
        to David Baron, Stephen McGruer, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org, aleventh...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, mfoltz+wa...@chromium.org
        Attention needed from Stephen McGruer

        Nan Lin added 2 comments

        Patchset-level comments
        File third_party/blink/renderer/core/html/forms/html_form_control_element.h
        Line 162, Patchset 5: bool IsPotentialSensitiveAutofillControl() const;
        David Baron . resolved

        I think it's probably better to add an `ly` to the name so that it's `IsPotentiallySensitiveAutofillControl`.

        Nan Lin

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Stephen McGruer
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement 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: I485456ad51cad6bf0fb0f95c3588be6362b85a7c
          Gerrit-Change-Number: 7838559
          Gerrit-PatchSet: 6
          Gerrit-Owner: Nan Lin <lin...@chromium.org>
          Gerrit-Reviewer: David Baron <dba...@chromium.org>
          Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
          Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
          Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
          Gerrit-Comment-Date: Tue, 12 May 2026 16:08:34 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: David Baron <dba...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages