Expose colorFilterEnabled SPI in WKPreferencesPrivate.h
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2018 19:56:41 +0000 (19:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2018 19:56:41 +0000 (19:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186935
<rdar://problem/41109387>

Patch by Luming Yin <luming_yin@apple.com> on 2018-06-22
Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setColorFilterEnabled:]):
(-[WKPreferences _colorFilterEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

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

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

index 8479706..4e77690 100644 (file)
@@ -1,3 +1,16 @@
+2018-06-22  Luming Yin  <luming_yin@apple.com>
+
+        Expose colorFilterEnabled SPI in WKPreferencesPrivate.h
+        https://bugs.webkit.org/show_bug.cgi?id=186935
+        <rdar://problem/41109387>
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/API/Cocoa/WKPreferences.mm:
+        (-[WKPreferences _setColorFilterEnabled:]):
+        (-[WKPreferences _colorFilterEnabled]):
+        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+
 2018-06-22  Timothy Hatcher  <timothy@apple.com>
 
         Recalc styles every time defaultAppearance changes.
index 5fc0bc5..110aa8c 100644 (file)
@@ -862,6 +862,16 @@ static WebCore::EditableLinkBehavior toEditableLinkBehavior(_WKEditableLinkBehav
     return _preferences->pageCacheSupportsPlugins();
 }
 
+- (void)_setColorFilterEnabled:(BOOL)enabled
+{
+    _preferences->setColorFilterEnabled(enabled);
+}
+
+- (BOOL)_colorFilterEnabled
+{
+    return _preferences->colorFilterEnabled();
+}
+
 - (void)_setShouldPrintBackgrounds:(BOOL)enabled
 {
     _preferences->setShouldPrintBackgrounds(enabled);
index c005fcb..37386d4 100644 (file)
@@ -137,6 +137,7 @@ typedef NS_ENUM(NSInteger, _WKEditableLinkBehavior) {
 @property (nonatomic, setter=_setShouldEnableTextAutosizingBoost:) BOOL _shouldEnableTextAutosizingBoost WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 
 @property (nonatomic, setter=_setStorageAccessPromptsEnabled:) BOOL _storageAccessPromptsEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+@property (nonatomic, setter=_setColorFilterEnabled:) BOOL _colorFilterEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 
 #if !TARGET_OS_IPHONE
 @property (nonatomic, setter=_setWebGLEnabled:) BOOL _webGLEnabled WK_API_AVAILABLE(macosx(10.13.4));