Title: [280486] branches/safari-612.1.26-branch/Source/WebKit
- Revision
- 280486
- Author
- repst...@apple.com
- Date
- 2021-07-30 11:13:48 -0700 (Fri, 30 Jul 2021)
Log Message
Cherry-pick r280433. rdar://problem/81334141
The bundle path of downlevel Safari is wrong
https://bugs.webkit.org/show_bug.cgi?id=228339
Reviewed by Tim Horton.
Use the same approach as `isSystemWebKit` to check whether the WebKit bundle
is from the staged framework.
* Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm:
(WebKit::isFeatureFlagEnabled):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-612.1.26-branch/Source/WebKit/ChangeLog (280485 => 280486)
--- branches/safari-612.1.26-branch/Source/WebKit/ChangeLog 2021-07-30 18:13:44 UTC (rev 280485)
+++ branches/safari-612.1.26-branch/Source/WebKit/ChangeLog 2021-07-30 18:13:48 UTC (rev 280486)
@@ -1,5 +1,36 @@
2021-07-30 Russell Epstein <repst...@apple.com>
+ Cherry-pick r280433. rdar://problem/81334141
+
+ The bundle path of downlevel Safari is wrong
+ https://bugs.webkit.org/show_bug.cgi?id=228339
+
+ Reviewed by Tim Horton.
+
+ Use the same approach as `isSystemWebKit` to check whether the WebKit bundle
+ is from the staged framework.
+
+ * Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm:
+ (WebKit::isFeatureFlagEnabled):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-07-29 Peng Liu <peng.l...@apple.com>
+
+ The bundle path of downlevel Safari is wrong
+ https://bugs.webkit.org/show_bug.cgi?id=228339
+
+ Reviewed by Tim Horton.
+
+ Use the same approach as `isSystemWebKit` to check whether the WebKit bundle
+ is from the staged framework.
+
+ * Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm:
+ (WebKit::isFeatureFlagEnabled):
+
+2021-07-30 Russell Epstein <repst...@apple.com>
+
Cherry-pick r280424. rdar://problem/81334136
[macOS Catalina] Some feature preferences have wrong default values
Modified: branches/safari-612.1.26-branch/Source/WebKit/Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm (280485 => 280486)
--- branches/safari-612.1.26-branch/Source/WebKit/Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm 2021-07-30 18:13:44 UTC (rev 280485)
+++ branches/safari-612.1.26-branch/Source/WebKit/Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm 2021-07-30 18:13:48 UTC (rev 280486)
@@ -40,7 +40,10 @@
// Because of <rdar://problem/60608008>, WebKit has to parse the feature flags plist file
bool isFeatureFlagEnabled(const String& featureName)
{
- BOOL isWebKitBundleFromStagedFramework = [[[NSBundle mainBundle] bundlePath] hasPrefix:@"/Library/Apple/System/Library/StagedFrameworks/Safari"];
+ static bool isWebKitBundleFromStagedFramework = [] {
+ NSBundle *webkit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")];
+ return [webkit2Bundle.bundlePath hasPrefix:@"/Library/Apple/System/Library/StagedFrameworks/Safari/"];
+ }();
if (!isWebKitBundleFromStagedFramework)
return _os_feature_enabled_impl("WebKit", (const char*)featureName.utf8().data());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes