[CoCE] Usermedia element should infer its type from its constraints [chromium/src : main]

0 views
Skip to first unread message

Joey Arhar (Gerrit)

unread,
Mar 31, 2026, 8:25:16 PM (2 days ago) Mar 31
to Ravjit Uppal, Chromium LUCI CQ, srirama chandra sekhar, AyeAye, blink-rev...@chromium.org, eric.c...@apple.com, tommyw+w...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org
Attention needed from Ravjit Uppal

Joey Arhar voted and added 1 comment

Votes added by Joey Arhar

Code-Review+1

1 comment

File third_party/blink/renderer/core/html/html_user_media_element.cc
Line 91, Patchset 2 (Latest): // If permission descriptors are already set, we do not need to update them.
if (!permission_descriptors_.empty()) {
return;
}
Joey Arhar . unresolved

When does this happen? Could you explain in the comment?

Open in Gerrit

Related details

Attention is currently required from:
  • Ravjit Uppal
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: Id41749a4d463584998e670d7cbc1cebdbbcf3ba8
Gerrit-Change-Number: 7718421
Gerrit-PatchSet: 2
Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
Gerrit-Comment-Date: Wed, 01 Apr 2026 00:25:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Ravjit Uppal (Gerrit)

unread,
Mar 31, 2026, 9:01:54 PM (2 days ago) Mar 31
to Chromium LUCI CQ, srirama chandra sekhar, AyeAye, blink-rev...@chromium.org, eric.c...@apple.com, tommyw+w...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org

Ravjit Uppal voted and added 1 comment

Votes added by Ravjit Uppal

Commit-Queue+2

1 comment

File third_party/blink/renderer/core/html/html_user_media_element.cc
Line 91, Patchset 2: // If permission descriptors are already set, we do not need to update them.
if (!permission_descriptors_.empty()) {
return;
}
Joey Arhar . resolved

When does this happen? Could you explain in the comment?

Ravjit Uppal

Done

Open in Gerrit

Related details

Attention set is empty
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: Id41749a4d463584998e670d7cbc1cebdbbcf3ba8
    Gerrit-Change-Number: 7718421
    Gerrit-PatchSet: 3
    Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
    Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Comment-Date: Wed, 01 Apr 2026 01:01:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Joey Arhar <jar...@chromium.org>
    satisfied_requirement
    open
    diffy

    Ravjit Uppal (Gerrit)

    unread,
    Mar 31, 2026, 9:17:53 PM (2 days ago) Mar 31
    to Chromium LUCI CQ, srirama chandra sekhar, AyeAye, blink-rev...@chromium.org, eric.c...@apple.com, tommyw+w...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org

    Ravjit Uppal voted Commit-Queue+0

    Commit-Queue+0
    Open in Gerrit

    Related details

    Attention set is empty
    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: Id41749a4d463584998e670d7cbc1cebdbbcf3ba8
    Gerrit-Change-Number: 7718421
    Gerrit-PatchSet: 3
    Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
    Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Comment-Date: Wed, 01 Apr 2026 01:17:34 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Ravjit Uppal (Gerrit)

    unread,
    Mar 31, 2026, 9:51:35 PM (2 days ago) Mar 31
    to Chromium LUCI CQ, srirama chandra sekhar, AyeAye, blink-rev...@chromium.org, eric.c...@apple.com, tommyw+w...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org
    Attention needed from Joey Arhar

    Ravjit Uppal added 1 comment

    Patchset-level comments
    File-level comment, Patchset 4 (Latest):
    Ravjit Uppal . resolved

    Hi Joey, I realized there was a flaw in my logic with the constraints.
    I have fixed it and added WPT to ensure the code works as intended end to end

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Joey Arhar
    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: Id41749a4d463584998e670d7cbc1cebdbbcf3ba8
    Gerrit-Change-Number: 7718421
    Gerrit-PatchSet: 4
    Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
    Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Attention: Joey Arhar <jar...@chromium.org>
    Gerrit-Comment-Date: Wed, 01 Apr 2026 01:51:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Joey Arhar (Gerrit)

    unread,
    Apr 1, 2026, 12:37:53 PM (18 hours ago) Apr 1
    to Ravjit Uppal, Chromium LUCI CQ, srirama chandra sekhar, AyeAye, blink-revie...@chromium.org, blink-rev...@chromium.org, eric.c...@apple.com, tommyw+w...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org
    Attention needed from Ravjit Uppal

    Joey Arhar voted and added 1 comment

    Votes added by Joey Arhar

    Code-Review+1

    1 comment

    File third_party/blink/renderer/core/html/html_user_media_element.cc
    Line 91, Patchset 5 (Latest): // If permission descriptors are already set, we do not need to update them.
    // This would be the case for legacy mode when the 'type' attribute is set.
    // We do not want to update the permission descriptors in this case as type
    // attribute is supposed to take precedence.
    Joey Arhar . unresolved

    So when we aren't in legacy mode, this method will never be called twice with different parameters?

    It just seems error prone to have this method sort of silently not update permission_descriptors_

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ravjit Uppal
    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: Id41749a4d463584998e670d7cbc1cebdbbcf3ba8
    Gerrit-Change-Number: 7718421
    Gerrit-PatchSet: 5
    Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
    Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Comment-Date: Wed, 01 Apr 2026 16:37:41 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ravjit Uppal (Gerrit)

    unread,
    Apr 1, 2026, 12:44:05 PM (18 hours ago) Apr 1
    to Chromium LUCI CQ, srirama chandra sekhar, AyeAye, blink-revie...@chromium.org, blink-rev...@chromium.org, eric.c...@apple.com, tommyw+w...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org
    Attention needed from Joey Arhar

    Ravjit Uppal added 1 comment

    File third_party/blink/renderer/core/html/html_user_media_element.cc
    Line 91, Patchset 5 (Latest): // If permission descriptors are already set, we do not need to update them.
    // This would be the case for legacy mode when the 'type' attribute is set.
    // We do not want to update the permission descriptors in this case as type
    // attribute is supposed to take precedence.
    Joey Arhar . unresolved

    So when we aren't in legacy mode, this method will never be called twice with different parameters?

    It just seems error prone to have this method sort of silently not update permission_descriptors_

    Ravjit Uppal

    Yeah we don't allow changing the constraints. This might change in the future though.
    The check is already enforced in the IDL method here:
    https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/mediastream/user_media_element_constraints.cc;l=133;drc=1a28294cae4ea62bb770dba758c8af95e41a59cf

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Joey Arhar
    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: Id41749a4d463584998e670d7cbc1cebdbbcf3ba8
    Gerrit-Change-Number: 7718421
    Gerrit-PatchSet: 5
    Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
    Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Attention: Joey Arhar <jar...@chromium.org>
    Gerrit-Comment-Date: Wed, 01 Apr 2026 16:43:48 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Joey Arhar <jar...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ravjit Uppal (Gerrit)

    unread,
    Apr 1, 2026, 1:39:19 PM (17 hours ago) Apr 1
    to Chromium LUCI CQ, srirama chandra sekhar, AyeAye, blink-revie...@chromium.org, blink-rev...@chromium.org, eric.c...@apple.com, tommyw+w...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org
    Attention needed from Joey Arhar

    Ravjit Uppal added 1 comment

    File third_party/blink/renderer/core/html/html_user_media_element.cc
    Line 91, Patchset 5 (Latest): // If permission descriptors are already set, we do not need to update them.
    // This would be the case for legacy mode when the 'type' attribute is set.
    // We do not want to update the permission descriptors in this case as type
    // attribute is supposed to take precedence.
    Joey Arhar . resolved

    So when we aren't in legacy mode, this method will never be called twice with different parameters?

    It just seems error prone to have this method sort of silently not update permission_descriptors_

    Ravjit Uppal

    Yeah we don't allow changing the constraints. This might change in the future though.
    The check is already enforced in the IDL method here:
    https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/mediastream/user_media_element_constraints.cc;l=133;drc=1a28294cae4ea62bb770dba758c8af95e41a59cf

    Ravjit Uppal

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Joey Arhar
    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: Id41749a4d463584998e670d7cbc1cebdbbcf3ba8
      Gerrit-Change-Number: 7718421
      Gerrit-PatchSet: 5
      Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
      Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
      Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
      Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
      Gerrit-Attention: Joey Arhar <jar...@chromium.org>
      Gerrit-Comment-Date: Wed, 01 Apr 2026 17:39:00 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Ravjit Uppal <rav...@chromium.org>
      Comment-In-Reply-To: Joey Arhar <jar...@chromium.org>
      satisfied_requirement
      open
      diffy

      Blink W3C Test Autoroller (Gerrit)

      unread,
      Apr 1, 2026, 2:03:36 PM (16 hours ago) Apr 1
      to Ravjit Uppal, Chromium LUCI CQ, srirama chandra sekhar, AyeAye, blink-revie...@chromium.org, blink-rev...@chromium.org, eric.c...@apple.com, tommyw+w...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org
      Attention needed from Joey Arhar

      Message from Blink W3C Test Autoroller

      Exportable changes to web-platform-tests were detected in this CL and a pull request in the upstream repo has been made: https://github.com/web-platform-tests/wpt/pull/58916.

      When this CL lands, the bot will automatically merge the PR on GitHub if the required GitHub checks pass; otherwise, ecosystem-infra@ team will triage the failures and may contact you.

      WPT Export docs:
      https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md#Automatic-export-process

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Joey Arhar
      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: Id41749a4d463584998e670d7cbc1cebdbbcf3ba8
      Gerrit-Change-Number: 7718421
      Gerrit-PatchSet: 5
      Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
      Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
      Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
      Gerrit-Attention: Joey Arhar <jar...@chromium.org>
      Gerrit-Comment-Date: Wed, 01 Apr 2026 18:03:20 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Apr 1, 2026, 3:58:56 PM (14 hours ago) Apr 1
      to Ravjit Uppal, Blink W3C Test Autoroller, srirama chandra sekhar, AyeAye, blink-revie...@chromium.org, blink-rev...@chromium.org, eric.c...@apple.com, tommyw+w...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      [CoCE] Usermedia element should infer its type from its constraints

      Usermedia element relied on the type attribute to decide if it will have
      camera and/or microphone capabilities. Now it is also possible to infer
      the type from the MediaStreamConstraints set on the element.

      This only happens when the type attribute is missing, because type
      attribute takes precedence.
      Bug: 498229142
      Change-Id: Id41749a4d463584998e670d7cbc1cebdbbcf3ba8
      Reviewed-by: Joey Arhar <jar...@chromium.org>
      Commit-Queue: Ravjit Uppal <rav...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1608733}
      Files:
      • M third_party/blink/renderer/core/html/html_capability_element_base.cc
      • M third_party/blink/renderer/core/html/html_capability_element_base.h
      • M third_party/blink/renderer/core/html/html_user_media_element.cc
      • M third_party/blink/renderer/core/html/html_user_media_element.h
      • M third_party/blink/renderer/core/html/html_user_media_element_test.cc
      • M third_party/blink/renderer/core/html/user_media_request_provider.h
      • M third_party/blink/renderer/modules/mediastream/user_media_element_constraints.cc
      • M third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.cc
      • M third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.h
      • M third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl_test.cc
      • A third_party/blink/web_tests/external/wpt/html/semantics/permission-element/usermedia/usermedia-constraints-descriptors.tentative.html
      Change size: M
      Delta: 11 files changed, 160 insertions(+), 19 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Joey Arhar
      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: Id41749a4d463584998e670d7cbc1cebdbbcf3ba8
      Gerrit-Change-Number: 7718421
      Gerrit-PatchSet: 6
      Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
      Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
      open
      diffy
      satisfied_requirement

      Blink W3C Test Autoroller (Gerrit)

      unread,
      Apr 1, 2026, 4:26:53 PM (14 hours ago) Apr 1
      to Ravjit Uppal, Chromium LUCI CQ, srirama chandra sekhar, AyeAye, blink-revie...@chromium.org, blink-rev...@chromium.org, eric.c...@apple.com, tommyw+w...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org

      Message from Blink W3C Test Autoroller

      The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/58916

      Open in Gerrit

      Related details

      Attention set is empty
      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: Id41749a4d463584998e670d7cbc1cebdbbcf3ba8
      Gerrit-Change-Number: 7718421
      Gerrit-PatchSet: 6
      Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
      Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
      Gerrit-Comment-Date: Wed, 01 Apr 2026 20:26:45 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages