[webkit-reviews] review granted: [Bug 231286] MediaStreamTrack.applyConstraints behavior regressed in Safari 15 : [Attachment 440360] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 6 09:24:32 PDT 2021
Eric Carlson <eric.carlson at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 231286: MediaStreamTrack.applyConstraints behavior regressed in Safari 15
https://bugs.webkit.org/show_bug.cgi?id=231286
Attachment 440360: Patch
https://bugs.webkit.org/attachment.cgi?id=440360&action=review
--- Comment #3 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 440360
--> https://bugs.webkit.org/attachment.cgi?id=440360
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=440360&action=review
It would be good to include tests the specify only width, only height, and
neither.
> Source/WebCore/platform/mediastream/RealtimeVideoCaptureSource.cpp:261
> + if (!requestedWidth && requestedHeight && size().isEmpty())
> + return { };
Should this be `!requestedHeight`?
> Source/WebCore/platform/mediastream/RealtimeVideoCaptureSource.cpp:265
> + if (!requestedWidth) {
> + captureSize.setWidth(*requestedWidth);
This will crash, shouldn't it be `if (requestedWidth)`?
> Source/WebCore/platform/mediastream/RealtimeVideoCaptureSource.cpp:268
> + captureSize.setHeight(*requestedHeight);
Can't requestedHeight be null here?
More information about the webkit-reviews
mailing list