Skip to content
Permalink
Browse files
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
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
achristensen07 committed May 26, 2022
1 parent 1732fbd commit 69a8597a18c3c7252f8a3c23953c133cf9af7b23
Showing 1 changed file with 3 additions and 13 deletions.
@@ -372,7 +372,9 @@ @implementation WebPluginDatabase (Internal)

+ (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,18 +385,6 @@ + (NSArray *)_defaultPlugInPaths
@"/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
}

0 comments on commit 69a8597

Please sign in to comment.