[CoCE] Integrate MediaStream into the <usermedia> element [chromium/src : main]

38 views
Skip to first unread message

Ravjit Uppal (Gerrit)

unread,
Mar 12, 2026, 10:53:13 AMMar 12
to Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@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 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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
Gerrit-Change-Number: 7619474
Gerrit-PatchSet: 8
Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Comment-Date: Thu, 12 Mar 2026 14:52:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Ravjit Uppal (Gerrit)

unread,
Mar 19, 2026, 10:28:40 AM (14 days ago) Mar 19
to Thomas Nguyen, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
Attention needed from Thomas Nguyen

Ravjit Uppal added 1 comment

File third_party/blink/renderer/core/html/html_user_media_element.cc
Line 137, Patchset 16 (Latest): if (event.type() == event_type_names::kDOMActivate && PermissionsGranted()) {
Ravjit Uppal . unresolved

So && !IsLegacyMode() here for now right? @tun...@chromium.org

Open in Gerrit

Related details

Attention is currently required from:
  • Thomas Nguyen
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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
    Gerrit-Change-Number: 7619474
    Gerrit-PatchSet: 16
    Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-CC: Thomas Nguyen <tun...@chromium.org>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Attention: Thomas Nguyen <tun...@chromium.org>
    Gerrit-Comment-Date: Thu, 19 Mar 2026 14:28:26 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Thomas Nguyen (Gerrit)

    unread,
    Mar 19, 2026, 10:33:05 AM (14 days ago) Mar 19
    to Ravjit Uppal, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
    Attention needed from Ravjit Uppal

    Thomas Nguyen added 1 comment

    File third_party/blink/renderer/core/html/html_user_media_element.cc
    Line 137, Patchset 16 (Latest): if (event.type() == event_type_names::kDOMActivate && PermissionsGranted()) {
    Ravjit Uppal . resolved

    So && !IsLegacyMode() here for now right? @tun...@chromium.org

    Thomas Nguyen

    Yes, it's what we are going to support.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ravjit Uppal
    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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
      Gerrit-Change-Number: 7619474
      Gerrit-PatchSet: 16
      Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
      Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
      Gerrit-CC: Thomas Nguyen <tun...@chromium.org>
      Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
      Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
      Gerrit-Comment-Date: Thu, 19 Mar 2026 14:32:46 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Ravjit Uppal <rav...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Ravjit Uppal (Gerrit)

      unread,
      Mar 19, 2026, 10:41:02 AM (14 days ago) Mar 19
      to Thomas Nguyen, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org

      Ravjit Uppal added 1 comment

      File third_party/blink/renderer/core/html/html_user_media_element.cc
      Line 137, Patchset 16 (Latest): if (event.type() == event_type_names::kDOMActivate && PermissionsGranted()) {
      Ravjit Uppal . resolved

      So && !IsLegacyMode() here for now right? @tun...@chromium.org

      Ravjit Uppal

      N/A. Discussed offline: We will update it later.

      Open in Gerrit

      Related details

      Attention set is empty
      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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
      Gerrit-Change-Number: 7619474
      Gerrit-PatchSet: 16
      Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
      Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
      Gerrit-CC: Thomas Nguyen <tun...@chromium.org>
      Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
      Gerrit-Comment-Date: Thu, 19 Mar 2026 14:40:50 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Guido Urdaneta (Gerrit)

      unread,
      Mar 19, 2026, 11:04:05 AM (14 days ago) Mar 19
      to Ravjit Uppal, Thomas Nguyen, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
      Attention needed from Ravjit Uppal and Thomas Nguyen

      Guido Urdaneta added 4 comments

      File third_party/blink/renderer/core/html/html_user_media_element.h
      Line 58, Patchset 16 (Latest): Member<MediaStreamDescriptor> stream_descriptor_;
      Guido Urdaneta . unresolved

      You should cache a MediaStream, not a descriptor (see comment below).
      It should be possible to delegate this to HTMLUserMediaElementMediaStream and let the code in modules/mediastream handle it.

      Line 53, Patchset 16 (Latest): return stream_descriptor_.Get();
      Guido Urdaneta . unresolved

      Can you delegate this to HTMLUserMediaElementMediaStream?
      After all, you're using GetDescriptor and SetDescriptor only from HTMLUserMediaElementMediaStream, so you don't really need these methods here.

      File third_party/blink/renderer/core/html/html_user_media_element.cc
      Line 163, Patchset 16 (Latest): if (stream_descriptor_ && stream_descriptor_->Active()) {
      Guido Urdaneta . unresolved

      You can delegate this check to provider->StartRequest(), so that you don't need the descriptor here.

      File third_party/blink/renderer/modules/mediastream/html_user_media_element_media_stream.cc
      Line 20, Patchset 16 (Latest): return MediaStream::Create(element.GetExecutionContext(), descriptor);
      Guido Urdaneta . unresolved

      You should cache the MediaStream once created and return it, not create a new one every time.
      If you ever need the descriptor, you can get it from the MediaStream.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ravjit Uppal
      • Thomas Nguyen
      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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
        Gerrit-Change-Number: 7619474
        Gerrit-PatchSet: 16
        Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
        Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
        Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
        Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Attention: Thomas Nguyen <tun...@chromium.org>
        Gerrit-Comment-Date: Thu, 19 Mar 2026 15:03:49 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Ravjit Uppal (Gerrit)

        unread,
        Mar 19, 2026, 12:57:08 PM (14 days ago) Mar 19
        to Thomas Nguyen, Guido Urdaneta, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
        Attention needed from Guido Urdaneta and Thomas Nguyen

        Ravjit Uppal voted and added 4 comments

        Votes added by Ravjit Uppal

        Commit-Queue+1

        4 comments

        File third_party/blink/renderer/core/html/html_user_media_element.h
        Line 58, Patchset 16: Member<MediaStreamDescriptor> stream_descriptor_;
        Guido Urdaneta . resolved

        You should cache a MediaStream, not a descriptor (see comment below).
        It should be possible to delegate this to HTMLUserMediaElementMediaStream and let the code in modules/mediastream handle it.

        Ravjit Uppal

        Done

        Line 53, Patchset 16: return stream_descriptor_.Get();
        Guido Urdaneta . resolved

        Can you delegate this to HTMLUserMediaElementMediaStream?
        After all, you're using GetDescriptor and SetDescriptor only from HTMLUserMediaElementMediaStream, so you don't really need these methods here.

        Ravjit Uppal

        Done

        File third_party/blink/renderer/core/html/html_user_media_element.cc
        Line 163, Patchset 16: if (stream_descriptor_ && stream_descriptor_->Active()) {
        Guido Urdaneta . resolved

        You can delegate this check to provider->StartRequest(), so that you don't need the descriptor here.

        Ravjit Uppal

        Done

        File third_party/blink/renderer/modules/mediastream/html_user_media_element_media_stream.cc
        Line 20, Patchset 16: return MediaStream::Create(element.GetExecutionContext(), descriptor);
        Guido Urdaneta . unresolved

        You should cache the MediaStream once created and return it, not create a new one every time.
        If you ever need the descriptor, you can get it from the MediaStream.

        Ravjit Uppal

        Added caching logic in third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.cc @line 78

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Guido Urdaneta
        • Thomas Nguyen
        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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
        Gerrit-Change-Number: 7619474
        Gerrit-PatchSet: 17
        Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
        Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
        Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
        Gerrit-Attention: Thomas Nguyen <tun...@chromium.org>
        Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
        Gerrit-Comment-Date: Thu, 19 Mar 2026 16:56:52 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Guido Urdaneta <gui...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Guido Urdaneta (Gerrit)

        unread,
        Mar 19, 2026, 2:59:08 PM (14 days ago) Mar 19
        to Ravjit Uppal, Thomas Nguyen, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
        Attention needed from Ravjit Uppal and Thomas Nguyen

        Guido Urdaneta added 3 comments

        Patchset-level comments
        File-level comment, Patchset 17 (Latest):
        Guido Urdaneta . unresolved

        mediastream code lgtm, but can you add unit tests?

        File third_party/blink/renderer/modules/mediastream/html_user_media_element_media_stream.cc
        Line 20, Patchset 16: return MediaStream::Create(element.GetExecutionContext(), descriptor);
        Guido Urdaneta . resolved

        You should cache the MediaStream once created and return it, not create a new one every time.
        If you ever need the descriptor, you can get it from the MediaStream.

        Ravjit Uppal

        Added caching logic in third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.cc @line 78

        Guido Urdaneta

        Acknowledged

        File third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.cc
        Line 77, Patchset 17 (Latest): MediaStream* existing_stream = HTMLUserMediaElementMediaStream::stream(*element);
        Guido Urdaneta . unresolved

        80 columns?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Ravjit Uppal
        • Thomas Nguyen
        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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
        Gerrit-Change-Number: 7619474
        Gerrit-PatchSet: 17
        Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
        Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
        Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
        Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Attention: Thomas Nguyen <tun...@chromium.org>
        Gerrit-Comment-Date: Thu, 19 Mar 2026 18:58:57 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Ravjit Uppal <rav...@chromium.org>
        Comment-In-Reply-To: Guido Urdaneta <gui...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Thomas Nguyen (Gerrit)

        unread,
        Mar 23, 2026, 6:28:27 AM (10 days ago) Mar 23
        to Ravjit Uppal, Guido Urdaneta, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
        Attention needed from Ravjit Uppal

        Thomas Nguyen added 8 comments

        File third_party/blink/renderer/bindings/idl_in_modules.gni
        Line 471, Patchset 17 (Latest): "//third_party/blink/renderer/modules/mediastream/html_user_media_element_media_stream.idl",
        Thomas Nguyen . unresolved

        I think we should rename to `user_media_element_stream` to match with naming in other partial interface `user_media_element_constraints`, in the same folder.

        Or change the `user_media_element_constraints` to `html_user_media_element_constraints`
        Can do it in a follow-up

        File third_party/blink/renderer/core/html/html_user_media_element.cc
        Line 128, Patchset 17 (Latest): if (PermissionsGranted()) {
        Thomas Nguyen . unresolved

        At this point, we will not trigger stream-acquisition without user interaction. We only consider the logic in the next phase.

        Line 135, Patchset 17 (Latest): if (event.type() == event_type_names::kDOMActivate && PermissionsGranted()) {
        Thomas Nguyen . unresolved

        Please add a TODO here regarding the migration path (the intercorrelation between type attribute and stored constraints)

        Line 155, Patchset 17 (Latest): if (GetDocument().domWindow()) {
        Thomas Nguyen . unresolved

        See comment bellow, we can move to use ExecutionContext

        File third_party/blink/renderer/core/html/user_media_request_provider.h
        Line 18, Patchset 17 (Latest): : public Supplement<LocalDOMWindow> {
        Thomas Nguyen . unresolved

        It's better to be a supplement of `ExecutionContext`. In the past, we had some crashes regarding null `LocalDOMWindow` and we moved to `ExecutionContext` instead.

        File third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.cc
        Line 54, Patchset 17 (Latest):void UserMediaRequestProviderImpl::ProvideTo(LocalDOMWindow& window) {
        Thomas Nguyen . unresolved

        `ExecutionContext`

        Line 67, Patchset 17 (Latest): LocalDOMWindow* window = element->GetDocument().domWindow();
        Thomas Nguyen . unresolved

        Ditto, move to ExecutionContext

        Line 83, Patchset 17 (Latest): MediaConstraints audio_constraints;
        Thomas Nguyen . unresolved

        Please add a TODO to use the stored constraints from the element. Note we also need to revise the constraints based on the type attribute (can be in a follow-up)

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Ravjit Uppal
        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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
        Gerrit-Change-Number: 7619474
        Gerrit-PatchSet: 17
        Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
        Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
        Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
        Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Comment-Date: Mon, 23 Mar 2026 10:28:13 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Ravjit Uppal (Gerrit)

        unread,
        Mar 24, 2026, 2:07:43 PM (9 days ago) Mar 24
        to Thomas Nguyen, Guido Urdaneta, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
        Attention needed from Guido Urdaneta and Thomas Nguyen

        Ravjit Uppal added 7 comments

        Patchset-level comments
        File-level comment, Patchset 17:
        Guido Urdaneta . resolved

        mediastream code lgtm, but can you add unit tests?

        Ravjit Uppal

        Added some tests to check for null pointers, caching and stream setting.

        File third_party/blink/renderer/bindings/idl_in_modules.gni
        Line 471, Patchset 17: "//third_party/blink/renderer/modules/mediastream/html_user_media_element_media_stream.idl",
        Thomas Nguyen . resolved

        I think we should rename to `user_media_element_stream` to match with naming in other partial interface `user_media_element_constraints`, in the same folder.

        Or change the `user_media_element_constraints` to `html_user_media_element_constraints`
        Can do it in a follow-up

        Ravjit Uppal

        ack

        File third_party/blink/renderer/core/html/html_user_media_element.cc
        Line 128, Patchset 17: if (PermissionsGranted()) {
        Thomas Nguyen . resolved

        At this point, we will not trigger stream-acquisition without user interaction. We only consider the logic in the next phase.

        Ravjit Uppal

        Done

        Line 135, Patchset 17: if (event.type() == event_type_names::kDOMActivate && PermissionsGranted()) {
        Thomas Nguyen . resolved

        Please add a TODO here regarding the migration path (the intercorrelation between type attribute and stored constraints)

        Ravjit Uppal

        Done

        File third_party/blink/renderer/core/html/user_media_request_provider.h
        Line 18, Patchset 17: : public Supplement<LocalDOMWindow> {
        Thomas Nguyen . unresolved

        It's better to be a supplement of `ExecutionContext`. In the past, we had some crashes regarding null `LocalDOMWindow` and we moved to `ExecutionContext` instead.

        Ravjit Uppal

        Wondering what could cause it as <usermedia> only exist in the DOM, meaning they will never exist inside Service Workers or Dedicated Workers(where execution context is non null, but LocalDOMWindow is null)
        Also LocalDOMWindow is needed to fetch UserMediaClient
        https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/mediastream/user_media_client.h;l=65;drc=926943cad55d11056856e35487b1a0d19af4d579

        File third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.cc
        Line 77, Patchset 17: MediaStream* existing_stream = HTMLUserMediaElementMediaStream::stream(*element);
        Guido Urdaneta . resolved

        80 columns?

        Ravjit Uppal

        Done

        Line 83, Patchset 17: MediaConstraints audio_constraints;
        Thomas Nguyen . resolved

        Please add a TODO to use the stored constraints from the element. Note we also need to revise the constraints based on the type attribute (can be in a follow-up)

        Ravjit Uppal

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Guido Urdaneta
        • Thomas Nguyen
        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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
        Gerrit-Change-Number: 7619474
        Gerrit-PatchSet: 18
        Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
        Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
        Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
        Gerrit-Attention: Thomas Nguyen <tun...@chromium.org>
        Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
        Gerrit-Comment-Date: Tue, 24 Mar 2026 18:07:26 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Thomas Nguyen <tun...@chromium.org>
        Comment-In-Reply-To: Guido Urdaneta <gui...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Thomas Nguyen (Gerrit)

        unread,
        Mar 24, 2026, 4:21:38 PM (9 days ago) Mar 24
        to Ravjit Uppal, Guido Urdaneta, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
        Attention needed from Guido Urdaneta and Ravjit Uppal

        Thomas Nguyen added 1 comment

        File third_party/blink/renderer/core/html/user_media_request_provider.h
        Line 18, Patchset 17: : public Supplement<LocalDOMWindow> {
        Thomas Nguyen . unresolved

        It's better to be a supplement of `ExecutionContext`. In the past, we had some crashes regarding null `LocalDOMWindow` and we moved to `ExecutionContext` instead.

        Ravjit Uppal

        Wondering what could cause it as <usermedia> only exist in the DOM, meaning they will never exist inside Service Workers or Dedicated Workers(where execution context is non null, but LocalDOMWindow is null)
        Also LocalDOMWindow is needed to fetch UserMediaClient
        https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/mediastream/user_media_client.h;l=65;drc=926943cad55d11056856e35487b1a0d19af4d579

        Thomas Nguyen

        I think that does not break the existing rule of Supplement, as way to "attach" new dependency to existing objects at runtime. It means UserMediaRequestProvider can be a able to be created at runtime as a field of ExecutionContext but no way to use it.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Guido Urdaneta
        • Ravjit Uppal
        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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
        Gerrit-Change-Number: 7619474
        Gerrit-PatchSet: 18
        Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
        Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
        Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
        Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
        Gerrit-Comment-Date: Tue, 24 Mar 2026 20:21:23 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Ravjit Uppal <rav...@chromium.org>
        Comment-In-Reply-To: Thomas Nguyen <tun...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Thomas Nguyen (Gerrit)

        unread,
        Mar 24, 2026, 4:25:21 PM (9 days ago) Mar 24
        to Ravjit Uppal, Guido Urdaneta, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
        Attention needed from Guido Urdaneta and Ravjit Uppal

        Thomas Nguyen added 4 comments

        File third_party/blink/renderer/core/html/html_user_media_element.cc
        Line 155, Patchset 17: if (GetDocument().domWindow()) {
        Thomas Nguyen . resolved

        See comment bellow, we can move to use ExecutionContext

        Thomas Nguyen

        Done

        File third_party/blink/renderer/core/html/user_media_request_provider.h
        Line 18, Patchset 17: : public Supplement<LocalDOMWindow> {
        Thomas Nguyen . unresolved

        It's better to be a supplement of `ExecutionContext`. In the past, we had some crashes regarding null `LocalDOMWindow` and we moved to `ExecutionContext` instead.

        Ravjit Uppal

        Wondering what could cause it as <usermedia> only exist in the DOM, meaning they will never exist inside Service Workers or Dedicated Workers(where execution context is non null, but LocalDOMWindow is null)
        Also LocalDOMWindow is needed to fetch UserMediaClient
        https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/mediastream/user_media_client.h;l=65;drc=926943cad55d11056856e35487b1a0d19af4d579

        Thomas Nguyen

        I think that does not break the existing rule of Supplement, as way to "attach" new dependency to existing objects at runtime. It means UserMediaRequestProvider can be a able to be created at runtime as a field of ExecutionContext but no way to use it.

        Thomas Nguyen

        After reconsidering it a bit and likely, the UserMediaRequesatProvider::From() is called only under click event when the window is available. So it will be fine here
        (and we must make sure that, this `From` should be only called in context where the window is available)

        File third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.cc
        Line 54, Patchset 17:void UserMediaRequestProviderImpl::ProvideTo(LocalDOMWindow& window) {
        Thomas Nguyen . resolved

        `ExecutionContext`

        Thomas Nguyen

        Done

        Line 67, Patchset 17: LocalDOMWindow* window = element->GetDocument().domWindow();
        Thomas Nguyen . resolved

        Ditto, move to ExecutionContext

        Thomas Nguyen

        Done

        Gerrit-Comment-Date: Tue, 24 Mar 2026 20:25:04 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Thomas Nguyen (Gerrit)

        unread,
        Mar 24, 2026, 4:25:26 PM (9 days ago) Mar 24
        to Ravjit Uppal, Guido Urdaneta, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
        Attention needed from Guido Urdaneta and Ravjit Uppal

        Thomas Nguyen added 1 comment

        File third_party/blink/renderer/core/html/user_media_request_provider.h
        Line 18, Patchset 17: : public Supplement<LocalDOMWindow> {
        Thomas Nguyen . resolved

        It's better to be a supplement of `ExecutionContext`. In the past, we had some crashes regarding null `LocalDOMWindow` and we moved to `ExecutionContext` instead.

        Ravjit Uppal

        Wondering what could cause it as <usermedia> only exist in the DOM, meaning they will never exist inside Service Workers or Dedicated Workers(where execution context is non null, but LocalDOMWindow is null)
        Also LocalDOMWindow is needed to fetch UserMediaClient
        https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/mediastream/user_media_client.h;l=65;drc=926943cad55d11056856e35487b1a0d19af4d579

        Thomas Nguyen

        I think that does not break the existing rule of Supplement, as way to "attach" new dependency to existing objects at runtime. It means UserMediaRequestProvider can be a able to be created at runtime as a field of ExecutionContext but no way to use it.

        Thomas Nguyen

        After reconsidering it a bit and likely, the UserMediaRequesatProvider::From() is called only under click event when the window is available. So it will be fine here
        (and we must make sure that, this `From` should be only called in context where the window is available)

        Thomas Nguyen

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Guido Urdaneta
        • Ravjit Uppal
        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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
          Gerrit-Change-Number: 7619474
          Gerrit-PatchSet: 18
          Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
          Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
          Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
          Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
          Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
          Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
          Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
          Gerrit-Comment-Date: Tue, 24 Mar 2026 20:25:12 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Thomas Nguyen (Gerrit)

          unread,
          Mar 24, 2026, 4:40:24 PM (9 days ago) Mar 24
          to Ravjit Uppal, Guido Urdaneta, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
          Attention needed from Guido Urdaneta

          Thomas Nguyen voted and added 1 comment

          Votes added by Thomas Nguyen

          Code-Review+1

          1 comment

          Patchset-level comments
          File-level comment, Patchset 19 (Latest):
          Thomas Nguyen . resolved

          LGTM, with the test gets fixed

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Guido Urdaneta
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not 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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
            Gerrit-Change-Number: 7619474
            Gerrit-PatchSet: 19
            Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
            Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
            Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
            Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
            Gerrit-CC: Kentaro Hara <har...@chromium.org>
            Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
            Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
            Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
            Gerrit-Comment-Date: Tue, 24 Mar 2026 20:40:06 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Guido Urdaneta (Gerrit)

            unread,
            Mar 25, 2026, 10:42:05 AM (8 days ago) Mar 25
            to Ravjit Uppal, Thomas Nguyen, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
            Attention needed from Ravjit Uppal

            Guido Urdaneta voted and added 2 comments

            Votes added by Guido Urdaneta

            Code-Review+1

            2 comments

            Patchset-level comments
            Guido Urdaneta . resolved

            lgtm % comments

            File third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.h
            Line 16, Patchset 19 (Latest):class MODULES_EXPORT UserMediaRequestCallbacks final
            Guido Urdaneta . unresolved

            Rename to UserMediaRequestProviderCallbacks to better differentiate from UserMediaRequest::Callbacks

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Ravjit Uppal
            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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
              Gerrit-Change-Number: 7619474
              Gerrit-PatchSet: 19
              Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
              Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
              Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
              Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
              Gerrit-CC: Kentaro Hara <har...@chromium.org>
              Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
              Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
              Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
              Gerrit-Comment-Date: Wed, 25 Mar 2026 14:41:51 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Ravjit Uppal (Gerrit)

              unread,
              Mar 25, 2026, 11:42:15 AM (8 days ago) Mar 25
              to Mason Freed, Guido Urdaneta, Thomas Nguyen, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
              Attention needed from Mason Freed

              Ravjit Uppal voted and added 1 comment

              Votes added by Ravjit Uppal

              Commit-Queue+1

              1 comment

              File third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.h
              Line 16, Patchset 19:class MODULES_EXPORT UserMediaRequestCallbacks final
              Guido Urdaneta . resolved

              Rename to UserMediaRequestProviderCallbacks to better differentiate from UserMediaRequest::Callbacks

              Ravjit Uppal

              Done

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Mason Freed
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement is not 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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
                Gerrit-Change-Number: 7619474
                Gerrit-PatchSet: 21
                Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
                Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
                Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
                Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
                Gerrit-CC: Kentaro Hara <har...@chromium.org>
                Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
                Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
                Gerrit-Attention: Mason Freed <mas...@chromium.org>
                Gerrit-Comment-Date: Wed, 25 Mar 2026 15:42:01 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                Comment-In-Reply-To: Guido Urdaneta <gui...@chromium.org>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Mason Freed (Gerrit)

                unread,
                Mar 27, 2026, 12:41:29 PM (6 days ago) Mar 27
                to Ravjit Uppal, Guido Urdaneta, Thomas Nguyen, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
                Attention needed from Ravjit Uppal

                Mason Freed voted and added 6 comments

                Votes added by Mason Freed

                Code-Review+1

                6 comments

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

                third_party/blink/renderer/* LGTM, with some nits.

                File third_party/blink/renderer/core/html/html_user_media_element.cc
                Line 136, Patchset 21 (Latest): if (event.type() == event_type_names::kDOMActivate && PermissionsGranted()) {
                Mason Freed . unresolved

                There are a few such call sites, and I think I do the same thing every time I review them, which is to check that the code in `HTMLCapabilityElementBase::HandleActivation` checks that the event is *trusted* before allowing the permission request to be initiated. Would you mind adding a comment about that here? (And also in the other places like this, if you wouldn't mind?)

                File third_party/blink/renderer/core/html/html_user_media_element_test.cc
                Line 71, Patchset 21 (Latest): Event* event = Event::Create(event_type_names::kDOMActivate);
                element->DefaultEventHandler(*event);
                Mason Freed . unresolved

                Rather than explicitly sending a DOMActivate, do you want to try clicking the element instead?

                File third_party/blink/renderer/modules/mediastream/html_user_media_element_media_stream.h
                Line 23, Patchset 21 (Latest): static MediaStream* stream(HTMLUserMediaElement&);
                Mason Freed . unresolved

                This should likely be `Stream`

                File third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.h
                Line 16, Patchset 21 (Latest):class MODULES_EXPORT UserMediaRequestProivderCallbacks final
                Mason Freed . unresolved

                `Provider`

                File third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.cc
                Line 85, Patchset 21 (Latest): if (permissions.Contains(AtomicString("camera"))) {
                Mason Freed . unresolved

                These are sprinkled everywhere in the codebase. Would you mind consolidating all of those into third_party/blink/renderer/core/html/keywords.json5 ?

                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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
                Gerrit-Change-Number: 7619474
                Gerrit-PatchSet: 21
                Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
                Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
                Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
                Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
                Gerrit-CC: Kentaro Hara <har...@chromium.org>
                Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
                Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
                Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
                Gerrit-Comment-Date: Fri, 27 Mar 2026 16:41:17 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Ravjit Uppal (Gerrit)

                unread,
                Mar 30, 2026, 10:34:50 AM (3 days ago) Mar 30
                to Mason Freed, Guido Urdaneta, Thomas Nguyen, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
                Attention needed from Guido Urdaneta, Mason Freed and Thomas Nguyen

                Ravjit Uppal added 5 comments

                File third_party/blink/renderer/core/html/html_user_media_element.cc
                Line 136, Patchset 21: if (event.type() == event_type_names::kDOMActivate && PermissionsGranted()) {
                Mason Freed . resolved

                There are a few such call sites, and I think I do the same thing every time I review them, which is to check that the code in `HTMLCapabilityElementBase::HandleActivation` checks that the event is *trusted* before allowing the permission request to be initiated. Would you mind adding a comment about that here? (And also in the other places like this, if you wouldn't mind?)

                Ravjit Uppal

                Done

                File third_party/blink/renderer/core/html/html_user_media_element_test.cc
                Line 71, Patchset 21: Event* event = Event::Create(event_type_names::kDOMActivate);
                element->DefaultEventHandler(*event);
                Mason Freed . resolved

                Rather than explicitly sending a DOMActivate, do you want to try clicking the element instead?

                Ravjit Uppal

                Done

                File third_party/blink/renderer/modules/mediastream/html_user_media_element_media_stream.h
                Line 23, Patchset 21: static MediaStream* stream(HTMLUserMediaElement&);
                Mason Freed . unresolved

                This should likely be `Stream`

                Ravjit Uppal

                It is implemented as partial interface therefore it doesn't map to Pascal case.
                Shall I leave it as is or update the IDL to include `ImplementedAs Stream` ?

                File third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.h
                Line 16, Patchset 21:class MODULES_EXPORT UserMediaRequestProivderCallbacks final
                Mason Freed . resolved

                `Provider`

                Ravjit Uppal

                Done

                File third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.cc
                Line 85, Patchset 21: if (permissions.Contains(AtomicString("camera"))) {
                Mason Freed . resolved

                These are sprinkled everywhere in the codebase. Would you mind consolidating all of those into third_party/blink/renderer/core/html/keywords.json5 ?

                Ravjit Uppal

                Done

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Guido Urdaneta
                • Mason Freed
                • Thomas Nguyen
                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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
                Gerrit-Change-Number: 7619474
                Gerrit-PatchSet: 22
                Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
                Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
                Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
                Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
                Gerrit-CC: Kentaro Hara <har...@chromium.org>
                Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
                Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
                Gerrit-Attention: Mason Freed <mas...@chromium.org>
                Gerrit-Attention: Thomas Nguyen <tun...@chromium.org>
                Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
                Gerrit-Comment-Date: Mon, 30 Mar 2026 14:34:34 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Mason Freed <mas...@chromium.org>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Guido Urdaneta (Gerrit)

                unread,
                Mar 30, 2026, 10:36:21 AM (3 days ago) Mar 30
                to Ravjit Uppal, Mason Freed, Thomas Nguyen, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
                Attention needed from Mason Freed, Ravjit Uppal and Thomas Nguyen

                Guido Urdaneta voted Code-Review+1

                Code-Review+1
                Open in Gerrit

                Related details

                Attention is currently required from:
                • Mason Freed
                • Ravjit Uppal
                • Thomas Nguyen
                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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
                  Gerrit-Change-Number: 7619474
                  Gerrit-PatchSet: 22
                  Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
                  Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
                  Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                  Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
                  Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
                  Gerrit-CC: Kentaro Hara <har...@chromium.org>
                  Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
                  Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
                  Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
                  Gerrit-Attention: Mason Freed <mas...@chromium.org>
                  Gerrit-Attention: Thomas Nguyen <tun...@chromium.org>
                  Gerrit-Comment-Date: Mon, 30 Mar 2026 14:36:03 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Thomas Nguyen (Gerrit)

                  unread,
                  Mar 30, 2026, 3:17:54 PM (3 days ago) Mar 30
                  to Ravjit Uppal, Guido Urdaneta, Mason Freed, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
                  Attention needed from Mason Freed and Ravjit Uppal

                  Thomas Nguyen voted Code-Review+1

                  Code-Review+1
                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Mason Freed
                  • Ravjit Uppal
                  Gerrit-Comment-Date: Mon, 30 Mar 2026 19:17:39 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Mason Freed (Gerrit)

                  unread,
                  Mar 30, 2026, 5:34:20 PM (3 days ago) Mar 30
                  to Ravjit Uppal, Thomas Nguyen, Guido Urdaneta, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org
                  Attention needed from Ravjit Uppal

                  Mason Freed voted and added 2 comments

                  Votes added by Mason Freed

                  Code-Review+1

                  2 comments

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

                  LGTM, thanks for the changes.

                  File third_party/blink/renderer/modules/mediastream/html_user_media_element_media_stream.h
                  Line 23, Patchset 21: static MediaStream* stream(HTMLUserMediaElement&);
                  Mason Freed . resolved

                  This should likely be `Stream`

                  Ravjit Uppal

                  It is implemented as partial interface therefore it doesn't map to Pascal case.
                  Shall I leave it as is or update the IDL to include `ImplementedAs Stream` ?

                  Mason Freed

                  Oh shoot, I forgot that was IDL-exposed. This is ok as-is.

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Ravjit Uppal
                  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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
                  Gerrit-Change-Number: 7619474
                  Gerrit-PatchSet: 22
                  Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
                  Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
                  Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                  Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
                  Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
                  Gerrit-CC: Kentaro Hara <har...@chromium.org>
                  Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
                  Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
                  Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
                  Gerrit-Comment-Date: Mon, 30 Mar 2026 21:34:06 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: Yes
                  Comment-In-Reply-To: Ravjit Uppal <rav...@chromium.org>
                  Comment-In-Reply-To: Mason Freed <mas...@chromium.org>
                  satisfied_requirement
                  open
                  diffy

                  Ravjit Uppal (Gerrit)

                  unread,
                  Mar 30, 2026, 5:35:39 PM (3 days ago) Mar 30
                  to Mason Freed, Thomas Nguyen, Guido Urdaneta, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org

                  Ravjit Uppal voted Commit-Queue+2

                  Commit-Queue+2
                  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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
                  Gerrit-Change-Number: 7619474
                  Gerrit-PatchSet: 22
                  Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
                  Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
                  Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                  Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
                  Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
                  Gerrit-CC: Kentaro Hara <har...@chromium.org>
                  Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
                  Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
                  Gerrit-Comment-Date: Mon, 30 Mar 2026 21:35:20 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  open
                  diffy

                  Chromium LUCI CQ (Gerrit)

                  unread,
                  Mar 30, 2026, 5:40:10 PM (3 days ago) Mar 30
                  to Ravjit Uppal, Mason Freed, Thomas Nguyen, Guido Urdaneta, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org

                  Chromium LUCI CQ submitted the change

                  Change information

                  Commit message:
                  [CoCE] Integrate MediaStream into the <usermedia> element

                  MediaStream is now directly available in the <usermedia> element when it
                  is clicked and the required permissions are there.
                  Bug: 489077612
                  Change-Id: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
                  Reviewed-by: Guido Urdaneta <gui...@chromium.org>
                  Reviewed-by: Mason Freed <mas...@chromium.org>
                  Commit-Queue: Ravjit Uppal <rav...@chromium.org>
                  Reviewed-by: Thomas Nguyen <tun...@chromium.org>
                  Cr-Commit-Position: refs/heads/main@{#1607389}
                  Files:
                  • M chrome/browser/ui/views/permissions/embedded_permission_prompt_interactive_uitest.cc
                  • M third_party/blink/renderer/bindings/generated_in_modules.gni
                  • M third_party/blink/renderer/bindings/idl_in_modules.gni
                  • M third_party/blink/renderer/core/html/build.gni
                  • M third_party/blink/renderer/core/html/html_geolocation_element.cc
                  • 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/keywords.json5
                  • A third_party/blink/renderer/core/html/user_media_request_provider.cc
                  • A third_party/blink/renderer/core/html/user_media_request_provider.h
                  • M third_party/blink/renderer/modules/BUILD.gn
                  • M third_party/blink/renderer/modules/mediastream/BUILD.gn
                  • A third_party/blink/renderer/modules/mediastream/html_user_media_element_media_stream.cc
                  • A third_party/blink/renderer/modules/mediastream/html_user_media_element_media_stream.h
                  • A third_party/blink/renderer/modules/mediastream/html_user_media_element_media_stream_test.cc
                  • A third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.cc
                  • A third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl.h
                  • A third_party/blink/renderer/modules/mediastream/user_media_request_provider_impl_test.cc
                  • M third_party/blink/renderer/modules/modules_initializer.cc
                  • M third_party/blink/web_tests/webexposed/element-instance-property-listing-expected.txt
                  • M third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
                  Change size: L
                  Delta: 22 files changed, 548 insertions(+), 9 deletions(-)
                  Branch: refs/heads/main
                  Submit Requirements:
                  • requirement satisfiedCode-Review: +1 by Guido Urdaneta, +1 by Thomas Nguyen, +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: I56ddc3ef7beee4f1dc16c7f90e6fbccb7d9a7dd7
                  Gerrit-Change-Number: 7619474
                  Gerrit-PatchSet: 23
                  Gerrit-Owner: Ravjit Uppal <rav...@chromium.org>
                  Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                  Gerrit-Reviewer: Guido Urdaneta <gui...@chromium.org>
                  Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                  Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
                  Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
                  open
                  diffy
                  satisfied_requirement

                  Ravjit Uppal (Gerrit)

                  unread,
                  Apr 1, 2026, 1:35:14 PM (19 hours ago) Apr 1
                  to Chromium LUCI CQ, Mason Freed, Thomas Nguyen, Guido Urdaneta, Raphael Kubo da Costa, Kentaro Hara, srirama chandra sekhar, AyeAye, tommyw+w...@chromium.org, blink-revie...@chromium.org, eric.c...@apple.com, blink-rev...@chromium.org, feature-me...@chromium.org, blink-...@chromium.org

                  Ravjit Uppal has created a revert of this change

                  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: revert
                  satisfied_requirement
                  open
                  diffy
                  Reply all
                  Reply to author
                  Forward
                  0 new messages