Title: [284976] trunk
Revision
284976
Author
you...@apple.com
Date
2021-10-28 06:52:02 -0700 (Thu, 28 Oct 2021)

Log Message

[ Mac wk1 ] 2 media-capabilities/webrtc tests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=232283
<rdar://problem/84637007>

Reviewed by Eric Carlson.

Source/WebCore:

Migrate WebRTC H265 and VP9 flags from runtime enabled features to page settings.
WK1 and WK2 will call Page::settingsDidChange when updating settings so that these settings are pushed to its LibWebRTCProvider.
This makes sure that in WK1, test runs with the correct settings.

Covered by existing tests.

* page/Page.cpp:
* page/Page.h:
* page/RuntimeEnabledFeatures.h:
* testing/Internals.cpp:

Source/WebKit:

* WebProcess/WebPage/WebPage.cpp:

Source/WebKitLegacy/mac:

* WebView/WebView.mm:

Source/WTF:

* Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

* platform/mac-wk1/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (284975 => 284976)


--- trunk/LayoutTests/ChangeLog	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/LayoutTests/ChangeLog	2021-10-28 13:52:02 UTC (rev 284976)
@@ -1,3 +1,13 @@
+2021-10-28  Youenn Fablet  <you...@apple.com>
+
+        [ Mac wk1 ] 2 media-capabilities/webrtc tests are flaky failures
+        https://bugs.webkit.org/show_bug.cgi?id=232283
+        <rdar://problem/84637007>
+
+        Reviewed by Eric Carlson.
+
+        * platform/mac-wk1/TestExpectations:
+
 2021-10-28  Antti Koivisto  <an...@apple.com>
 
         Support ::before and ::after pseudo elements after ::slotted

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (284975 => 284976)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2021-10-28 13:52:02 UTC (rev 284976)
@@ -1491,7 +1491,4 @@
 webkit.org/b/232277 [ Catalina ] imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-remove-from-document.html [ Pass Failure ]
 webkit.org/b/232277 [ Catalina ] imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-remove-from-document-different-load.html [ Pass Failure ]
 
-webkit.org/b/232283 imported/w3c/web-platform-tests/media-capabilities/decodingInfo.webrtc.html [ Pass Failure ]
-webkit.org/b/232283 imported/w3c/web-platform-tests/media-capabilities/encodingInfo.webrtc.html [ Pass Failure ]
-
 webkit.org/b/232315 [ Catalina Debug ] media/track/track-disabled.html [ Pass Crash ]

Modified: trunk/Source/WTF/ChangeLog (284975 => 284976)


--- trunk/Source/WTF/ChangeLog	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/Source/WTF/ChangeLog	2021-10-28 13:52:02 UTC (rev 284976)
@@ -1,3 +1,13 @@
+2021-10-28  Youenn Fablet  <you...@apple.com>
+
+        [ Mac wk1 ] 2 media-capabilities/webrtc tests are flaky failures
+        https://bugs.webkit.org/show_bug.cgi?id=232283
+        <rdar://problem/84637007>
+
+        Reviewed by Eric Carlson.
+
+        * Scripts/Preferences/WebPreferencesExperimental.yaml:
+
 2021-10-26  Alex Christensen  <achristen...@webkit.org>
 
         Update PCM test public key to one with RSA-PSS OID

Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (284975 => 284976)


--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml	2021-10-28 13:52:02 UTC (rev 284976)
@@ -1550,10 +1550,8 @@
     WebKit:
       default: true
 
-# FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
 WebRTCH265CodecEnabled:
   type: bool
-  webcoreBinding: RuntimeEnabledFeatures
   condition: ENABLE(WEB_RTC)
   humanReadableName: "WebRTC H265 codec"
   humanReadableDescription: "Enable WebRTC H265 codec"
@@ -1562,6 +1560,8 @@
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
 WebRTCPlatformCodecsInGPUProcessEnabled:
@@ -1627,7 +1627,6 @@
   type: bool
   humanReadableName: "WebRTC VP9 profile 0 codec"
   humanReadableDescription: "Enable WebRTC VP9 profile 0 codec"
-  webcoreBinding: RuntimeEnabledFeatures
   condition: ENABLE(WEB_RTC)
   defaultValue:
     WebKitLegacy:
@@ -1634,12 +1633,13 @@
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 WebRTCVP9Profile2CodecEnabled:
   type: bool
   humanReadableName: "WebRTC VP9 profile 2 codec"
   humanReadableDescription: "Enable WebRTC VP9 profile 2 codec"
-  webcoreBinding: RuntimeEnabledFeatures
   condition: ENABLE(WEB_RTC)
   defaultValue:
     WebKitLegacy:
@@ -1646,6 +1646,8 @@
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 WebShareFileAPIEnabled:
   type: bool

Modified: trunk/Source/WebCore/ChangeLog (284975 => 284976)


--- trunk/Source/WebCore/ChangeLog	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/Source/WebCore/ChangeLog	2021-10-28 13:52:02 UTC (rev 284976)
@@ -1,3 +1,22 @@
+2021-10-28  Youenn Fablet  <you...@apple.com>
+
+        [ Mac wk1 ] 2 media-capabilities/webrtc tests are flaky failures
+        https://bugs.webkit.org/show_bug.cgi?id=232283
+        <rdar://problem/84637007>
+
+        Reviewed by Eric Carlson.
+
+        Migrate WebRTC H265 and VP9 flags from runtime enabled features to page settings.
+        WK1 and WK2 will call Page::settingsDidChange when updating settings so that these settings are pushed to its LibWebRTCProvider.
+        This makes sure that in WK1, test runs with the correct settings.
+
+        Covered by existing tests.
+
+        * page/Page.cpp:
+        * page/Page.h:
+        * page/RuntimeEnabledFeatures.h:
+        * testing/Internals.cpp:
+
 2021-10-28  Antti Koivisto  <an...@apple.com>
 
         Support ::before and ::after pseudo elements after ::slotted

Modified: trunk/Source/WebCore/page/Page.cpp (284975 => 284976)


--- trunk/Source/WebCore/page/Page.cpp	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/Source/WebCore/page/Page.cpp	2021-10-28 13:52:02 UTC (rev 284976)
@@ -369,10 +369,7 @@
     platformInitialize();
 #endif
 
-#if USE(LIBWEBRTC)
-    m_libWebRTCProvider->setH265Support(RuntimeEnabledFeatures::sharedFeatures().webRTCH265CodecEnabled());
-    m_libWebRTCProvider->setVP9Support(RuntimeEnabledFeatures::sharedFeatures().webRTCVP9Profile0CodecEnabled(), RuntimeEnabledFeatures::sharedFeatures().webRTCVP9Profile2CodecEnabled());
-#endif
+    settingsDidChange();
 
     if (!pageConfiguration.userScriptsShouldWaitUntilNotification)
         m_hasBeenNotifiedToInjectUserScripts = true;
@@ -571,6 +568,14 @@
     return DOMRectList::create(quads);
 }
 
