[webmcp] Only include supported types in FormModelContextParameterMissingName [chromium/src : main]

0 views
Skip to first unread message

Philip Pfaffe (Gerrit)

unread,
Apr 20, 2026, 3:07:24 AM (2 days ago) Apr 20
to Lusa Zhan, Anders Hartvoll Ruud, Fr, chromium...@chromium.org, Khushal Sagar, blink-rev...@chromium.org, blink-...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Anders Hartvoll Ruud and Lusa Zhan

Philip Pfaffe added 1 comment

File third_party/blink/renderer/core/html/forms/form_mcp_schema.cc
Line 1361, Patchset 3 (Latest):bool FormMCPSchema::IsSupportedParameter(ListedElement& control) const {
Philip Pfaffe . unresolved

How likely is this list to change? I.e., how likely is it that this introduces false positives or false negatives down the line, whenever a new type gets supported or unsupported?

Open in Gerrit

Related details

Attention is currently required from:
  • Anders Hartvoll Ruud
  • Lusa Zhan
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: Iab9eaf7ad09eac746f576f54ce3919b488822404
Gerrit-Change-Number: 7772777
Gerrit-PatchSet: 3
Gerrit-Owner: Lusa Zhan <lusa...@chromium.org>
Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
Gerrit-CC: Fr <beaufort...@gmail.com>
Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
Gerrit-Attention: Lusa Zhan <lusa...@chromium.org>
Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Comment-Date: Mon, 20 Apr 2026 07:06:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Anders Hartvoll Ruud (Gerrit)

unread,
Apr 20, 2026, 5:05:26 AM (2 days ago) Apr 20
to Lusa Zhan, Philip Pfaffe, Fr, chromium...@chromium.org, Khushal Sagar, blink-rev...@chromium.org, blink-...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Lusa Zhan

Anders Hartvoll Ruud added 3 comments

Commit Message
Line 9, Patchset 3 (Latest):We should not emit issues for unsupported types.
Anders Hartvoll Ruud . unresolved

Not a strong opinion, but ... are you sure about that? You could look at this way:

 * A named form control group isn't supported -> "ISSUE: unsupported combination of form controls".
* A form control group is missing a name -> "ISSUE: you forgot the name".

These seem fair to warn about independently? (Or should one mistake cancel the other?)

File third_party/blink/renderer/core/html/forms/form_mcp_schema.cc
Line 161, Patchset 3 (Latest): if (!IsSupportedParameter(*element)) {
continue;
}
Anders Hartvoll Ruud . unresolved

This is not correct. We need to check the type against `it`, not `element`.

Line 1361, Patchset 3 (Latest):bool FormMCPSchema::IsSupportedParameter(ListedElement& control) const {
Philip Pfaffe . unresolved

How likely is this list to change? I.e., how likely is it that this introduces false positives or false negatives down the line, whenever a new type gets supported or unsupported?

Anders Hartvoll Ruud

Yeah, I think we should drop this and instead just do:

```
bool required_unused;
if (!ComputeParameterSchema("", required_unused)) {
// Don't emit an issue if the parameter is unsupported anyway.
return;
}
```
Open in Gerrit

Related details

Attention is currently required from:
  • Lusa Zhan
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: Iab9eaf7ad09eac746f576f54ce3919b488822404
Gerrit-Change-Number: 7772777
Gerrit-PatchSet: 3
Gerrit-Owner: Lusa Zhan <lusa...@chromium.org>
Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
Gerrit-CC: Fr <beaufort...@gmail.com>
Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
Gerrit-Attention: Lusa Zhan <lusa...@chromium.org>
Gerrit-Comment-Date: Mon, 20 Apr 2026 09:05:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Philip Pfaffe <pfa...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Lusa Zhan (Gerrit)

unread,
Apr 20, 2026, 7:24:43 PM (2 days ago) Apr 20
to Philip Pfaffe, Anders Hartvoll Ruud, Fr, chromium...@chromium.org, Khushal Sagar, blink-rev...@chromium.org, blink-...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Anders Hartvoll Ruud and Philip Pfaffe

Lusa Zhan added 3 comments

Commit Message
Line 9, Patchset 3:We should not emit issues for unsupported types.
Anders Hartvoll Ruud . unresolved

Not a strong opinion, but ... are you sure about that? You could look at this way:

 * A named form control group isn't supported -> "ISSUE: unsupported combination of form controls".
* A form control group is missing a name -> "ISSUE: you forgot the name".

These seem fair to warn about independently? (Or should one mistake cancel the other?)

Lusa Zhan

The description is a little poorly worded, actually.
"We should not emit issues for unsupported types." should be "we should not emit FormModelContextParameterMissingName for unsupported types".

1. A form control group is missing a name -> FormModelContextParameterMissingName
2. A named form control group isn't supported -> "ISSUE: unsupported combination of form controls". (we should consider adding this)
3. An unsupported from control group is missing a name -> no issue

I think having 3 be an issue would just introduce unnecessary noise. If a form control is not supported, why have an issue for it? If the dev adds a name, it still wouldn't be picked up by WebMCP right?

File third_party/blink/renderer/core/html/forms/form_mcp_schema.cc
Line 161, Patchset 3: if (!IsSupportedParameter(*element)) {
continue;
}
Anders Hartvoll Ruud . unresolved

This is not correct. We need to check the type against `it`, not `element`.

Lusa Zhan

Could you explain why?
I think for the empty name `""`, we do want the type check to be by element, since `name_to_controls_[""]` may include different types. All controls without a name get dumped into `name_to_controls_[""]` even if they're not really in a control group.

Line 1361, Patchset 3:bool FormMCPSchema::IsSupportedParameter(ListedElement& control) const {
Philip Pfaffe . resolved

How likely is this list to change? I.e., how likely is it that this introduces false positives or false negatives down the line, whenever a new type gets supported or unsupported?

Anders Hartvoll Ruud

Yeah, I think we should drop this and instead just do:

```
bool required_unused;
if (!ComputeParameterSchema("", required_unused)) {
// Don't emit an issue if the parameter is unsupported anyway.
return;
}
```
Lusa Zhan

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Anders Hartvoll Ruud
  • Philip Pfaffe
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: Iab9eaf7ad09eac746f576f54ce3919b488822404
Gerrit-Change-Number: 7772777
Gerrit-PatchSet: 5
Gerrit-Owner: Lusa Zhan <lusa...@chromium.org>
Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
Gerrit-CC: Fr <beaufort...@gmail.com>
Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Comment-Date: Mon, 20 Apr 2026 23:24:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Philip Pfaffe <pfa...@chromium.org>
Comment-In-Reply-To: Anders Hartvoll Ruud <and...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Anders Hartvoll Ruud (Gerrit)

unread,
Apr 21, 2026, 7:30:52 AM (yesterday) Apr 21
to Lusa Zhan, Philip Pfaffe, Fr, chromium...@chromium.org, Khushal Sagar, blink-rev...@chromium.org, blink-...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Lusa Zhan and Philip Pfaffe

Anders Hartvoll Ruud added 2 comments

Commit Message
Line 9, Patchset 3:We should not emit issues for unsupported types.
Anders Hartvoll Ruud . resolved

Not a strong opinion, but ... are you sure about that? You could look at this way:

 * A named form control group isn't supported -> "ISSUE: unsupported combination of form controls".
* A form control group is missing a name -> "ISSUE: you forgot the name".

These seem fair to warn about independently? (Or should one mistake cancel the other?)

Lusa Zhan

The description is a little poorly worded, actually.
"We should not emit issues for unsupported types." should be "we should not emit FormModelContextParameterMissingName for unsupported types".

1. A form control group is missing a name -> FormModelContextParameterMissingName
2. A named form control group isn't supported -> "ISSUE: unsupported combination of form controls". (we should consider adding this)
3. An unsupported from control group is missing a name -> no issue

I think having 3 be an issue would just introduce unnecessary noise. If a form control is not supported, why have an issue for it? If the dev adds a name, it still wouldn't be picked up by WebMCP right?

Anders Hartvoll Ruud

Marked as resolved.

File third_party/blink/renderer/core/html/forms/form_mcp_schema.cc
Line 161, Patchset 3: if (!IsSupportedParameter(*element)) {
continue;
}
Anders Hartvoll Ruud . unresolved

This is not correct. We need to check the type against `it`, not `element`.

Lusa Zhan

Could you explain why?
I think for the empty name `""`, we do want the type check to be by element, since `name_to_controls_[""]` may include different types. All controls without a name get dumped into `name_to_controls_[""]` even if they're not really in a control group.

Anders Hartvoll Ruud

Ah, OK, you want to treat each element as if it was intended as standing alone in a group.

We cannot generally answer the question "does this element constitute a valid parameter", because the answer depends on the other elements in the same group.

So `IsSupportedParameter(ListedElement&)` needs to be `IsSupportedParameter(const ControlVector&)` to stay consistent. I would just create the temporary vector at the call site, for now. (We can spanify this separately afterwards to make it nicer.)

Open in Gerrit

Related details

Attention is currently required from:
  • Lusa Zhan
  • Philip Pfaffe
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: Iab9eaf7ad09eac746f576f54ce3919b488822404
Gerrit-Change-Number: 7772777
Gerrit-PatchSet: 5
Gerrit-Owner: Lusa Zhan <lusa...@chromium.org>
Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
Gerrit-CC: Fr <beaufort...@gmail.com>
Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
Gerrit-Attention: Lusa Zhan <lusa...@chromium.org>
Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
Gerrit-Comment-Date: Tue, 21 Apr 2026 11:30:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Lusa Zhan <lusa...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Lusa Zhan (Gerrit)

unread,
Apr 21, 2026, 8:39:57 PM (11 hours ago) Apr 21
to Philip Pfaffe, Anders Hartvoll Ruud, Fr, chromium...@chromium.org, Khushal Sagar, blink-rev...@chromium.org, blink-...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Anders Hartvoll Ruud and Philip Pfaffe

Lusa Zhan added 1 comment

File third_party/blink/renderer/core/html/forms/form_mcp_schema.cc
Line 161, Patchset 3: if (!IsSupportedParameter(*element)) {
continue;
}
Anders Hartvoll Ruud . resolved

This is not correct. We need to check the type against `it`, not `element`.

Lusa Zhan

Could you explain why?
I think for the empty name `""`, we do want the type check to be by element, since `name_to_controls_[""]` may include different types. All controls without a name get dumped into `name_to_controls_[""]` even if they're not really in a control group.

Anders Hartvoll Ruud

Ah, OK, you want to treat each element as if it was intended as standing alone in a group.

We cannot generally answer the question "does this element constitute a valid parameter", because the answer depends on the other elements in the same group.

So `IsSupportedParameter(ListedElement&)` needs to be `IsSupportedParameter(const ControlVector&)` to stay consistent. I would just create the temporary vector at the call site, for now. (We can spanify this separately afterwards to make it nicer.)

Lusa Zhan

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Anders Hartvoll Ruud
  • Philip Pfaffe
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: Iab9eaf7ad09eac746f576f54ce3919b488822404
    Gerrit-Change-Number: 7772777
    Gerrit-PatchSet: 6
    Gerrit-Owner: Lusa Zhan <lusa...@chromium.org>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-CC: Fr <beaufort...@gmail.com>
    Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
    Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Comment-Date: Wed, 22 Apr 2026 00:39:48 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Anders Hartvoll Ruud (Gerrit)

    unread,
    3:28 AM (4 hours ago) 3:28 AM
    to Lusa Zhan, Philip Pfaffe, Fr, chromium...@chromium.org, Khushal Sagar, blink-rev...@chromium.org, blink-...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Lusa Zhan and Philip Pfaffe

    Anders Hartvoll Ruud voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Lusa Zhan
    • Philip Pfaffe
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not 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: Iab9eaf7ad09eac746f576f54ce3919b488822404
    Gerrit-Change-Number: 7772777
    Gerrit-PatchSet: 6
    Gerrit-Owner: Lusa Zhan <lusa...@chromium.org>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-CC: Fr <beaufort...@gmail.com>
    Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
    Gerrit-Attention: Lusa Zhan <lusa...@chromium.org>
    Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-Comment-Date: Wed, 22 Apr 2026 07:28:03 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages