WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
167565
[iOS] Expose WebCore::DataDetection::detectContentInRange WKWebProcessPlugInRangeHandle
https://bugs.webkit.org/show_bug.cgi?id=167565
Summary
[iOS] Expose WebCore::DataDetection::detectContentInRange WKWebProcessPlugInR...
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+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
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
Committed <
https://trac.webkit.org/r211354
>.
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.
Top of Page
Format For Printing
XML
Clone This Bug