+void Page::settingsDidChange()
+{
+#if USE(LIBWEBRTC)
+    m_libWebRTCProvider->setH265Support(settings().webRTCH265CodecEnabled());
+    m_libWebRTCProvider->setVP9Support(settings().webRTCVP9Profile0CodecEnabled(), settings().webRTCVP9Profile2CodecEnabled());
+#endif
+}
+
 bool Page::openedByDOM() const
 {
     return m_openedByDOM;

Modified: trunk/Source/WebCore/page/Page.h (284975 => 284976)


--- trunk/Source/WebCore/page/Page.h	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/Source/WebCore/page/Page.h	2021-10-28 13:52:02 UTC (rev 284976)
@@ -352,6 +352,8 @@
     WEBCORE_EXPORT Ref<DOMRectList> touchEventRectsForEventForTesting(const String& eventName);
     WEBCORE_EXPORT Ref<DOMRectList> passiveTouchEventListenerRectsForTesting();
 
+    WEBCORE_EXPORT void settingsDidChange();
+
     Settings& settings() const { return *m_settings; }
     ProgressTracker& progress() const { return *m_progress; }
     BackForwardController& backForward() const { return *m_backForwardController; }

Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (284975 => 284976)


--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2021-10-28 13:52:02 UTC (rev 284976)
@@ -151,12 +151,6 @@
 #if ENABLE(WEB_RTC)
     bool webRTCDTMFEnabled() const { return m_isWebRTCDTMFEnabled; }
     void setWebRTCDTMFEnabled(bool isEnabled) { m_isWebRTCDTMFEnabled = isEnabled; }
-    bool webRTCH265CodecEnabled() const { return m_isWebRTCH265CodecEnabled; }
-    void setWebRTCH265CodecEnabled(bool isEnabled) { m_isWebRTCH265CodecEnabled = isEnabled; }
-    bool webRTCVP9Profile0CodecEnabled() const { return m_isWebRTCVP9Profile0CodecEnabled; }
-    void setWebRTCVP9Profile0CodecEnabled(bool isEnabled) { m_isWebRTCVP9Profile0CodecEnabled = isEnabled; }
-    bool webRTCVP9Profile2CodecEnabled() const { return m_isWebRTCVP9Profile2CodecEnabled; }
-    void setWebRTCVP9Profile2CodecEnabled(bool isEnabled) { m_isWebRTCVP9Profile2CodecEnabled = isEnabled; }
     bool webRTCH264LowLatencyEncoderEnabled() const { return m_isWebRTCH264LowLatencyEncoderEnabled; }
     void setWebRTCH264LowLatencyEncoderEnabled(bool isEnabled) { m_isWebRTCH264LowLatencyEncoderEnabled = isEnabled; }
     bool webRTCMDNSICECandidatesEnabled() const { return m_isWebRTCMDNSICECandidatesEnabled; }
@@ -327,9 +321,6 @@
     bool m_isWebRTCDTMFEnabled { true };
     bool m_isWebRTCH264SimulcastEnabled { true };
     bool m_isWebRTCMDNSICECandidatesEnabled { false };
-    bool m_isWebRTCH265CodecEnabled { false };
-    bool m_isWebRTCVP9Profile0CodecEnabled { false };
-    bool m_isWebRTCVP9Profile2CodecEnabled { false };
     bool m_isWebRTCH264LowLatencyEncoderEnabled { false };
     bool m_isWebRTCPlatformTCPSocketsEnabled { false };
     bool m_isWebRTCPlatformUDPSocketsEnabled { false };

Modified: trunk/Source/WebCore/testing/Internals.cpp (284975 => 284976)


--- trunk/Source/WebCore/testing/Internals.cpp	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/Source/WebCore/testing/Internals.cpp	2021-10-28 13:52:02 UTC (rev 284976)
@@ -589,10 +589,12 @@
 #if USE(LIBWEBRTC)
     auto& rtcProvider = page.libWebRTCProvider();
     WebCore::useRealRTCPeerConnectionFactory(rtcProvider);
-    rtcProvider.disableNonLocalhostConnections();
     LibWebRTCProvider::setH264HardwareEncoderAllowed(true);
-    RuntimeEnabledFeatures::sharedFeatures().setWebRTCH265CodecEnabled(true);
     page.settings().setWebRTCEncryptionEnabled(true);
+    rtcProvider.disableNonLocalhostConnections();
+    rtcProvider.setH265Support(true);
+    rtcProvider.setVP9Support(true, true);
+    rtcProvider.clearFactory();
 #endif
 
     page.setFullscreenAutoHideDuration(0_s);

Modified: trunk/Source/WebKit/ChangeLog (284975 => 284976)


--- trunk/Source/WebKit/ChangeLog	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/Source/WebKit/ChangeLog	2021-10-28 13:52:02 UTC (rev 284976)
@@ -1,5 +1,15 @@
 2021-10-28  Youenn Fablet  <you...@apple.com>
 
+        [ Mac wk1 ] 2 media-capabilities/webrtc tests are flaky failures
+        https://bugs.webkit.org/show_bug.cgi?id=232283
+        <rdar://problem/84637007>
+
+        Reviewed by Eric Carlson.
+
+        * WebProcess/WebPage/WebPage.cpp:
+
+2021-10-28  Youenn Fablet  <you...@apple.com>
+
         Fetch API: Network process leaks when blobs are unused
         https://bugs.webkit.org/show_bug.cgi?id=232371
         <rdar://problem/84704184>

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (284975 => 284976)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2021-10-28 13:52:02 UTC (rev 284976)
@@ -4031,12 +4031,6 @@
     if (m_drawingArea)
         m_drawingArea->updatePreferences(store);
 
-#if USE(LIBWEBRTC)
-    m_page->libWebRTCProvider().setH265Support(RuntimeEnabledFeatures::sharedFeatures().webRTCH265CodecEnabled());
-    m_page->libWebRTCProvider().setVP9Support(RuntimeEnabledFeatures::sharedFeatures().webRTCVP9Profile0CodecEnabled(), RuntimeEnabledFeatures::sharedFeatures().webRTCVP9Profile2CodecEnabled());
-    LibWebRTCProvider::setH264HardwareEncoderAllowed(store.getBoolValueForKey(WebPreferencesKey::webRTCH264HardwareEncoderEnabledKey()));
-#endif
-
 #if ENABLE(GPU_PROCESS)
     // FIXME: useGPUProcessForMediaEnabled should be a RuntimeEnabledFeature since it's global.
     static_cast<WebMediaStrategy&>(platformStrategies()->mediaStrategy()).setUseGPUProcess(m_shouldPlayMediaInGPUProcess);
@@ -4077,6 +4071,8 @@
 #if ENABLE(OPUS)
     PlatformMediaSessionManager::setOpusDecoderEnabled(RuntimeEnabledFeatures::sharedFeatures().opusDecoderEnabled());
 #endif
+
+    m_page->settingsDidChange();
 }
 
 #if ENABLE(DATA_DETECTION)

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (284975 => 284976)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2021-10-28 13:52:02 UTC (rev 284976)
@@ -1,3 +1,13 @@
+2021-10-28  Youenn Fablet  <you...@apple.com>
+
+        [ Mac wk1 ] 2 media-capabilities/webrtc tests are flaky failures
+        https://bugs.webkit.org/show_bug.cgi?id=232283
+        <rdar://problem/84637007>
+
+        Reviewed by Eric Carlson.
+
+        * WebView/WebView.mm:
+
 2021-10-24  Ian Anderson  <i...@apple.com>
 
         Enable the modules verifier for WebKitLegacy in Apple internal when using a new enough Xcode

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (284975 => 284976)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2021-10-28 10:02:54 UTC (rev 284975)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2021-10-28 13:52:02 UTC (rev 284976)
@@ -2990,6 +2990,7 @@
     }
     [WAKView _setInterpolationQuality:[preferences _interpolationQuality]];
 #endif
+    _private->page->settingsDidChange();
 }
 
 static inline IMP getMethod(id o, SEL s)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to