[Platform-provided behaviors] Prevent subclassing of HTMLSubmitButtonBehavior [chromium/src : main]

0 views
Skip to first unread message

Ana Sollano Kim (Gerrit)

unread,
May 7, 2026, 4:58:45 PM (12 days ago) May 7
to Dan Clark, Mason Freed, Leo Lee, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Dan Clark

Ana Sollano Kim voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Dan Clark
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: If56e3107a384000e4ad08111d64520a01711bf5b
Gerrit-Change-Number: 7822122
Gerrit-PatchSet: 5
Gerrit-Owner: Ana Sollano Kim <anso...@microsoft.com>
Gerrit-Reviewer: Ana Sollano Kim <anso...@microsoft.com>
Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Leo Lee <leo...@microsoft.com>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Dan Clark <dan...@microsoft.com>
Gerrit-Comment-Date: Thu, 07 May 2026 20:58:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Dan Clark (Gerrit)

unread,
May 15, 2026, 12:22:00 PM (4 days ago) May 15
to Ana Sollano Kim, Andrey Kosyakov, Mason Freed, Leo Lee, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Ana Sollano Kim and Andrey Kosyakov

Dan Clark added 2 comments

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Dan Clark . resolved

caseq@ could you please review for `blink/renderer/bindings/OWNERS`?
You may also have an opinion on the question I had of whether this would be better as an interface-level or method-level extended attribute.

File third_party/blink/renderer/core/html/forms/html_submit_button_behavior.idl
Line 13, Patchset 5 (Latest): [MeasureAs=HTMLSubmitButtonBehaviorUsage, NotSubclassable] constructor();
Dan Clark . unresolved

I wonder if `[NotSubclassable]` should actually apply to the interface, not to the constructor itself. Conceptually that seems to be a better fit; we're describing something about the interface as a whole, not the constructor specifically. I think this is clearer when considering the case where a class has multiple constructor overloads; the way we're doing it here, `[NotSubclassable]` would have to be applied to each constructor, and it would be a bug if any were missed.

It's true that there's a comparison to `[HTMLConstructor]`, which does live on the constructor. But that's a little different since `[HTMLConstructor]` replaces the entire constructor with a [different algorithm](https://html.spec.whatwg.org/#htmlconstructor), whereas what we're doing here is just a check that happens to run before the normal constructor steps.

Open in Gerrit

Related details

