Title: [256034] trunk
- Revision
- 256034
- Author
- you...@apple.com
- Date
- 2020-02-07 10:41:41 -0800 (Fri, 07 Feb 2020)
Log Message
Align getDisplayMedia() with spec
https://bugs.webkit.org/show_bug.cgi?id=207191
<rdar://problem/59151017>
Reviewed by Eric Carlson.
Source/WebCore:
Update WebIDL as per spec to have the correct default values for getDisplayMedia.
Covered by updated test.
* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::getDisplayMedia):
* Modules/mediastream/MediaDevices.h:
* Modules/mediastream/MediaDevices.idl:
LayoutTests:
* fast/mediastream/screencapture-user-gesture.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (256033 => 256034)
--- trunk/LayoutTests/ChangeLog 2020-02-07 18:26:17 UTC (rev 256033)
+++ trunk/LayoutTests/ChangeLog 2020-02-07 18:41:41 UTC (rev 256034)
@@ -1,3 +1,13 @@
+2020-02-07 youenn fablet <you...@apple.com>
+
+ Align getDisplayMedia() with spec
+ https://bugs.webkit.org/show_bug.cgi?id=207191
+ <rdar://problem/59151017>
+
+ Reviewed by Eric Carlson.
+
+ * fast/mediastream/screencapture-user-gesture.html:
+
2020-02-07 Jason Lawrence <lawrenc...@apple.com>
[ Mac Debug ] imported/w3c/web-platform-tests/workers/WorkerGlobalScope_ErrorEvent_message.htm is flaky failing.
Modified: trunk/LayoutTests/fast/mediastream/screencapture-user-gesture.html (256033 => 256034)
--- trunk/LayoutTests/fast/mediastream/screencapture-user-gesture.html 2020-02-07 18:26:17 UTC (rev 256033)
+++ trunk/LayoutTests/fast/mediastream/screencapture-user-gesture.html 2020-02-07 18:41:41 UTC (rev 256034)
@@ -4,7 +4,7 @@
promise_test(() => {
let promise;
internals.withUserGesture(() => {
- promise = navigator.mediaDevices.getDisplayMedia({video : true});
+ promise = navigator.mediaDevices.getDisplayMedia();
});
return promise;
}, "Allow getDisplayMedia call in case of user gesture");
Modified: trunk/Source/WebCore/ChangeLog (256033 => 256034)
--- trunk/Source/WebCore/ChangeLog 2020-02-07 18:26:17 UTC (rev 256033)
+++ trunk/Source/WebCore/ChangeLog 2020-02-07 18:41:41 UTC (rev 256034)
@@ -1,5 +1,21 @@
2020-02-07 youenn fablet <you...@apple.com>
+ Align getDisplayMedia() with spec
+ https://bugs.webkit.org/show_bug.cgi?id=207191
+ <rdar://problem/59151017>
+
+ Reviewed by Eric Carlson.
+
+ Update WebIDL as per spec to have the correct default values for getDisplayMedia.
+ Covered by updated test.
+
+ * Modules/mediastream/MediaDevices.cpp:
+ (WebCore::MediaDevices::getDisplayMedia):
+ * Modules/mediastream/MediaDevices.h:
+ * Modules/mediastream/MediaDevices.idl:
+
+2020-02-07 youenn fablet <you...@apple.com>
+
Add release logging for the case of libwebrtc being not available
https://bugs.webkit.org/show_bug.cgi?id=207383
Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp (256033 => 256034)
--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp 2020-02-07 18:26:17 UTC (rev 256033)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp 2020-02-07 18:41:41 UTC (rev 256034)
@@ -139,7 +139,7 @@
request->start();
}
-void MediaDevices::getDisplayMedia(const StreamConstraints& constraints, Promise&& promise)
+void MediaDevices::getDisplayMedia(const DisplayMediaStreamConstraints& constraints, Promise&& promise)
{
auto* document = this->document();
if (!document)
Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.h (256033 => 256034)
--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.h 2020-02-07 18:26:17 UTC (rev 256033)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.h 2020-02-07 18:41:41 UTC (rev 256034)
@@ -79,7 +79,13 @@
Variant<bool, MediaTrackConstraints> audio;
};
void getUserMedia(const StreamConstraints&, Promise&&);
- void getDisplayMedia(const StreamConstraints&, Promise&&);
+
+ struct DisplayMediaStreamConstraints {
+ Variant<bool, MediaTrackConstraints> video;
+ Variant<bool, MediaTrackConstraints> audio;
+ };
+ void getDisplayMedia(const DisplayMediaStreamConstraints&, Promise&&);
+
void enumerateDevices(EnumerateDevicesPromise&&);
MediaTrackSupportedConstraints getSupportedConstraints();
Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl (256033 => 256034)
--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl 2020-02-07 18:26:17 UTC (rev 256033)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl 2020-02-07 18:41:41 UTC (rev 256034)
@@ -39,11 +39,18 @@
MediaTrackSupportedConstraints getSupportedConstraints();
[PrivateIdentifier, PublicIdentifier] Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints);
- [EnabledAtRuntime=ScreenCapture] Promise<MediaStream> getDisplayMedia(optional MediaStreamConstraints constraints);
+ [EnabledAtRuntime=ScreenCapture] Promise<MediaStream> getDisplayMedia(optional DisplayMediaStreamConstraints constraints);
};
[
Conditional=MEDIA_STREAM,
+] dictionary DisplayMediaStreamConstraints {
+ (boolean or MediaTrackConstraints) video = true;
+ (boolean or MediaTrackConstraints) audio = false;
+};
+
+[
+ Conditional=MEDIA_STREAM,
] dictionary MediaStreamConstraints {
(boolean or MediaTrackConstraints) video = false;
(boolean or MediaTrackConstraints) audio = false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes