Changeset 195300 in webkit
- Timestamp:
- Jan 19, 2016 11:34:20 AM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 23 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r195298 r195300 1 2016-01-19 Enrica Casucci <enrica@apple.com> 2 3 Add support for DataDetectors in WK (iOS). 4 https://bugs.webkit.org/show_bug.cgi?id=152989 5 rdar://problem/22855960 6 7 Reviewed by Tim Horton. 8 9 Adding feature definition. 10 11 * Configurations/FeatureDefines.xcconfig: 12 1 13 2016-01-17 Filip Pizlo <fpizlo@apple.com> 2 14 -
trunk/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
r194921 r195300 112 112 113 113 ENABLE_IOS_TEXT_AUTOSIZING[sdk=iphone*] = ENABLE_IOS_TEXT_AUTOSIZING; 114 ENABLE_DATA_DETECTION = ENABLE_DATA_DETECTION; 114 115 115 116 ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK)); -
trunk/Source/WTF/ChangeLog
r195298 r195300 1 2016-01-19 Enrica Casucci <enrica@apple.com> 2 3 Add support for DataDetectors in WK (iOS). 4 https://bugs.webkit.org/show_bug.cgi?id=152989 5 rdar://problem/22855960 6 7 Reviewed by Tim Horton. 8 9 Adding feature definition for data detection. 10 11 * wtf/FeatureDefines.h: 12 1 13 2016-01-17 Filip Pizlo <fpizlo@apple.com> 2 14 -
trunk/Source/WTF/wtf/FeatureDefines.h
r194921 r195300 273 273 #endif /* PLATFORM(MAC) */ 274 274 275 #if PLATFORM(COCOA) 276 277 #if !defined(ENABLE_DATA_DETECTION) 278 #define ENABLE_DATA_DETECTION 1 279 #endif 280 281 #endif /* PLATFORM(COCOA) */ 282 275 283 /* --------- Apple Windows port --------- */ 276 284 #if PLATFORM(WIN) && !PLATFORM(WIN_CAIRO) -
trunk/Source/WebCore/ChangeLog
r195294 r195300 1 2016-01-19 Enrica Casucci <enrica@apple.com> 2 3 Add support for DataDetectors in WK (iOS). 4 https://bugs.webkit.org/show_bug.cgi?id=152989 5 rdar://problem/22855960 6 7 Reviewed by Tim Horton. 8 9 This is the first step toward implementing Data Detectors support 10 in WK2. The patch adds a new memeber to the Settings object 11 to retrieve the type of detection desired. The DataDetection files 12 have been moved under cocoa, since they are no longer OS X specific. 13 14 * Configurations/FeatureDefines.xcconfig: 15 * Configurations/WebCore.xcconfig: 16 * WebCore.xcodeproj/project.pbxproj: 17 * editing/cocoa/DataDetection.h: Copied from Source/WebCore/editing/mac/DataDetection.h. 18 * editing/cocoa/DataDetection.mm: Copied from Source/WebCore/editing/mac/DataDetection.mm. 19 (WebCore::detectItemAtPositionWithRange): 20 (WebCore::DataDetection::detectItemAroundHitTestResult): 21 (WebCore::DataDetection::detectContentInRange): 22 * editing/mac/DataDetection.h: Removed. 23 * editing/mac/DataDetection.mm: Removed. 24 * loader/FrameLoader.cpp: 25 (WebCore::FrameLoader::checkLoadCompleteForThisFrame): 26 * page/Settings.h: 27 * page/Settings.in: 28 * platform/spi/mac/DataDetectorsSPI.h: 29 1 30 2016-01-19 Chris Dumez <cdumez@apple.com> 2 31 -
trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig
r194921 r195300 112 112 113 113 ENABLE_IOS_TEXT_AUTOSIZING[sdk=iphone*] = ENABLE_IOS_TEXT_AUTOSIZING; 114 ENABLE_DATA_DETECTION = ENABLE_DATA_DETECTION; 114 115 115 116 ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK)); -
trunk/Source/WebCore/Configurations/WebCore.xcconfig
r194821 r195300 51 51 OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_PLATFORM); 52 52 OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE; 53 OTHER_LDFLAGS_BASE_ios = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreGraphics -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO -framework OpenGLES -lMobileGestalt ;53 OTHER_LDFLAGS_BASE_ios = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreGraphics -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO -framework OpenGLES -lMobileGestalt -framework DataDetectorsCore; 54 54 OTHER_LDFLAGS_PLATFORM[sdk=iphoneos*] = $(OTHER_LDFLAGS_BASE_ios) -framework IOSurface; 55 55 OTHER_LDFLAGS_PLATFORM[sdk=iphonesimulator*] = $(OTHER_LDFLAGS_BASE_ios); -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r195087 r195300 1138 1138 2D5036681BCDDDC400E20BB3 /* GestureEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5036671BCDDDC400E20BB3 /* GestureEvents.cpp */; }; 1139 1139 2D5646B01B8F8493003C4994 /* DictionaryPopupInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5646AF1B8F8493003C4994 /* DictionaryPopupInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1140 2D58D8551A15F65F00A5F726 /* DataDetection.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D58D8531A15F65F00A5F726 /* DataDetection.h */; settings = {ATTRIBUTES = (Private, ); }; };1141 2D58D8561A15F65F00A5F726 /* DataDetection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D58D8541A15F65F00A5F726 /* DataDetection.mm */; };1142 1140 2D59F1BF1A0044C6001F3D29 /* DataDetectorsSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D59F1BE1A0044C6001F3D29 /* DataDetectorsSPI.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1143 1141 2D5A592F152525230036EE51 /* ImageOrientation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8748D7412CC3F89001FBA41 /* ImageOrientation.cpp */; }; … … 5883 5881 C5137CF211A58378004ADB99 /* JSDOMStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C5137CF011A58378004ADB99 /* JSDOMStringList.cpp */; }; 5884 5882 C5137CF311A58378004ADB99 /* JSDOMStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = C5137CF111A58378004ADB99 /* JSDOMStringList.h */; }; 5883 C5227DF11C3C6DF100F5ED54 /* DataDetection.h in Headers */ = {isa = PBXBuildFile; fileRef = C5227DEF1C3C6DD700F5ED54 /* DataDetection.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5884 C5227DF21C3C6DF900F5ED54 /* DataDetection.mm in Sources */ = {isa = PBXBuildFile; fileRef = C5227DF01C3C6DD700F5ED54 /* DataDetection.mm */; }; 5885 5885 C5278B0C17F212EA003A2998 /* PlatformPasteboardIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = C5278B0B17F212EA003A2998 /* PlatformPasteboardIOS.mm */; }; 5886 5886 C544274B11A57E7A0063A749 /* DOMStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = C544274911A57E7A0063A749 /* DOMStringList.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 8513 8513 2D5036671BCDDDC400E20BB3 /* GestureEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GestureEvents.cpp; sourceTree = "<group>"; }; 8514 8514 2D5646AF1B8F8493003C4994 /* DictionaryPopupInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DictionaryPopupInfo.h; sourceTree = "<group>"; }; 8515 2D58D8531A15F65F00A5F726 /* DataDetection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataDetection.h; sourceTree = "<group>"; };8516 2D58D8541A15F65F00A5F726 /* DataDetection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DataDetection.mm; sourceTree = "<group>"; };8517 8515 2D59F1BE1A0044C6001F3D29 /* DataDetectorsSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataDetectorsSPI.h; sourceTree = "<group>"; }; 8518 8516 2D5BC42516F882BE007048D0 /* SecurityPolicyViolationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecurityPolicyViolationEvent.h; sourceTree = "<group>"; }; … … 13712 13710 C5137CF011A58378004ADB99 /* JSDOMStringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMStringList.cpp; sourceTree = "<group>"; }; 13713 13711 C5137CF111A58378004ADB99 /* JSDOMStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMStringList.h; sourceTree = "<group>"; }; 13712 C5227DEF1C3C6DD700F5ED54 /* DataDetection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataDetection.h; sourceTree = "<group>"; }; 13713 C5227DF01C3C6DD700F5ED54 /* DataDetection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DataDetection.mm; sourceTree = "<group>"; }; 13714 13714 C5278B0B17F212EA003A2998 /* PlatformPasteboardIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformPasteboardIOS.mm; sourceTree = "<group>"; }; 13715 13715 C544274911A57E7A0063A749 /* DOMStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMStringList.h; sourceTree = "<group>"; }; … … 17882 17882 isa = PBXGroup; 17883 17883 children = ( 17884 C5227DEF1C3C6DD700F5ED54 /* DataDetection.h */, 17885 C5227DF01C3C6DD700F5ED54 /* DataDetection.mm */, 17884 17886 9B55EEEA1B3F3FEF005342BC /* EditorCocoa.h */, 17885 17887 9B55EEE81B3E8898005342BC /* EditorCocoa.mm */, … … 23186 23188 CE7B2DAF1586ABAD0098B3FA /* AlternativeTextUIController.h */, 23187 23189 CE7B2DB01586ABAD0098B3FA /* AlternativeTextUIController.mm */, 23188 2D58D8531A15F65F00A5F726 /* DataDetection.h */,23189 2D58D8541A15F65F00A5F726 /* DataDetection.mm */,23190 23190 937FF3D41A1012D6008EBA31 /* DictionaryLookup.h */, 23191 23191 937FF3D61A10131B008EBA31 /* DictionaryLookup.mm */, … … 25063 25063 97BC6A321505F081001B74AC /* DatabaseTracker.h in Headers */, 25064 25064 BE23480D18A9871400E4B6E8 /* DataCue.h in Headers */, 25065 2D58D8551A15F65F00A5F726 /* DataDetection.h in Headers */,25066 25065 935E2B4E1AFF06CA00976F9F /* DataDetectorsCoreSPI.h in Headers */, 25067 25066 2D59F1BF1A0044C6001F3D29 /* DataDetectorsSPI.h in Headers */, … … 26035 26034 B27535760B053814002CE64F /* IntSizeHash.h in Headers */, 26036 26035 CE12524D1A1A77DE00864480 /* IOPMLibSPI.h in Headers */, 26036 C5227DF11C3C6DF100F5ED54 /* DataDetection.h in Headers */, 26037 26037 44DEF6431A6FF92700D45EEC /* IOReturnSPI.h in Headers */, 26038 26038 2D0B4AAB18DA1CCD00434DE1 /* IOSurface.h in Headers */, … … 28741 28741 580371611A66F00A00BAF519 /* ClipRect.cpp in Sources */, 28742 28742 CDEA76351460B71A008B31F1 /* Clock.cpp in Sources */, 28743 C5227DF21C3C6DF900F5ED54 /* DataDetection.mm in Sources */, 28743 28744 CDEA76341460B56F008B31F1 /* ClockGeneric.cpp in Sources */, 28744 28745 9BD8A95A18BEFC7600987E9A /* CollectionIndexCache.cpp in Sources */, … … 28919 28920 97BC6A311505F081001B74AC /* DatabaseTracker.cpp in Sources */, 28920 28921 BE23480C18A9870B00E4B6E8 /* DataCue.cpp in Sources */, 28921 2D58D8561A15F65F00A5F726 /* DataDetection.mm in Sources */,28922 28922 BC64641D11D7F416006455B0 /* DatasetDOMStringMap.cpp in Sources */, 28923 28923 A784941B0B5FE507001E237A /* DataTransfer.cpp in Sources */, -
trunk/Source/WebCore/editing/cocoa/DataDetection.h
r194591 r195300 27 27 #define DataDetection_h 28 28 29 #if PLATFORM(MAC)30 31 29 #import <wtf/RefPtr.h> 32 30 #import <wtf/RetainPtr.h> … … 40 38 class Range; 41 39 40 enum DataDetectorTypes { 41 DataDetectorTypeNone = 0, 42 DataDetectorTypePhoneNumber = 1 << 0, 43 DataDetectorTypeLink = 1 << 1, 44 DataDetectorTypeAddress = 1 << 2, 45 DataDetectorTypeCalendarEvent = 1 << 3, 46 DataDetectorTypeAll = ULONG_MAX 47 }; 48 42 49 class DataDetection { 43 50 public: 51 #if PLATFORM(MAC) 44 52 WEBCORE_EXPORT static RetainPtr<DDActionContext> detectItemAroundHitTestResult(const HitTestResult&, FloatRect& detectedDataBoundingBox, RefPtr<Range>& detectedDataRange); 53 #endif 54 WEBCORE_EXPORT static void detectContentInRange(RefPtr<Range>& contextRange, DataDetectorTypes); 45 55 }; 46 56 47 57 } // namespace WebCore 48 58 49 #endif // PLATFORM(MAC)50 51 59 #endif // DataDetection_h -
trunk/Source/WebCore/editing/cocoa/DataDetection.mm
r194591 r195300 27 27 #import "DataDetection.h" 28 28 29 #i f PLATFORM(MAC)30 29 #import "Attr.h" 30 #import "CSSStyleDeclaration.h" 31 31 #import "DataDetectorsSPI.h" 32 32 #import "FrameView.h" 33 #import "HTMLAnchorElement.h" 33 34 #import "HTMLTextFormControlElement.h" 34 35 #import "HitTestResult.h" 35 36 #import "Node.h" 37 #import "NodeList.h" 38 #import "NodeTraversal.h" 36 39 #import "Range.h" 37 40 #import "RenderObject.h" 41 #import "Text.h" 38 42 #import "TextIterator.h" 39 43 #import "VisiblePosition.h" … … 42 46 43 47 namespace WebCore { 48 49 #if PLATFORM(MAC) 44 50 45 51 static RetainPtr<DDActionContext> detectItemAtPositionWithRange(VisiblePosition position, RefPtr<Range> contextRange, FloatRect& detectedDataBoundingBox, RefPtr<Range>& detectedDataRange) … … 132 138 return detectItemAtPositionWithRange(position, contextRange, detectedDataBoundingBox, detectedDataRange); 133 139 } 140 #endif // PLATFORM(MAC) 141 142 void DataDetection::detectContentInRange(RefPtr<Range>&, DataDetectorTypes) 143 { 144 } 134 145 135 146 } // namespace WebCore 136 137 #endif // PLATFORM(MAC) -
trunk/Source/WebCore/loader/FrameLoader.cpp
r194888 r195300 126 126 #endif 127 127 128 #if ENABLE(DATA_DETECTION) 129 #include "DataDetection.h" 130 #endif 131 128 132 #if PLATFORM(IOS) 129 133 #include "DocumentType.h" … … 2278 2282 m_client.dispatchDidFinishLoad(); 2279 2283 loadingEvent = AXObjectCache::AXLoadingFinished; 2284 #if ENABLE(DATA_DETECTION) 2285 if (m_frame.settings().dataDetectorTypes() != DataDetectorTypeNone) { 2286 RefPtr<Range> documentRange = makeRange(firstPositionInNode(m_frame.document()->documentElement()), lastPositionInNode(m_frame.document()->documentElement())); 2287 DataDetection::detectContentInRange(documentRange, m_frame.settings().dataDetectorTypes()); 2288 } 2289 #endif 2280 2290 } 2281 2291 -
trunk/Source/WebCore/page/Settings.h
r194000 r195300 43 43 #include <wtf/text/AtomicStringHash.h> 44 44 45 #if ENABLE(DATA_DETECTION) 46 #include "DataDetection.h" 47 #endif 48 45 49 namespace WebCore { 46 50 -
trunk/Source/WebCore/page/Settings.in
r194683 r195300 229 229 230 230 useImageDocumentForSubframePDF initial=false 231 dataDetectorTypes type=DataDetectorTypes, initial=DataDetectorTypeNone, conditional=DATA_DETECTION 231 232 232 233 # Allow SourceBuffers to store up to 304MB each, enough for approximately five minutes -
trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h
r190102 r195300 26 26 #import <wtf/Platform.h> 27 27 28 #if PLATFORM(MAC)29 28 30 29 #import <WebCore/DataDetectorsCoreSPI.h> 31 30 #import <WebCore/SoftLinking.h> 31 32 #if PLATFORM(MAC) 32 33 33 34 #if USE(APPLE_INTERNAL_SDK) -
trunk/Source/WebKit/mac/ChangeLog
r195180 r195300 1 2016-01-19 Enrica Casucci <enrica@apple.com> 2 3 Add support for DataDetectors in WK (iOS). 4 https://bugs.webkit.org/show_bug.cgi?id=152989 5 rdar://problem/22855960 6 7 Reviewed by Tim Horton. 8 9 Adding feature definition for data detection. 10 11 * Configurations/FeatureDefines.xcconfig: 12 1 13 2016-01-16 Myles C. Maxfield <mmaxfield@apple.com> 2 14 -
trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
r194921 r195300 112 112 113 113 ENABLE_IOS_TEXT_AUTOSIZING[sdk=iphone*] = ENABLE_IOS_TEXT_AUTOSIZING; 114 ENABLE_DATA_DETECTION = ENABLE_DATA_DETECTION; 114 115 115 116 ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK)); -
trunk/Source/WebKit2/ChangeLog
r195295 r195300 1 2016-01-19 Enrica Casucci <enrica@apple.com> 2 3 Add support for DataDetectors in WK (iOS). 4 https://bugs.webkit.org/show_bug.cgi?id=152989 5 rdar://problem/22855960 6 7 Reviewed by Tim Horton. 8 9 This is the first step toward implementing Data Detectors support 10 in WK2. The patch adds a new property to the configuration 11 object to indicate the type of detection desired and propagates 12 to the WebProcess. 13 14 * Configurations/FeatureDefines.xcconfig: 15 * Shared/WebPreferencesDefinitions.h: 16 * UIProcess/API/Cocoa/WKWebView.mm: 17 (-[WKWebView initWithFrame:configuration:]): 18 * UIProcess/API/Cocoa/WKWebViewConfiguration.h: 19 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: 20 (-[WKWebViewConfiguration copyWithZone:]): 21 * WebKit2.xcodeproj/project.pbxproj: 22 * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: Added. 23 (WebKit::WebPage::fromWKDataDetectorTypes): 24 * WebProcess/WebPage/WebPage.cpp: 25 (WebKit::WebPage::updatePreferences): 26 * WebProcess/WebPage/WebPage.h: 27 1 28 2016-01-19 Commit Queue <commit-queue@webkit.org> 2 29 -
trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig
r194921 r195300 112 112 113 113 ENABLE_IOS_TEXT_AUTOSIZING[sdk=iphone*] = ENABLE_IOS_TEXT_AUTOSIZING; 114 ENABLE_DATA_DETECTION = ENABLE_DATA_DETECTION; 114 115 115 116 ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK)); -
trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h
r194683 r195300 240 240 macro(StorageBlockingPolicy, storageBlockingPolicy, UInt32, uint32_t, WebCore::SecurityOrigin::BlockThirdPartyStorage) \ 241 241 macro(JavaScriptRuntimeFlags, javaScriptRuntimeFlags, UInt32, uint32_t, 0) \ 242 macro(DataDetectorTypes, dataDetectorTypes, UInt32, uint32_t, 0) \ 242 243 \ 243 244 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r194750 r195300 383 383 pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::invisibleAutoplayNotPermittedKey(), WebKit::WebPreferencesStore::Value(!![_configuration _invisibleAutoplayNotPermitted])); 384 384 pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::mediaDataLoadsAutomaticallyKey(), WebKit::WebPreferencesStore::Value(!![_configuration _mediaDataLoadsAutomatically])); 385 #endif 386 #if ENABLE(DATA_DETECTION) 387 pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::dataDetectorTypesKey(), WebKit::WebPreferencesStore::Value(static_cast<uint32_t>([_configuration dataDetectorTypes]))); 385 388 #endif 386 389 #if ENABLE(WIRELESS_PLAYBACK_TARGET) -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h
r191228 r195300 52 52 #endif 53 53 54 /*! @enum WKDataDetectorTypes 55 @abstract The type of detection desired. 56 @constant WKDataDetectorTypeNone No detection is performed. 57 @constant WKDataDetectorTypePhoneNumber Phone numbers are detected and turned into links. 58 @constant WKDataDetectorTypeLink URLs in text are detected and turned into links. 59 @constant WKDataDetectorTypeAddress Addresses are detected and turned into links. 60 @constant WKDataDetectorTypeCalendarEvent Dates and times that are in the future are detected and turned into links. 61 @constant WKDataDetectorTypeAll All of the above data types are turned into links when detected. Choosing this value will 62 automatically include any new detection type that is added. 63 */ 64 typedef NS_OPTIONS(NSUInteger, WKDataDetectorTypes) { 65 WKDataDetectorTypeNone = 0, 66 WKDataDetectorTypePhoneNumber = 1 << 0, 67 WKDataDetectorTypeLink = 1 << 1, 68 WKDataDetectorTypeAddress = 1 << 2, 69 WKDataDetectorTypeCalendarEvent = 1 << 3, 70 WKDataDetectorTypeAll = NSUIntegerMax 71 } WK_ENUM_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); 72 54 73 /*! A WKWebViewConfiguration object is a collection of properties with 55 74 which to initialize a web view. … … 93 112 */ 94 113 @property (nonatomic) BOOL allowsAirPlayForMediaPlayback WK_AVAILABLE(10_11, 9_0); 114 115 /*! @abstract An enum value indicating the type of data detection desired. 116 @discussion The default value is WKDataDetectorTypeNone. 117 An example of how this property may affect the content loaded in the WKWebView is that content like 118 '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' 119 if the dataDetectorTypes property is set to WKDataDetectorTypePhoneNumber | WKDataDetectorTypeLink | WKDataDetectorTypeCalendarEvent. 120 121 */ 122 @property (nonatomic) WKDataDetectorTypes dataDetectorTypes WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); 95 123 96 124 #if TARGET_OS_IPHONE -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
r194496 r195300 199 199 configuration->_imageControlsEnabled = self->_imageControlsEnabled; 200 200 #endif 201 #if ENABLE(DATA_DETECTION) 202 configuration->_dataDetectorTypes = self->_dataDetectorTypes; 203 #endif 201 204 #if ENABLE(WIRELESS_TARGET_PLAYBACK) 202 205 configuration->_allowsAirPlayForMediaPlayback = self->_allowsAirPlayForMediaPlayback; -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r194902 r195300 1690 1690 C54256B918BEC18C00DE4179 /* WKFormPopover.mm in Sources */ = {isa = PBXBuildFile; fileRef = C54256B318BEC18B00DE4179 /* WKFormPopover.mm */; }; 1691 1691 C54256BA18BEC18C00DE4179 /* WKFormSelectControl.h in Headers */ = {isa = PBXBuildFile; fileRef = C54256B418BEC18C00DE4179 /* WKFormSelectControl.h */; }; 1692 C554A3131C49C36400A388FE /* WebPageCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = C554A3111C49BCCB00A388FE /* WebPageCocoa.mm */; }; 1692 1693 C55CB5B718C269CF00CA81E1 /* WKFormSelectPopover.mm in Sources */ = {isa = PBXBuildFile; fileRef = C57193BA18C149D0002D0F12 /* WKFormSelectPopover.mm */; }; 1693 1694 C55CB5B818C2A5D600CA81E1 /* WKFormSelectPicker.mm in Sources */ = {isa = PBXBuildFile; fileRef = C57193B918C149D0002D0F12 /* WKFormSelectPicker.mm */; }; … … 3933 3934 C54256B318BEC18B00DE4179 /* WKFormPopover.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFormPopover.mm; path = ios/forms/WKFormPopover.mm; sourceTree = "<group>"; }; 3934 3935 C54256B418BEC18C00DE4179 /* WKFormSelectControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKFormSelectControl.h; path = ios/forms/WKFormSelectControl.h; sourceTree = "<group>"; }; 3936 C554A3111C49BCCB00A388FE /* WebPageCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPageCocoa.mm; sourceTree = "<group>"; }; 3935 3937 C554FFA212E4E8EA002F22C0 /* WebDragClientMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDragClientMac.mm; sourceTree = "<group>"; }; 3936 3938 C57193B918C149D0002D0F12 /* WKFormSelectPicker.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFormSelectPicker.mm; path = ios/forms/WKFormSelectPicker.mm; sourceTree = "<group>"; }; … … 5089 5091 2D29ECCE192F2C2E00984B78 /* RemoteLayerTreeDisplayRefreshMonitor.h */, 5090 5092 2D29ECCF192F2C2E00984B78 /* RemoteLayerTreeDisplayRefreshMonitor.mm */, 5093 C554A3111C49BCCB00A388FE /* WebPageCocoa.mm */, 5091 5094 ); 5092 5095 path = Cocoa; … … 9393 9396 C5E1AFEC16B21012006CC1F2 /* APIWebArchive.mm in Sources */, 9394 9397 C5E1AFEE16B21025006CC1F2 /* APIWebArchiveResource.mm in Sources */, 9398 C554A3131C49C36400A388FE /* WebPageCocoa.mm in Sources */, 9395 9399 1A4832C71A9BC13C008B4DFE /* APIWebsiteDataRecord.cpp in Sources */, 9396 9400 1A3635A91A3144A300ED6197 /* APIWebsiteDataStore.cpp in Sources */, -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r194683 r195300 220 220 #endif 221 221 222 #if ENABLE(DATA_DETECTION) 223 #include <WebCore/DataDetection.h> 224 #endif 225 222 226 #if ENABLE(VIDEO) && USE(GSTREAMER) 223 227 #include <WebCore/MediaPlayerRequestInstallMissingPluginsCallback.h> … … 2936 2940 #endif 2937 2941 2942 #if ENABLE(DATA_DETECTION) 2943 settings.setDataDetectorTypes(fromWKDataDetectorTypes(store.getUInt32ValueForKey(WebPreferencesKey::dataDetectorTypesKey()))); 2944 #endif 2938 2945 #if ENABLE(GAMEPAD) 2939 2946 RuntimeEnabledFeatures::sharedFeatures().setGamepadsEnabled(store.getBoolValueForKey(WebPreferencesKey::gamepadsEnabledKey())); -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r195078 r195300 92 92 #endif 93 93 94 #if ENABLE(DATA_DETECTION) 95 #include <WebCore/DataDetection.h> 96 #endif 97 94 98 #if ENABLE(IOS_TOUCH_EVENTS) 95 99 #include <WebKitAdditions/PlatformTouchEventIOS.h> … … 1063 1067 void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t first, uint32_t count); 1064 1068 #endif 1069 #if ENABLE(DATA_DETECTION) 1070 WebCore::DataDetectorTypes fromWKDataDetectorTypes(uint32_t types); 1071 #endif 1065 1072 1066 1073 void setMainFrameIsScrollable(bool);
Note: See TracChangeset
for help on using the changeset viewer.