Title: [256671] branches/safari-609-branch
Revision
256671
Author
repst...@apple.com
Date
2020-02-14 19:01:34 -0800 (Fri, 14 Feb 2020)

Log Message

Cherry-pick r256377. rdar://problem/59446971

    Regression: RTCRtpSender.getCapabilities("video") returns null on iOS 13.4 (17E5223h)
    https://bugs.webkit.org/show_bug.cgi?id=207325
    <rdar://problem/59224810>

    Reviewed by Eric Carlson.

    Source/WebCore:

    Manually tested and covered by API test.

    * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
    (WebCore::LibWebRTCProvider::webRTCAvailable):
    Return true unconditionally on iOS since libwebrtc.dylib is always available.

    Tools:

    * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
    (TestWebKitAPI::TEST):
    Add a test validating that RTCRtpSender.getCapabilities does not return null.
    * TestWebKitAPI/Tests/WebKit/getUserMedia.html:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256377 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-609-branch/Source/WebCore/ChangeLog (256670 => 256671)


--- branches/safari-609-branch/Source/WebCore/ChangeLog	2020-02-15 03:01:30 UTC (rev 256670)
+++ branches/safari-609-branch/Source/WebCore/ChangeLog	2020-02-15 03:01:34 UTC (rev 256671)
@@ -1,5 +1,47 @@
 2020-02-14  Russell Epstein  <repst...@apple.com>
 
+        Cherry-pick r256377. rdar://problem/59446971
+
+    Regression: RTCRtpSender.getCapabilities("video") returns null on iOS 13.4 (17E5223h)
+    https://bugs.webkit.org/show_bug.cgi?id=207325
+    <rdar://problem/59224810>
+    
+    Reviewed by Eric Carlson.
+    
+    Source/WebCore:
+    
+    Manually tested and covered by API test.
+    
+    * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
+    (WebCore::LibWebRTCProvider::webRTCAvailable):
+    Return true unconditionally on iOS since libwebrtc.dylib is always available.
+    
+    Tools:
+    
+    * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
+    (TestWebKitAPI::TEST):
+    Add a test validating that RTCRtpSender.getCapabilities does not return null.
+    * TestWebKitAPI/Tests/WebKit/getUserMedia.html:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-02-11  Youenn Fablet  <you...@apple.com>
+
+            Regression: RTCRtpSender.getCapabilities("video") returns null on iOS 13.4 (17E5223h)
+            https://bugs.webkit.org/show_bug.cgi?id=207325
+            <rdar://problem/59224810>
+
+            Reviewed by Eric Carlson.
+
+            Manually tested and covered by API test.
+
+            * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
+            (WebCore::LibWebRTCProvider::webRTCAvailable):
+            Return true unconditionally on iOS since libwebrtc.dylib is always available.
+
+2020-02-14  Russell Epstein  <repst...@apple.com>
+
         Cherry-pick r256207. rdar://problem/59447263
 
     Don't update selection when calling setSelectionRange on a disconnected input element

Modified: branches/safari-609-branch/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp (256670 => 256671)


--- branches/safari-609-branch/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp	2020-02-15 03:01:30 UTC (rev 256670)
+++ branches/safari-609-branch/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp	2020-02-15 03:01:34 UTC (rev 256671)
@@ -71,7 +71,11 @@
 
 bool LibWebRTCProvider::webRTCAvailable()
 {
+#if PLATFORM(IOS)
+    return true;
+#else
     return !isNullFunctionPointer(rtc::LogMessage::LogToDebug);
+#endif
 }
 
 } // namespace WebCore

Modified: branches/safari-609-branch/Tools/ChangeLog (256670 => 256671)


--- branches/safari-609-branch/Tools/ChangeLog	2020-02-15 03:01:30 UTC (rev 256670)
+++ branches/safari-609-branch/Tools/ChangeLog	2020-02-15 03:01:34 UTC (rev 256671)
@@ -1,3 +1,44 @@
+2020-02-14  Russell Epstein  <repst...@apple.com>
+
+        Cherry-pick r256377. rdar://problem/59446971
+
+    Regression: RTCRtpSender.getCapabilities("video") returns null on iOS 13.4 (17E5223h)
+    https://bugs.webkit.org/show_bug.cgi?id=207325
+    <rdar://problem/59224810>
+    
+    Reviewed by Eric Carlson.
+    
+    Source/WebCore:
+    
+    Manually tested and covered by API test.
+    
+    * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
+    (WebCore::LibWebRTCProvider::webRTCAvailable):
+    Return true unconditionally on iOS since libwebrtc.dylib is always available.
+    
+    Tools:
+    
+    * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
+    (TestWebKitAPI::TEST):
+    Add a test validating that RTCRtpSender.getCapabilities does not return null.
+    * TestWebKitAPI/Tests/WebKit/getUserMedia.html:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-02-11  Youenn Fablet  <you...@apple.com>
+
+            Regression: RTCRtpSender.getCapabilities("video") returns null on iOS 13.4 (17E5223h)
+            https://bugs.webkit.org/show_bug.cgi?id=207325
+            <rdar://problem/59224810>
+
+            Reviewed by Eric Carlson.
+
+            * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
+            (TestWebKitAPI::TEST):
+            Add a test validating that RTCRtpSender.getCapabilities does not return null.
+            * TestWebKitAPI/Tests/WebKit/getUserMedia.html:
+
 2020-02-13  Ryan Haddad  <ryanhad...@apple.com>
 
         Cherry-pick r256297. rdar://problem/59442308

Modified: branches/safari-609-branch/Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm (256670 => 256671)


--- branches/safari-609-branch/Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm	2020-02-15 03:01:30 UTC (rev 256670)
+++ branches/safari-609-branch/Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm	2020-02-15 03:01:34 UTC (rev 256671)
@@ -201,6 +201,35 @@
     wasPrompted = false;
 }
 
+TEST(WebKit2, GetCapabilities)
+{
+    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+    auto processPoolConfig = adoptNS([[_WKProcessPoolConfiguration alloc] init]);
+    auto preferences = [configuration preferences];
+    preferences._mediaCaptureRequiresSecureConnection = NO;
+    preferences._mediaDevicesEnabled = YES;
+    preferences._mockCaptureDevicesEnabled = YES;
+
+    auto messageHandler = adoptNS([[GUMMessageHandler alloc] init]);
+    [[configuration.get() userContentController] addScriptMessageHandler:messageHandler.get() name:@"gum"];
+
+    auto webView = [[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500) configuration:configuration.get() processPoolConfiguration:processPoolConfig.get()];
+    auto delegate = adoptNS([[GetUserMediaCaptureUIDelegate alloc] init]);
+    webView.UIDelegate = delegate.get();
+
+    wasPrompted = false;
+
+    [webView loadTestPageNamed:@"getUserMedia"];
+    EXPECT_TRUE(waitUntilCaptureState(webView, _WKMediaCaptureStateActiveCamera));
+
+    TestWebKitAPI::Util::run(&wasPrompted);
+
+    done = false;
+    [webView stringByEvaluatingJavaScript:@"checkGetCapabilities()"];
+
+    TestWebKitAPI::Util::run(&done);
+}
+
 #if WK_HAVE_C_SPI
 TEST(WebKit, WebAudioAndGetUserMedia)
 {

Modified: branches/safari-609-branch/Tools/TestWebKitAPI/Tests/WebKit/getUserMedia.html (256670 => 256671)


--- branches/safari-609-branch/Tools/TestWebKitAPI/Tests/WebKit/getUserMedia.html	2020-02-15 03:01:30 UTC (rev 256670)
+++ branches/safari-609-branch/Tools/TestWebKitAPI/Tests/WebKit/getUserMedia.html	2020-02-15 03:01:34 UTC (rev 256671)
@@ -87,6 +87,11 @@
                     window.webkit.messageHandlers.gum.postMessage("Did not receive an ended event after 5 seconds");
                 }, 5000);
             }
+
+            function checkGetCapabilities() {
+                window.webkit.messageHandlers.gum.postMessage(RTCRtpSender.getCapabilities('video') != null ? "PASS" : "FAIL");
+            }
+
         </script>
     <head>
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to