Add UseCounters for dynamic type changes on <button> and <input> [chromium/src : main]

0 views
Skip to first unread message

Ana Sollano Kim (Gerrit)

unread,
Mar 3, 2026, 12:08:21 PM (3 days ago) Mar 3
to Dan Clark, Leo Lee, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
Attention needed from Dan Clark and Leo Lee

Ana Sollano Kim added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Ana Sollano Kim . resolved

PTAL, thank you!

Open in Gerrit

Related details

Attention is currently required from:
  • Dan Clark
  • Leo Lee
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: Icdc9c74a13d0a6c0cc4e37a77075f0319a6b870f
Gerrit-Change-Number: 7624034
Gerrit-PatchSet: 1
Gerrit-Owner: Ana Sollano Kim <anso...@microsoft.com>
Gerrit-Reviewer: Ana Sollano Kim <anso...@microsoft.com>
Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Leo Lee <leo...@microsoft.com>
Gerrit-Attention: Dan Clark <dan...@microsoft.com>
Gerrit-Attention: Leo Lee <leo...@microsoft.com>
Gerrit-Comment-Date: Tue, 03 Mar 2026 17:08:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Ana Sollano Kim (Gerrit)

unread,
Mar 5, 2026, 12:41:44 PM (yesterday) Mar 5
to Mason Freed, Dan Clark, Leo Lee, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
Attention needed from Dan Clark, Leo Lee and Mason Freed

Ana Sollano Kim voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Dan Clark
  • Leo Lee
  • Mason Freed
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: Icdc9c74a13d0a6c0cc4e37a77075f0319a6b870f
Gerrit-Change-Number: 7624034
Gerrit-PatchSet: 2
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: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Leo Lee <leo...@microsoft.com>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Dan Clark <dan...@microsoft.com>
Gerrit-Attention: Leo Lee <leo...@microsoft.com>
Gerrit-Comment-Date: Thu, 05 Mar 2026 17:41:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Dan Clark (Gerrit)

unread,
Mar 5, 2026, 2:54:27 PM (yesterday) Mar 5
to Ana Sollano Kim, Mason Freed, Leo Lee, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
Attention needed from Ana Sollano Kim, Leo Lee and Mason Freed

Dan Clark voted and added 3 comments

Votes added by Dan Clark

Code-Review+1

3 comments

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

LGTM with small test suggestions.
There's a merge conflict too, probably the web_feature additions.

File third_party/blink/web_tests/fast/forms/button-type-change-usecounter.html
Line 20, Patchset 2 (Latest): button.setAttribute('type', 'button');
Dan Clark . unresolved

Other good test to add would be when these are set through the property (`button.type = 'button'`).

Line 21, Patchset 2 (Latest): container.appendChild(button);
Dan Clark . unresolved

nit: I suppose appending and removing the button is not really necessary for this test, although it's not hurting anything either.

Open in Gerrit

Related details

Attention is currently required from:
  • Ana Sollano Kim
  • Leo Lee
  • Mason Freed
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: Icdc9c74a13d0a6c0cc4e37a77075f0319a6b870f
    Gerrit-Change-Number: 7624034
    Gerrit-PatchSet: 2
    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: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Leo Lee <leo...@microsoft.com>
    Gerrit-Attention: Ana Sollano Kim <anso...@microsoft.com>
    Gerrit-Attention: Mason Freed <mas...@chromium.org>
    Gerrit-Attention: Leo Lee <leo...@microsoft.com>
    Gerrit-Comment-Date: Thu, 05 Mar 2026 19:54:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mason Freed (Gerrit)

    unread,
    3:29 PM (8 hours ago) 3:29 PM
    to Ana Sollano Kim, Dan Clark, Leo Lee, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
    Attention needed from Ana Sollano Kim and Leo Lee

    Mason Freed voted and added 2 comments

    Votes added by Mason Freed

    Code-Review+1

    2 comments

    Patchset-level comments
    File-level comment, Patchset 3 (Latest):
    Mason Freed . resolved

    LGTM!

    File third_party/blink/web_tests/fast/forms/button-type-change-usecounter.html
    Line 20, Patchset 2: button.setAttribute('type', 'button');
    Dan Clark . unresolved

    Other good test to add would be when these are set through the property (`button.type = 'button'`).

    Mason Freed

    +1

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ana Sollano Kim
    • Leo Lee
    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: Icdc9c74a13d0a6c0cc4e37a77075f0319a6b870f
    Gerrit-Change-Number: 7624034
    Gerrit-PatchSet: 3
    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: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Leo Lee <leo...@microsoft.com>
    Gerrit-Attention: Ana Sollano Kim <anso...@microsoft.com>
    Gerrit-Attention: Leo Lee <leo...@microsoft.com>
    Gerrit-Comment-Date: Fri, 06 Mar 2026 20:28:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Dan Clark <dan...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ana Sollano Kim (Gerrit)

    unread,
    5:58 PM (5 hours ago) 5:58 PM
    to Mason Freed, Dan Clark, Leo Lee, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
    Attention needed from Ana Sollano Kim and Leo Lee

    Ana Sollano Kim voted and added 2 comments

    Votes added by Ana Sollano Kim

    Commit-Queue+1

    2 comments

    File third_party/blink/web_tests/fast/forms/button-type-change-usecounter.html
    Line 20, Patchset 2: button.setAttribute('type', 'button');
    Dan Clark . resolved

    Other good test to add would be when these are set through the property (`button.type = 'button'`).

    Ana Sollano Kim

    Done

    Line 21, Patchset 2: container.appendChild(button);
    Dan Clark . resolved

    nit: I suppose appending and removing the button is not really necessary for this test, although it's not hurting anything either.

    Ana Sollano Kim

    Thanks, I missed this. Updated tests.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ana Sollano Kim
    • Leo Lee
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: Icdc9c74a13d0a6c0cc4e37a77075f0319a6b870f
      Gerrit-Change-Number: 7624034
      Gerrit-PatchSet: 3
      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: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Leo Lee <leo...@microsoft.com>
      Gerrit-Attention: Ana Sollano Kim <anso...@microsoft.com>
      Gerrit-Attention: Leo Lee <leo...@microsoft.com>
      Gerrit-Comment-Date: Fri, 06 Mar 2026 22:57:52 +0000
      satisfied_requirement
      open
      diffy

      Ana Sollano Kim (Gerrit)

      unread,
      5:58 PM (5 hours ago) 5:58 PM
      to Mason Freed, Dan Clark, Leo Lee, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
      Attention needed from Leo Lee

      Ana Sollano Kim voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Leo Lee
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: Icdc9c74a13d0a6c0cc4e37a77075f0319a6b870f
      Gerrit-Change-Number: 7624034
      Gerrit-PatchSet: 3
      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: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Leo Lee <leo...@microsoft.com>
      Gerrit-Attention: Leo Lee <leo...@microsoft.com>
      Gerrit-Comment-Date: Fri, 06 Mar 2026 22:58:07 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Ana Sollano Kim (Gerrit)

      unread,
      6:52 PM (4 hours ago) 6:52 PM
      to Mason Freed, Dan Clark, Leo Lee, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
      Attention needed from Leo Lee

      Ana Sollano Kim voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Leo Lee
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: Icdc9c74a13d0a6c0cc4e37a77075f0319a6b870f
      Gerrit-Change-Number: 7624034
      Gerrit-PatchSet: 4
      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: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Leo Lee <leo...@microsoft.com>
      Gerrit-Attention: Leo Lee <leo...@microsoft.com>
      Gerrit-Comment-Date: Fri, 06 Mar 2026 23:52:07 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      8:35 PM (3 hours ago) 8:35 PM
      to Ana Sollano Kim, Mason Freed, Dan Clark, Leo Lee, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org

      Chromium LUCI CQ submitted the change with unreviewed changes

      Unreviewed changes

      3 is the latest approved patch-set.
      The change was submitted with unreviewed changes in the following files:

      ```
      The name of the file: third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom
      Insertions: 5, Deletions: 4.

      The diff is too large to show. Please review the diff.
      ```
      ```
      The name of the file: tools/metrics/histograms/metadata/blink/enums.xml
      Insertions: 5, Deletions: 4.

      The diff is too large to show. Please review the diff.
      ```
      ```
      The name of the file: third_party/blink/web_tests/fast/forms/button-type-change-usecounter.html
      Insertions: 2, Deletions: 2.

      The diff is too large to show. Please review the diff.
      ```
      ```
      The name of the file: third_party/blink/web_tests/fast/forms/input-type-change-usecounter.html
      Insertions: 2, Deletions: 2.

      The diff is too large to show. Please review the diff.
      ```

      Change information

      Commit message:
      Add UseCounters for dynamic type changes on <button> and <input>

      This CL adds UseCounters to measure how frequently the type attribute
      of <button> and <input> elements is changed after creation, both while
      the element is connected and disconnected to the DOM.

      New entries added:
      - kHTMLButtonElementTypeChangedWhileConnected
      - kHTMLInputElementTypeChangedWhileConnected
      - kHTMLButtonElementTypeChangedWhileDisconnected
      - kHTMLInputElementTypeChangedWhileDisconnected

      Parser-set attributes are excluded via the AttributeModificationReason
      check.

      This data will help inform the design of the Platform-Provided
      Behaviors proposal [1], specifically whether restricting behaviors
      to be immutable after element creation is a practical constraint
      given real-world usage patterns.

      [1] https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/PlatformProvidedBehaviors/explainer.md
      Bug: 486928684
      Change-Id: Icdc9c74a13d0a6c0cc4e37a77075f0319a6b870f
      Commit-Queue: Ana Sollano Kim <anso...@microsoft.com>
      Reviewed-by: Dan Clark <dan...@microsoft.com>
      Reviewed-by: Mason Freed <mas...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1595827}
      Files:
      • M third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom
      • M third_party/blink/renderer/core/html/forms/html_button_element.cc
      • M third_party/blink/renderer/core/html/forms/html_input_element.cc
      • A third_party/blink/web_tests/fast/forms/button-type-change-usecounter.html
      • A third_party/blink/web_tests/fast/forms/input-type-change-usecounter.html
      • M tools/metrics/histograms/metadata/blink/enums.xml
      Change size: L
      Delta: 6 files changed, 286 insertions(+), 4 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Dan Clark, +1 by Mason Freed
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Icdc9c74a13d0a6c0cc4e37a77075f0319a6b870f
      Gerrit-Change-Number: 7624034
      Gerrit-PatchSet: 5
      Gerrit-Owner: Ana Sollano Kim <anso...@microsoft.com>
      Gerrit-Reviewer: Ana Sollano Kim <anso...@microsoft.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages