Support the new and deprecated ScreenCaptureKit API simultaneously so not everyone has to update at the same time.
<rdar://problem/88726849>
Created attachment 451481 [details] Patch
Comment on attachment 451481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=451481&action=review > Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:95 > WeakPtr<ScreenCaptureKitCaptureSource> _callback; Style question: Is it _callback or callback_ or m_callback that we are supposed to use? > Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:180 > + m_useNewAPI = [PAL::getSCStreamClass() instancesRespondToSelector:@selector(stopCaptureWithCompletionHandler:)]; , m_useNewAPI(...) > Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:211 > if (m_contentStream) { We could do if (!m_contentStream) return; > Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:447 > + Not needed
Created attachment 451544 [details] Patch for landing
Comment on attachment 451481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=451481&action=review >> Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:95 >> WeakPtr<ScreenCaptureKitCaptureSource> _callback; > > Style question: Is it _callback or callback_ or m_callback that we are supposed to use? As far as I can tell, it is usually `_callback` in ObjC code. >> Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:180 >> + m_useNewAPI = [PAL::getSCStreamClass() instancesRespondToSelector:@selector(stopCaptureWithCompletionHandler:)]; > > , m_useNewAPI(...) Fixed. >> Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:211 >> if (m_contentStream) { > > We could do if (!m_contentStream) return; Oops, I missed this but will change in an upcoming patch. >> Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:447 >> + > > Not needed Removed.
Committed r289547 (247078@main): <https://commits.webkit.org/247078@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 451544 [details].
Comment on attachment 451544 [details] Patch for landing This code is macOS only, the Windows failure is unrelated.