Bug 167565

Summary: [iOS] Expose WebCore::DataDetection::detectContentInRange WKWebProcessPlugInRangeHandle
Product: WebKit Reporter: mitz
Component: WebKit APIAssignee: mitz
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, sam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Add -[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:] sam: review+

mitz
Reported 2017-01-29 14:22:17 PST
A bundle API client requires the ability to “linkify” a range. Patch forthcoming.
Attachments
Add -[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:] (37.10 KB, patch)
2017-01-29 15:40 PST, mitz
sam: review+
mitz
Comment 1 2017-01-29 15:40:18 PST
Created attachment 300075 [details] Add -[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:]
WebKit Commit Bot
Comment 2 2017-01-29 15:43:22 PST
Attachment 300075 [details] did not pass style-queue: ERROR: Source/WebKit2/Shared/API/Cocoa/WKDataDetectorTypes.h:46: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 13 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 3 2017-01-29 16:01:15 PST
Comment on attachment 300075 [details] Add -[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:] View in context: https://bugs.webkit.org/attachment.cgi?id=300075&action=review > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h:46 > +#if TARGET_OS_IPHONE > +- (NSArray *)detectDataWithTypes:(WKDataDetectorTypes)types context:(NSDictionary *)context WK_API_AVAILABLE(ios(WK_IOS_TBA)); > +#endif Given that the underlying DataDetection::detectContentInRange() is cross platform, can we make this cross-platform as well?
mitz
Comment 4 2017-01-29 16:09:08 PST
(In reply to comment #3) > Comment on attachment 300075 [details] > Add -[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:] > > View in context: > https://bugs.webkit.org/attachment.cgi?id=300075&action=review > > > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h:46 > > +#if TARGET_OS_IPHONE > > +- (NSArray *)detectDataWithTypes:(WKDataDetectorTypes)types context:(NSDictionary *)context WK_API_AVAILABLE(ios(WK_IOS_TBA)); > > +#endif > > Given that the underlying DataDetection::detectContentInRange() is cross > platform, can we make this cross-platform as well? Thanks for the review, Sam! On macOS, DataDetection::detectContentInRange() has a degenerate implementation that returns nil. I am afraid that it would just be misleading to expose it via the WebKit API.
mitz
Comment 5 2017-01-29 16:28:10 PST
Sam Weinig
Comment 6 2017-01-29 16:29:14 PST
(In reply to comment #4) > (In reply to comment #3) > > Comment on attachment 300075 [details] > > Add -[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:] > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=300075&action=review > > > > > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h:46 > > > +#if TARGET_OS_IPHONE > > > +- (NSArray *)detectDataWithTypes:(WKDataDetectorTypes)types context:(NSDictionary *)context WK_API_AVAILABLE(ios(WK_IOS_TBA)); > > > +#endif > > > > Given that the underlying DataDetection::detectContentInRange() is cross > > platform, can we make this cross-platform as well? > > Thanks for the review, Sam! On macOS, DataDetection::detectContentInRange() > has a degenerate implementation that returns nil. I am afraid that it would > just be misleading to expose it via the WebKit API. Indeed!
Note You need to log in before you can comment on or make changes to this bug.