Add a WebKit1 preference for selection services
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Oct 2014 20:56:16 +0000 (20:56 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Oct 2014 20:56:16 +0000 (20:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=137498
<rdar://problem/18572699>

Reviewed by Simon Fraser.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences serviceControlsEnabled]):
(-[WebPreferences setServiceControlsEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Add and plumb the preference.

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController awakeFromNib]):
Turn on image and selection services in the Legacy WebKit MiniBrowser.

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

Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Tools/ChangeLog
Tools/MiniBrowser/mac/WK1BrowserWindowController.m

index 30003a209c514972d637c4f8b3e86f9de1f3dd2a..26d2261ebeae2d31c2b4a9f05fca03469d0c55e8 100644 (file)
@@ -1,3 +1,21 @@
+2014-10-09  Tim Horton  <timothy_horton@apple.com>
+
+        Add a WebKit1 preference for selection services
+        https://bugs.webkit.org/show_bug.cgi?id=137498
+        <rdar://problem/18572699>
+
+        Reviewed by Simon Fraser.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences serviceControlsEnabled]):
+        (-[WebPreferences setServiceControlsEnabled:]):
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+        Add and plumb the preference.
+
 2014-10-09  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Remove second-to-last client of WebFontCache
index d6a5c8d8c899a48ee182fcd76d17e08380104241..c8fe8643299d193754b938e8e6fbd4b62bc56151 100644 (file)
 #define WebKitShouldConvertPositionStyleOnCopyPreferenceKey @"WebKitShouldConvertPositionStyleOnCopy"
 #define WebKitImageControlsEnabledPreferenceKey @"WebKitImageControlsEnabled"
 #define WebKitGamepadsEnabledPreferenceKey @"WebKitGamepadsEnabled"
+#define WebKitServiceControlsEnabledPreferenceKey @"WebKitServiceControlsEnabled"
 
 #if !TARGET_OS_IPHONE
 // These are private both because callers should be using the cover methods and because the
index 9d69755859cfe71206ec5eaffc790c845ac76301..e0ecfdfe53cd46995b464093cb45d8356d041357 100644 (file)
@@ -577,6 +577,7 @@ public:
 #endif
 #if ENABLE(SERVICE_CONTROLS)
         [NSNumber numberWithBool:NO], WebKitImageControlsEnabledPreferenceKey,
+        [NSNumber numberWithBool:NO], WebKitServiceControlsEnabledPreferenceKey,
 #endif
         [NSNumber numberWithBool:NO], WebKitEnableInheritURIQueryComponentPreferenceKey,
         nil];
@@ -2434,6 +2435,16 @@ static bool needsScreenFontsEnabledQuirk()
     [self _setBoolValue:enabled forKey:WebKitImageControlsEnabledPreferenceKey];
 }
 
+- (BOOL)serviceControlsEnabled
+{
+    return [self _boolValueForKey:WebKitServiceControlsEnabledPreferenceKey];
+}
+
+- (void)setServiceControlsEnabled:(BOOL)enabled
+{
+    [self _setBoolValue:enabled forKey:WebKitServiceControlsEnabledPreferenceKey];
+}
+
 - (BOOL)gamepadsEnabled
 {
     return [self _boolValueForKey:WebKitGamepadsEnabledPreferenceKey];
index b0ebc21222f5a5ddac52a26bd24b84128613c680..87a4c8d43e56e77bb34ef8b864a4569d3cc5e643 100644 (file)
@@ -416,6 +416,9 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification;
 - (void)setImageControlsEnabled:(BOOL)flag;
 - (BOOL)imageControlsEnabled;
 
+- (void)setServiceControlsEnabled:(BOOL)flag;
+- (BOOL)serviceControlsEnabled;
+
 - (void)setGamepadsEnabled:(BOOL)flag;
 - (BOOL)gamepadsEnabled;
 
index b1cf32065ba20e76c7e3271ae8c30131976c07c7..1c222995571ad2cdd8ca9cf85e16925f8147bf08 100644 (file)
@@ -2345,6 +2345,7 @@ static bool needsSelfRetainWhileLoadingQuirk()
 
 #if ENABLE(SERVICE_CONTROLS)
     settings.setImageControlsEnabled([preferences imageControlsEnabled]);
+    settings.setServiceControlsEnabled([preferences serviceControlsEnabled]);
 #endif
 
 #if ENABLE(VIDEO_TRACK)
index 0ab0c6f209f559c88ea578dd8aa37dc519354cf0..31511d01e07871efdbe513868b200083aaccc764 100644 (file)
@@ -1,3 +1,15 @@
+2014-10-09  Tim Horton  <timothy_horton@apple.com>
+
+        Add a WebKit1 preference for selection services
+        https://bugs.webkit.org/show_bug.cgi?id=137498
+        <rdar://problem/18572699>
+
+        Reviewed by Simon Fraser.
+
+        * MiniBrowser/mac/WK1BrowserWindowController.m:
+        (-[WK1BrowserWindowController awakeFromNib]):
+        Turn on image and selection services in the Legacy WebKit MiniBrowser.
+
 2014-10-09  Adrien Destugues  <pulkomandy@gmail.com>
 
         Get the patch scripts running on Haiku
index 28b99d76f2f6eb23f646e4cf97925b414ead5176..33916ced5d111c5c2a431473e99496a3fdea4ce6 100644 (file)
@@ -50,6 +50,8 @@
 
     [[WebPreferences standardPreferences] setFullScreenEnabled:YES];
     [[WebPreferences standardPreferences] setDeveloperExtrasEnabled:YES];
+    [[WebPreferences standardPreferences] setImageControlsEnabled:YES];
+    [[WebPreferences standardPreferences] setServiceControlsEnabled:YES];
 
     [self didChangeSettings];