Attention is currently required from:
  • Ana Sollano Kim
  • Andrey Kosyakov
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: If56e3107a384000e4ad08111d64520a01711bf5b
    Gerrit-Change-Number: 7822122
    Gerrit-PatchSet: 5
    Gerrit-Owner: Ana Sollano Kim <anso...@microsoft.com>
    Gerrit-Reviewer: Ana Sollano Kim <anso...@microsoft.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Leo Lee <leo...@microsoft.com>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Ana Sollano Kim <anso...@microsoft.com>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Comment-Date: Fri, 15 May 2026 16:21:49 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ana Sollano Kim (Gerrit)

    unread,
    May 18, 2026, 1:09:15 PM (16 hours ago) May 18
    to Andrey Kosyakov, Dan Clark, Mason Freed, Leo Lee, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
    Attention needed from Andrey Kosyakov and Dan Clark

    Ana Sollano Kim added 1 comment

    File third_party/blink/renderer/core/html/forms/html_submit_button_behavior.idl
    Line 13, Patchset 5: [MeasureAs=HTMLSubmitButtonBehaviorUsage, NotSubclassable] constructor();
    Dan Clark . resolved

    I wonder if `[NotSubclassable]` should actually apply to the interface, not to the constructor itself. Conceptually that seems to be a better fit; we're describing something about the interface as a whole, not the constructor specifically. I think this is clearer when considering the case where a class has multiple constructor overloads; the way we're doing it here, `[NotSubclassable]` would have to be applied to each constructor, and it would be a bug if any were missed.

    It's true that there's a comparison to `[HTMLConstructor]`, which does live on the constructor. But that's a little different since `[HTMLConstructor]` replaces the entire constructor with a [different algorithm](https://html.spec.whatwg.org/#htmlconstructor), whereas what we're doing here is just a check that happens to run before the normal constructor steps.

    Ana Sollano Kim

    I think this makes sense. I updated it to apply to the interface (same in the spec PR). Thanks for the suggestion.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrey Kosyakov
    • Dan Clark
    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: If56e3107a384000e4ad08111d64520a01711bf5b
      Gerrit-Change-Number: 7822122
      Gerrit-PatchSet: 7
      Gerrit-Owner: Ana Sollano Kim <anso...@microsoft.com>
      Gerrit-Reviewer: Ana Sollano Kim <anso...@microsoft.com>
      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-CC: Leo Lee <leo...@microsoft.com>
      Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
      Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Attention: Dan Clark <dan...@microsoft.com>
      Gerrit-Comment-Date: Mon, 18 May 2026 17:09:03 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Dan Clark <dan...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Dan Clark (Gerrit)

      unread,
      May 18, 2026, 3:52:14 PM (14 hours ago) May 18
      to Ana Sollano Kim, Andrey Kosyakov, Mason Freed, Leo Lee, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
      Attention needed from Ana Sollano Kim and Andrey Kosyakov

      Dan Clark voted and added 2 comments

      Votes added by Dan Clark

      Code-Review+1

      2 comments

      Patchset-level comments
      File-level comment, Patchset 7 (Latest):
      Dan Clark . resolved

      LGTM but I'd still like caseq@ to review for `renderer/bindings`.

      File third_party/blink/renderer/bindings/scripts/validator/rules/supported_extended_attributes.py
      Line 158, Patchset 7 (Latest): E("NotSubclassable", applicable_to=[T.INTERFACE]),
      Dan Clark . unresolved

      Nit: looks like these are alphabetized, so this should go after `NotEnumerable`.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ana Sollano Kim
      • Andrey Kosyakov
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: If56e3107a384000e4ad08111d64520a01711bf5b
      Gerrit-Change-Number: 7822122
      Gerrit-PatchSet: 7
      Gerrit-Owner: Ana Sollano Kim <anso...@microsoft.com>
      Gerrit-Reviewer: Ana Sollano Kim <anso...@microsoft.com>
      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-CC: Leo Lee <leo...@microsoft.com>
      Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
      Gerrit-Attention: Ana Sollano Kim <anso...@microsoft.com>
      Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Comment-Date: Mon, 18 May 2026 19:52:03 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Andrey Kosyakov (Gerrit)

      unread,
      May 18, 2026, 9:09:03 PM (8 hours ago) May 18
      to Ana Sollano Kim, Dan Clark, Mason Freed, Leo Lee, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
      Attention needed from Ana Sollano Kim

      Andrey Kosyakov added 2 comments

      Patchset-level comments
      File-level comment, Patchset 8 (Latest):
      Andrey Kosyakov . unresolved

      I'm a bit puzzled on what problem this is aiming to solve, considering we haven't done this historically for any other platform objects, can you elaborate on it a bit? What if a user creates an instance of HTMLSubmitButtonBehavior and then manually puts it on a prototype chain of a different object? Are there any security implications?
      Also, I assume if PlatformProvidedBehavior becomes a standard, we would also need to standardize the extended attrbute this is introducing, could you file some tracking issue for that in WebIDL spec?

      File third_party/blink/renderer/bindings/scripts/validator/rules/supported_extended_attributes.py
      Line 159, Patchset 8 (Latest): E("NotSubclassable", applicable_to=[T.INTERFACE]),
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ana Sollano Kim
      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: If56e3107a384000e4ad08111d64520a01711bf5b
        Gerrit-Change-Number: 7822122
        Gerrit-PatchSet: 8
        Gerrit-Owner: Ana Sollano Kim <anso...@microsoft.com>
        Gerrit-Reviewer: Ana Sollano Kim <anso...@microsoft.com>
        Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
        Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
        Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Leo Lee <leo...@microsoft.com>
        Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
        Gerrit-Attention: Ana Sollano Kim <anso...@microsoft.com>
        Gerrit-Comment-Date: Tue, 19 May 2026 01:08:52 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages