[webkit-changes] [WebKit/WebKit] 4a302d: Reject getUserMedia promise for disallowed require...

youennf noreply at github.com
Tue Jun 25 01:44:28 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4a302dc75a52f0980323c35cda808e49c28a8f3c
      https://github.com/WebKit/WebKit/commit/4a302dc75a52f0980323c35cda808e49c28a8f3c
  Author: Youenn Fablet <youenn at apple.com>
  Date:   2024-06-25 (Tue, 25 Jun 2024)

  Changed paths:
    A LayoutTests/fast/mediastream/getUserMedia-mandatory-constraint-expected.txt
    A LayoutTests/fast/mediastream/getUserMedia-mandatory-constraint.html
    M Source/WebCore/Modules/mediastream/MediaDevices.cpp
    M Source/WebCore/platform/mediastream/MediaConstraints.cpp
    M Source/WebCore/platform/mediastream/MediaConstraints.h

  Log Message:
  -----------
  Reject getUserMedia promise for disallowed required constraints
rdar://130365953
https://bugs.webkit.org/show_bug.cgi?id=275790

Reviewed by Eric Carlson.

Implement https://w3c.github.io/mediacapture-main/#dfn-allowed-required-constraints-for-device-selection to ensure new constraints are not used for restricting device selection.

* LayoutTests/fast/mediastream/getUserMedia-mandatory-constraint-expected.txt: Added.
* LayoutTests/fast/mediastream/getUserMedia-mandatory-constraint.html: Added.
* Source/WebCore/Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::getUserMedia):
* Source/WebCore/platform/mediastream/MediaConstraints.cpp:
(WebCore::isAllowedRequiredConstraintForDeviceSelection):
(WebCore::MediaConstraints::hasDisallowedRequiredConstraintForDeviceSelection const):
* Source/WebCore/platform/mediastream/MediaConstraints.h:
(WebCore::MediaConstraint::MediaConstraint):
(WebCore::MediaConstraint::isRequired const):

Canonical link: https://commits.webkit.org/280325@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list