Title: [282965] trunk/Source
Revision
282965
Author
[email protected]
Date
2021-09-23 10:12:19 -0700 (Thu, 23 Sep 2021)

Log Message

Remove XSS Auditor: Part 3 (Deprecate API)
https://bugs.webkit.org/show_bug.cgi?id=230661
<rdar://problem/83428911>

Reviewed by Mark Lam.

Source/WebKit:

As a final step, deprecate the API now that the feature is removed. Once all clients have
removed use of the API we can remove from the framework.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetXSSAuditorEnabled):
(WKPreferencesGetXSSAuditorEnabled):
* UIProcess/API/C/WKPreferencesRef.h:

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences isXSSAuditorEnabled]):
(-[WebPreferences setXSSAuditorEnabled:]):
* WebView/WebPreferencesPrivate.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (282964 => 282965)


--- trunk/Source/WebKit/ChangeLog	2021-09-23 16:42:10 UTC (rev 282964)
+++ trunk/Source/WebKit/ChangeLog	2021-09-23 17:12:19 UTC (rev 282965)
@@ -1,3 +1,19 @@
+2021-09-23  Brent Fulgham  <[email protected]>
+
+        Remove XSS Auditor: Part 3 (Deprecate API)
+        https://bugs.webkit.org/show_bug.cgi?id=230661
+        <rdar://problem/83428911>
+
+        Reviewed by Mark Lam.
+
+        As a final step, deprecate the API now that the feature is removed. Once all clients have
+        removed use of the API we can remove from the framework.
+
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetXSSAuditorEnabled):
+        (WKPreferencesGetXSSAuditorEnabled):
+        * UIProcess/API/C/WKPreferencesRef.h:
+
 2021-09-23  Per Arne Vollan  <[email protected]>
 
         Fix incorrect mach service name in sandboxes

Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp (282964 => 282965)


--- trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp	2021-09-23 16:42:10 UTC (rev 282964)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp	2021-09-23 17:12:19 UTC (rev 282965)
@@ -185,16 +185,6 @@
     return toImpl(preferencesRef)->databasesEnabled();
 }
 
-void WKPreferencesSetXSSAuditorEnabled(WKPreferencesRef preferencesRef, bool xssAuditorEnabled)
-{
-    toImpl(preferencesRef)->setXSSAuditorEnabled(xssAuditorEnabled);
-}
-
-bool WKPreferencesGetXSSAuditorEnabled(WKPreferencesRef preferencesRef)
-{
-    return toImpl(preferencesRef)->xssAuditorEnabled();
-}
-
 void WKPreferencesSetFrameFlatteningEnabled(WKPreferencesRef preferencesRef, bool frameFlatteningEnabled)
 {
     toImpl(preferencesRef)->setFrameFlatteningEnabled(frameFlatteningEnabled);
@@ -2226,3 +2216,13 @@
 {
     return true;
 }
+
+void WKPreferencesSetXSSAuditorEnabled(WKPreferencesRef, bool)
+{
+}
+
+bool WKPreferencesGetXSSAuditorEnabled(WKPreferencesRef)
+{
+    return false;
+}
+

Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h (282964 => 282965)


--- trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h	2021-09-23 16:42:10 UTC (rev 282964)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h	2021-09-23 17:12:19 UTC (rev 282965)
@@ -91,9 +91,9 @@
 WK_EXPORT void WKPreferencesSetDatabasesEnabled(WKPreferencesRef preferences, bool databasesEnabled);
 WK_EXPORT bool WKPreferencesGetDatabasesEnabled(WKPreferencesRef preferences);
 
-// Defaults to true.
-WK_EXPORT void WKPreferencesSetXSSAuditorEnabled(WKPreferencesRef preferences, bool xssAuditorEnabled);
-WK_EXPORT bool WKPreferencesGetXSSAuditorEnabled(WKPreferencesRef preferences);
+// Defaults to false.
+WK_EXPORT void WKPreferencesSetXSSAuditorEnabled(WKPreferencesRef preferences, bool xssAuditorEnabled) WK_C_API_DEPRECATED;
+WK_EXPORT bool WKPreferencesGetXSSAuditorEnabled(WKPreferencesRef preferences) WK_C_API_DEPRECATED;
 
 // Defaults to false.
 WK_EXPORT void WKPreferencesSetFrameFlatteningEnabled(WKPreferencesRef preferences, bool frameFlatteningEnabled);

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (282964 => 282965)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2021-09-23 16:42:10 UTC (rev 282964)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2021-09-23 17:12:19 UTC (rev 282965)
@@ -1,3 +1,17 @@
+2021-09-23  Brent Fulgham  <[email protected]>
+
+        Remove XSS Auditor: Part 3 (Deprecate API)
+        https://bugs.webkit.org/show_bug.cgi?id=230661
+        <rdar://problem/83428911>
+
+        Reviewed by Mark Lam.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (-[WebPreferences isXSSAuditorEnabled]):
+        (-[WebPreferences setXSSAuditorEnabled:]):
+        * WebView/WebPreferencesPrivate.h:
+
 2021-09-22  Chris Dumez  <[email protected]>
 
         Drop makeRef() and use Ref { } instead

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (282964 => 282965)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2021-09-23 16:42:10 UTC (rev 282964)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2021-09-23 17:12:19 UTC (rev 282965)
@@ -100,7 +100,6 @@
 #define WebKitApplicationCacheDefaultOriginQuota @"WebKitApplicationCacheDefaultOriginQuota"
 #define WebKitZoomsTextOnlyPreferenceKey @"WebKitZoomsTextOnly"
 #define WebKitJavaScriptCanAccessClipboardPreferenceKey @"WebKitJavaScriptCanAccessClipboard"
-#define WebKitXSSAuditorEnabledPreferenceKey @"WebKitXSSAuditorEnabled"
 #define WebKitAcceleratedDrawingEnabledPreferenceKey @"WebKitAcceleratedDrawingEnabled"
 #define WebKitDisplayListDrawingEnabledPreferenceKey @"WebKitDisplayListDrawingEnabled"
 #define WebKitCanvasUsesAcceleratedDrawingPreferenceKey @"WebKitCanvasUsesAcceleratedDrawing"
@@ -293,3 +292,4 @@
 #define WebKitCSSShadowPartsEnabledPreferenceKey @"WebKitCSSShadowPartsEnabled"
 #define WebKitSubpixelCSSOMElementMetricsEnabledPreferenceKey @"WebKitSubpixelCSSOMElementMetricsEnabled"
 #define WebKitExperimentalNotificationsEnabledPreferenceKey @"WebKitExperimentalNotificationsEnabledPreferenceKey"
+#define WebKitXSSAuditorEnabledPreferenceKey @"WebKitXSSAuditorEnabled"

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (282964 => 282965)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2021-09-23 16:42:10 UTC (rev 282964)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2021-09-23 17:12:19 UTC (rev 282965)
@@ -1180,16 +1180,6 @@
     [self _setBoolValue:flag forKey:WebKitJavaScriptCanAccessClipboardPreferenceKey];
 }
 
-- (BOOL)isXSSAuditorEnabled
-{
-    return [self _boolValueForKey:WebKitXSSAuditorEnabledPreferenceKey];
-}
-
-- (void)setXSSAuditorEnabled:(BOOL)flag
-{
-    [self _setBoolValue:flag forKey:WebKitXSSAuditorEnabledPreferenceKey];
-}
-
 #if !PLATFORM(IOS_FAMILY)
 - (BOOL)respectStandardStyleKeyEquivalents
 {
@@ -3500,4 +3490,13 @@
     return NO;
 }
 
+- (BOOL)isXSSAuditorEnabled
+{
+    return FALSE;
+}
+
+- (void)setXSSAuditorEnabled:(BOOL)flag
+{
+}
+
 @end

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (282964 => 282965)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h	2021-09-23 16:42:10 UTC (rev 282964)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h	2021-09-23 17:12:19 UTC (rev 282965)
@@ -134,7 +134,6 @@
 @property (nonatomic) BOOL needsStorageAccessFromFileURLsQuirk;
 @property (nonatomic) BOOL zoomsTextOnly;
 @property (nonatomic) BOOL _javascript_CanAccessClipboard;
-@property (nonatomic, getter=isXSSAuditorEnabled) BOOL XSSAuditorEnabled;
 @property (nonatomic, getter=isFrameFlatteningEnabled) BOOL frameFlatteningEnabled;
 @property (nonatomic) WebKitFrameFlattening frameFlattening;
 @property (nonatomic) BOOL asyncFrameScrollingEnabled;
@@ -376,6 +375,7 @@
 @property (nonatomic, getter=isHixie76WebSocketProtocolEnabled) BOOL hixie76WebSocketProtocolEnabled;
 @property (nonatomic) BOOL accelerated2dCanvasEnabled;
 @property (nonatomic) BOOL experimentalNotificationsEnabled;
+@property (nonatomic, getter=isXSSAuditorEnabled) BOOL XSSAuditorEnabled;
 
 - (void)setDiskImageCacheEnabled:(BOOL)enabled;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to