Title: [280961] trunk/Source/WebKitLegacy/mac
- Revision
- 280961
- Author
- [email protected]
- Date
- 2021-08-12 04:43:55 -0700 (Thu, 12 Aug 2021)
Log Message
REGRESSION (r280726): [ Big Sur wk1 ] 25 imported/w3c/web-platform-tests/fetch/ failing
https://bugs.webkit.org/show_bug.cgi?id=228926
<rdar://problem/81715332>
Reviewed by Eric Carlson.
isFeatureFlagEnabled is called when creating/initializing WebPreferences.
It used to check for WebView, which triggers the execution of WebView initialize method
while DumpRenderTree is in the middle of creating its testing setup, including its storage testing sessions.
Instead, check for WebResource to remove this side effect and get back to past DumpRenderTree initialization.
* WebView/WebPreferencesDefaultValues.mm:
(WebKit::isFeatureFlagEnabled):
Modified Paths
Diff
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (280960 => 280961)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2021-08-12 11:27:47 UTC (rev 280960)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2021-08-12 11:43:55 UTC (rev 280961)
@@ -1,3 +1,19 @@
+2021-08-12 Youenn Fablet <[email protected]>
+
+ REGRESSION (r280726): [ Big Sur wk1 ] 25 imported/w3c/web-platform-tests/fetch/ failing
+ https://bugs.webkit.org/show_bug.cgi?id=228926
+ <rdar://problem/81715332>
+
+ Reviewed by Eric Carlson.
+
+ isFeatureFlagEnabled is called when creating/initializing WebPreferences.
+ It used to check for WebView, which triggers the execution of WebView initialize method
+ while DumpRenderTree is in the middle of creating its testing setup, including its storage testing sessions.
+ Instead, check for WebResource to remove this side effect and get back to past DumpRenderTree initialization.
+
+ * WebView/WebPreferencesDefaultValues.mm:
+ (WebKit::isFeatureFlagEnabled):
+
2021-08-11 Peng Liu <[email protected]>
Function _os_feature_enabled_impl() expects compile-time static strings as arguments
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm (280960 => 280961)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm 2021-08-12 11:27:47 UTC (rev 280960)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm 2021-08-12 11:43:55 UTC (rev 280961)
@@ -49,9 +49,14 @@
{
#if HAVE(SYSTEM_FEATURE_FLAGS)
- // FIXME: On MacOS, we need to deal with the cases when system feature flags are not available.
- // But we need to fix <http://webkit.org/b/228926> first.
-#if PLATFORM(COCOA)
+#if PLATFORM(MAC)
+ static bool isSystemWebKit = [] {
+ auto *bundle = [NSBundle bundleForClass:NSClassFromString(@"WebResource")];
+ return [bundle.bundlePath hasPrefix:@"/System/"];
+ }();
+
+ return isSystemWebKit ? _os_feature_enabled_impl("WebKit", featureName) : defaultValue;
+#else
UNUSED_PARAM(defaultValue);
return _os_feature_enabled_impl("WebKit", featureName);
#endif // PLATFORM(MAC)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes