[MediaStream] Update constraints supported by getDisplayMedia
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2018 18:37:29 +0000 (18:37 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2018 18:37:29 +0000 (18:37 +0000)
commit4ee720bba804cb6c3ec59dc1b8027722443079de
tree4901f1ea36f6528d8f65308b8326f3cbf5ee0bed
parent2f23210ee6c77939afa74fd59f9247a01c25c26d
[MediaStream] Update constraints supported by getDisplayMedia
https://bugs.webkit.org/show_bug.cgi?id=189930

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests, updated http/tests/media/media-stream/get-display-media-prompt.html.

* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::getDisplayMedia const): Ignore audio constraints.

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::hasInvalidGetDisplayMediaConstraint): Check for invalid constraints.
(WebCore::UserMediaRequest::start): Check for invalid constraints.
(WebCore::UserMediaRequest::deny): Support new error.
* Modules/mediastream/UserMediaRequest.h:

* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::validateRequestConstraints):

LayoutTests:

* http/tests/media/media-stream/get-display-media-prompt-expected.txt:
* http/tests/media/media-stream/get-display-media-prompt.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/media/media-stream/get-display-media-prompt-expected.txt
LayoutTests/http/tests/media/media-stream/get-display-media-prompt.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaDevices.cpp
Source/WebCore/Modules/mediastream/UserMediaRequest.cpp
Source/WebCore/Modules/mediastream/UserMediaRequest.h
Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp
Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h