Title: [294858] trunk/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm
Revision
294858
Author
achristen...@apple.com
Date
2022-05-25 18:36:41 -0700 (Wed, 25 May 2022)

Log Message

Stop searching for WebKitLegacy plug-ins on iOS
https://bugs.webkit.org/show_bug.cgi?id=240923
<rdar://92748471>

Reviewed by Chris Dumez.

NPAPI plug-in support has been completely removed, but support for plugInViewWithArguments:
is being kept on macOS until one more internal user of it finishes migration to WKWebView
even though developer.apple.com says it is "unsupported in OS X v10.7 and later"

On iOS, though, there is a concern about the API we are using to get the path to
/System/Library/Internet Plug-Ins and since it is unused, let's just remove it for now.
Soon we will remove all the plug-in support code.

* Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm:
(+[WebPluginDatabase _defaultPlugInPaths]):

Canonical link: https://commits.webkit.org/250990@main

Modified Paths

Diff

Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm (294857 => 294858)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm	2022-05-26 01:21:08 UTC (rev 294857)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm	2022-05-26 01:36:41 UTC (rev 294858)
@@ -372,7 +372,9 @@
 
 + (NSArray *)_defaultPlugInPaths
 {
-#if !PLATFORM(IOS_FAMILY)
+#if PLATFORM(IOS_FAMILY)
+    return @[];
+#else
     // Plug-ins are found in order of precedence.
     // If there are duplicates, the first found plug-in is used.
     // For example, if there is a QuickTime.plugin in the users's home directory
@@ -383,19 +385,7 @@
         @"/Library/Internet Plug-Ins",
         [[NSBundle mainBundle] builtInPlugInsPath],
     ];
-#else
-    // iOS plug-ins are all located in /System/Library/Internet Plug-Ins
-#if !PLATFORM(IOS_FAMILY_SIMULATOR)
-    NSArray *systemLibrary = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSSystemDomainMask, YES);
-    if (!systemLibrary || [systemLibrary count] == 0)
-        return nil;
-    NSString *systemDir = (NSString*)[systemLibrary objectAtIndex:0];
-#else
-    NSString* platformRootDir = [NSString stringWithUTF8String:WebKitPlatformSystemRootDirectory()];
-    NSString *systemDir = [platformRootDir stringByAppendingPathComponent:@"System/Library"];
 #endif
-    return @[[systemDir stringByAppendingPathComponent:@"Internet Plug-Ins"]];
-#endif
 }
 
 - (NSArray *)_plugInPaths
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to