Changeset 200668 in webkit
- Timestamp:
- May 10, 2016, 8:37:30 PM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r200662 r200668 1 2016-05-10 Sam Weinig <sam@webkit.org> 2 3 Only expose WKDataDetectorTypes and -[WKWebViewConfiguration dataDetectorTypes] on iOS 4 for now, since we don't have it fully implemented on Mac. 5 6 Reviewed by Tim Horton. 7 8 * UIProcess/API/Cocoa/WKWebView.mm: 9 (fromWKDataDetectorTypes): 10 (-[WKWebView _initializeWithConfiguration:]): 11 * UIProcess/API/Cocoa/WKWebViewConfiguration.h: 12 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: 13 (-[WKWebViewConfiguration encodeWithCoder:]): 14 (-[WKWebViewConfiguration initWithCoder:]): 15 (-[WKWebViewConfiguration copyWithZone:]): 16 1 17 2016-05-10 Sam Weinig <sam@webkit.org> 2 18 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r200470 r200668 334 334 #endif 335 335 336 #if ENABLE(DATA_DETECTION) 336 #if ENABLE(DATA_DETECTION) && PLATFORM(IOS) 337 337 static WebCore::DataDetectorTypes fromWKDataDetectorTypes(uint64_t types) 338 338 { … … 472 472 #endif 473 473 474 #if ENABLE(DATA_DETECTION) 474 #if ENABLE(DATA_DETECTION) && PLATFORM(IOS) 475 475 pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::dataDetectorTypesKey(), WebKit::WebPreferencesStore::Value(static_cast<uint32_t>(fromWKDataDetectorTypes([_configuration dataDetectorTypes])))); 476 476 #endif -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h
r200330 r200668 52 52 } WK_ENUM_AVAILABLE_IOS(8_0); 53 53 54 #else55 56 /*! @enum WKUserInterfaceDirectionPolicy57 @abstract The policy used to determine the directionality of user interface elements inside a web view.58 @constant WKUserInterfaceDirectionPolicyContent User interface directionality follows CSS / HTML / XHTML59 specifications.60 @constant WKUserInterfaceDirectionPolicySystem User interface directionality follows the view's61 userInterfaceLayoutDirection property62 @discussion When WKUserInterfaceDirectionPolicyContent is specified, the directionality of user interface63 elements is affected by the "dir" attribute or the "direction" CSS property. When64 WKUserInterfaceDirectionPolicySystem is specified, the directionaltiy of user interface elements is65 affected by the direction of the view.66 */67 typedef NS_ENUM(NSInteger, WKUserInterfaceDirectionPolicy) {68 WKUserInterfaceDirectionPolicyContent,69 WKUserInterfaceDirectionPolicySystem,70 } WK_ENUM_AVAILABLE(WK_MAC_TBA, NA);71 72 #endif73 74 54 /*! @enum WKDataDetectorTypes 75 55 @abstract The type of data detected. … … 92 72 WKDataDetectorTypeSpotlightSuggestion = 1 << 6, 93 73 WKDataDetectorTypeAll = NSUIntegerMax 94 } WK_ENUM_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); 74 } WK_ENUM_AVAILABLE(NA, WK_IOS_TBA); 75 76 #else 77 78 /*! @enum WKUserInterfaceDirectionPolicy 79 @abstract The policy used to determine the directionality of user interface elements inside a web view. 80 @constant WKUserInterfaceDirectionPolicyContent User interface directionality follows CSS / HTML / XHTML 81 specifications. 82 @constant WKUserInterfaceDirectionPolicySystem User interface directionality follows the view's 83 userInterfaceLayoutDirection property 84 @discussion When WKUserInterfaceDirectionPolicyContent is specified, the directionality of user interface 85 elements is affected by the "dir" attribute or the "direction" CSS property. When 86 WKUserInterfaceDirectionPolicySystem is specified, the directionaltiy of user interface elements is 87 affected by the direction of the view. 88 */ 89 typedef NS_ENUM(NSInteger, WKUserInterfaceDirectionPolicy) { 90 WKUserInterfaceDirectionPolicyContent, 91 WKUserInterfaceDirectionPolicySystem, 92 } WK_ENUM_AVAILABLE(WK_MAC_TBA, NA); 93 94 #endif 95 95 96 96 /*! A WKWebViewConfiguration object is a collection of properties with … … 136 136 @property (nonatomic) BOOL allowsAirPlayForMediaPlayback WK_AVAILABLE(10_11, 9_0); 137 137 138 /*! @abstract An enum value indicating the type of data detection desired.139 @discussion The default value is WKDataDetectorTypeNone.140 An example of how this property may affect the content loaded in the WKWebView is that content like141 'Visit apple.com on July 4th or call 1 800 555-5545' will be transformed to add links around 'apple.com', 'July 4th' and '1 800 555-5545'142 if the dataDetectorTypes property is set to WKDataDetectorTypePhoneNumber | WKDataDetectorTypeLink | WKDataDetectorTypeCalendarEvent.143 144 */145 @property (nonatomic) WKDataDetectorTypes dataDetectorTypes WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);146 147 138 #if TARGET_OS_IPHONE 148 139 /*! @abstract A Boolean value indicating whether HTML5 videos play inline … … 171 162 @property (nonatomic) BOOL allowsPictureInPictureMediaPlayback WK_AVAILABLE(NA, 9_0); 172 163 164 /*! @abstract An enum value indicating the type of data detection desired. 165 @discussion The default value is WKDataDetectorTypeNone. 166 An example of how this property may affect the content loaded in the WKWebView is that content like 167 'Visit apple.com on July 4th or call 1 800 555-5545' will be transformed to add links around 'apple.com', 'July 4th' and '1 800 555-5545' 168 if the dataDetectorTypes property is set to WKDataDetectorTypePhoneNumber | WKDataDetectorTypeLink | WKDataDetectorTypeCalendarEvent. 169 170 */ 171 @property (nonatomic) WKDataDetectorTypes dataDetectorTypes WK_AVAILABLE(NA, WK_IOS_TBA); 172 173 173 #else 174 174 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
r200330 r200668 199 199 [coder encodeObject:self.applicationNameForUserAgent forKey:@"applicationNameForUserAgent"]; 200 200 [coder encodeBool:self.allowsAirPlayForMediaPlayback forKey:@"allowsAirPlayForMediaPlayback"]; 201 202 #if PLATFORM(IOS) 201 203 [coder encodeInteger:self.dataDetectorTypes forKey:@"dataDetectorTypes"]; 202 203 #if PLATFORM(IOS)204 204 [coder encodeBool:self.allowsInlineMediaPlayback forKey:@"allowsInlineMediaPlayback"]; 205 205 [coder encodeBool:self.requiresUserActionForMediaPlayback forKey:@"requiresUserActionForMediaPlayback"]; … … 224 224 self.applicationNameForUserAgent = [coder decodeObjectForKey:@"applicationNameForUserAgent"]; 225 225 self.allowsAirPlayForMediaPlayback = [coder decodeBoolForKey:@"allowsAirPlayForMediaPlayback"]; 226 227 #if PLATFORM(IOS) 226 228 self.dataDetectorTypes = [coder decodeIntegerForKey:@"dataDetectorTypes"]; 227 228 #if PLATFORM(IOS)229 229 self.allowsInlineMediaPlayback = [coder decodeBoolForKey:@"allowsInlineMediaPlayback"]; 230 230 self.requiresUserActionForMediaPlayback = [coder decodeBoolForKey:@"requiresUserActionForMediaPlayback"]; … … 288 288 configuration->_imageControlsEnabled = self->_imageControlsEnabled; 289 289 #endif 290 #if ENABLE(DATA_DETECTION) 290 #if ENABLE(DATA_DETECTION) && PLATFORM(IOS) 291 291 configuration->_dataDetectorTypes = self->_dataDetectorTypes; 292 292 #endif
Note:
See TracChangeset
for help on using the changeset viewer.