Skip to content
Permalink
Browse files
Deprecate WebKit2 plug-in support.
<rdar://problem/43812306> and https://bugs.webkit.org/show_bug.cgi?id=197080

Reviewed by Andy Estes.

* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences encodeWithCoder:]):
(-[WKPreferences initWithCoder:]):
(-[WKPreferences javaEnabled]):
(-[WKPreferences setJavaEnabled:]):
(-[WKPreferences plugInsEnabled]):
(-[WKPreferences setPlugInsEnabled:]):


Canonical link: https://commits.webkit.org/211329@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
beidson committed Apr 19, 2019
1 parent 973d6c4 commit 24f658bb72670cff29a9682f80cef4cec998ad61
Showing 3 changed files with 59 additions and 30 deletions.
@@ -1,3 +1,19 @@
2019-04-18 Brady Eidson <beidson@apple.com>

Deprecate WebKit2 plug-in support.
<rdar://problem/43812306> and https://bugs.webkit.org/show_bug.cgi?id=197080

Reviewed by Andy Estes.

* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences encodeWithCoder:]):
(-[WKPreferences initWithCoder:]):
(-[WKPreferences javaEnabled]):
(-[WKPreferences setJavaEnabled:]):
(-[WKPreferences plugInsEnabled]):
(-[WKPreferences setPlugInsEnabled:]):

2019-04-18 Commit Queue <commit-queue@webkit.org>

Unreviewed, rolling out r244434.
@@ -52,16 +52,6 @@ WK_CLASS_AVAILABLE(macos(10.10), ios(8.0))
@property (nonatomic) BOOL javaScriptCanOpenWindowsAutomatically;

#if !TARGET_OS_IPHONE
/*! @abstract A Boolean value indicating whether Java is enabled.
@discussion The default value is NO.
*/
@property (nonatomic) BOOL javaEnabled;

/*! @abstract A Boolean value indicating whether plug-ins are enabled.
@discussion The default value is NO.
*/
@property (nonatomic) BOOL plugInsEnabled;

/*!
@property tabFocusesLinks
@abstract If tabFocusesLinks is YES, the tab key will focus links and form controls.
@@ -71,3 +61,14 @@ WK_CLASS_AVAILABLE(macos(10.10), ios(8.0))
#endif

@end

#if !TARGET_OS_IPHONE

@interface WKPreferences (WKDeprecated)

@property (nonatomic) BOOL javaEnabled WK_API_DEPRECATED("Java is no longer supported", macos(macos(10.10), WK_MAC_TBA));
@property (nonatomic) BOOL plugInsEnabled WK_API_DEPRECATED("Plug-ins are no longer supported", macos(macos(10.10), WK_MAC_TBA));

@end

#endif
@@ -69,8 +69,10 @@ - (void)encodeWithCoder:(NSCoder *)coder
[coder encodeBool:self.javaScriptCanOpenWindowsAutomatically forKey:@"javaScriptCanOpenWindowsAutomatically"];

#if PLATFORM(MAC)
ALLOW_DEPRECATED_DECLARATIONS_BEGIN
[coder encodeBool:self.javaEnabled forKey:@"javaEnabled"];
[coder encodeBool:self.plugInsEnabled forKey:@"plugInsEnabled"];
ALLOW_DEPRECATED_DECLARATIONS_END
[coder encodeBool:self.tabFocusesLinks forKey:@"tabFocusesLinks"];
#endif
}
@@ -85,8 +87,10 @@ - (instancetype)initWithCoder:(NSCoder *)coder
self.javaScriptCanOpenWindowsAutomatically = [coder decodeBoolForKey:@"javaScriptCanOpenWindowsAutomatically"];

#if PLATFORM(MAC)
ALLOW_DEPRECATED_DECLARATIONS_BEGIN
self.javaEnabled = [coder decodeBoolForKey:@"javaEnabled"];
self.plugInsEnabled = [coder decodeBoolForKey:@"plugInsEnabled"];
ALLOW_DEPRECATED_DECLARATIONS_END
self.tabFocusesLinks = [coder decodeBoolForKey:@"tabFocusesLinks"];
#endif

@@ -132,26 +136,6 @@ - (void)setJavaScriptCanOpenWindowsAutomatically:(BOOL)javaScriptCanOpenWindowsA

#if PLATFORM(MAC)

- (BOOL)javaEnabled
{
return _preferences->javaEnabled();
}

- (void)setJavaEnabled:(BOOL)javaEnabled
{
_preferences->setJavaEnabled(javaEnabled);
}

- (BOOL)plugInsEnabled
{
return _preferences->pluginsEnabled();
}

- (void)setPlugInsEnabled:(BOOL)plugInsEnabled
{
_preferences->setPluginsEnabled(plugInsEnabled);
}

- (BOOL)tabFocusesLinks
{
return _preferences->tabsToLinks();
@@ -1361,3 +1345,31 @@ - (BOOL)_deviceOrientationEventEnabled
}

@end

#if !TARGET_OS_IPHONE

@implementation WKPreferences (WKDeprecated)

- (BOOL)javaEnabled
{
return _preferences->javaEnabled();
}

- (void)setJavaEnabled:(BOOL)javaEnabled
{
_preferences->setJavaEnabled(javaEnabled);
}

- (BOOL)plugInsEnabled
{
return _preferences->pluginsEnabled();
}

- (void)setPlugInsEnabled:(BOOL)plugInsEnabled
{
_preferences->setPluginsEnabled(plugInsEnabled);
}

@end

#endif

0 comments on commit 24f658b

Please sign in to comment.