Title: [177463] trunk/Source/WebKit2
Revision
177463
Author
[email protected]
Date
2014-12-17 13:56:33 -0800 (Wed, 17 Dec 2014)

Log Message

[iOS] Define button and action should respect profile settings.
https://bugs.webkit.org/show_bug.cgi?id=139739
rdar://problem/15461887

Reviewed by Joseph Pecoraro.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView _define:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (177462 => 177463)


--- trunk/Source/WebKit2/ChangeLog	2014-12-17 21:49:56 UTC (rev 177462)
+++ trunk/Source/WebKit2/ChangeLog	2014-12-17 21:56:33 UTC (rev 177463)
@@ -1,3 +1,15 @@
+2014-12-17  Enrica Casucci  <[email protected]>
+
+        [iOS] Define button and action should respect profile settings.
+        https://bugs.webkit.org/show_bug.cgi?id=139739
+        rdar://problem/15461887
+
+        Reviewed by Joseph Pecoraro.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView canPerformAction:withSender:]):
+        (-[WKContentView _define:]):
+
 2014-12-17  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: [Mac] Occosional Crashes Closing Inspector

Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (177462 => 177463)


--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2014-12-17 21:49:56 UTC (rev 177462)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2014-12-17 21:56:33 UTC (rev 177463)
@@ -48,6 +48,8 @@
 #import "_WKFormInputSession.h"
 #import <CoreText/CTFontDescriptor.h>
 #import <DataDetectorsUI/DDDetectionController.h>
+#import <ManagedConfiguration/MCFeatures.h>
+#import <ManagedConfiguration/MCProfileConnection.h>
 #import <TextInput/TI_NSStringExtras.h>
 #import <UIKit/UIApplication_Private.h>
 #import <UIKit/UIFont_Private.h>
@@ -69,7 +71,12 @@
 
 SOFT_LINK_PRIVATE_FRAMEWORK(DataDetectorsUI)
 SOFT_LINK_CLASS(DataDetectorsUI, DDDetectionController)
+SOFT_LINK_PRIVATE_FRAMEWORK(ManagedConfiguration);
+SOFT_LINK_CLASS(ManagedConfiguration, MCProfileConnection);
+SOFT_LINK_CONSTANT(ManagedConfiguration, MCFeatureDefinitionLookupAllowed, NSString *)
 
+#define MCFeatureDefinitionLookupAllowed getMCFeatureDefinitionLookupAllowed()
+
 using namespace WebCore;
 using namespace WebKit;
 
@@ -1332,6 +1339,9 @@
         if (!textLength || textLength > 200)
             return NO;
 
+        if ([[getMCProfileConnectionClass() sharedConnection] effectiveBoolValueForSetting:MCFeatureDefinitionLookupAllowed] == MCRestrictedBoolExplicitNo)
+            return NO;
+            
         return YES;
     }
 
@@ -1472,6 +1482,9 @@
 
 - (void)_define:(id)sender
 {
+    if ([[getMCProfileConnectionClass() sharedConnection] effectiveBoolValueForSetting:MCFeatureDefinitionLookupAllowed] == MCRestrictedBoolExplicitNo)
+        return;
+
     _page->getSelectionOrContentsAsString([self](const String& string, CallbackBase::Error error) {
         if (error != CallbackBase::Error::None)
             return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to