Deprecate WebKit2 plug-in support.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2019 02:36:55 +0000 (02:36 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2019 02:36:55 +0000 (02:36 +0000)
<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:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244447 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKPreferences.h
Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm

index b211937..f9b3d7c 100644 (file)
@@ -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.
index f4e73a7..55c0026 100644 (file)
@@ -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
index 6b2499c..c3befce 100644 (file)
     [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
 }
     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
 
 
 #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 @@ static WebCore::EditableLinkBehavior toEditableLinkBehavior(_WKEditableLinkBehav
 }
 
 @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