It is necessary to cached the data detection results as soon as the detection has been performed. We need to keep them around for the clients to be able to retrieve the full url for data detectors links.
Created attachment 270061 [details] Patch
Created attachment 270064 [details] Patch that can be applied
Attachment 270064 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/Cocoa/WebPageProxyCocoa.mm:29: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebKit2/Shared/Cocoa/DataDetectionResult.mm:63: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/Shared/Cocoa/DataDetectionResult.mm:63: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 3 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 270064 [details] Patch that can be applied View in context: https://bugs.webkit.org/attachment.cgi?id=270064&action=review > Source/WebCore/loader/EmptyClients.h:272 > + virtual void dispatchDidFinishDataDetection(NSArray *) override { } It's getting weirder and weirder that this is an NSArray instead of a Vector<RetainPtr<>>, but we'll fix it in a follow up? > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2989 > + send(Messages::WebPageProxy::SetDataDetectionResult(dataDetectionResult)); Seems like this should have a trailing 's'
(In reply to comment #4) > Comment on attachment 270064 [details] > Patch that can be applied > > View in context: > https://bugs.webkit.org/attachment.cgi?id=270064&action=review > > > Source/WebCore/loader/EmptyClients.h:272 > > + virtual void dispatchDidFinishDataDetection(NSArray *) override { } > > It's getting weirder and weirder that this is an NSArray instead of a > Vector<RetainPtr<>>, but we'll fix it in a follow up? > I keep it as an NSArray because this is how DD returns ii and how it is consumed in the UI process. Using a Vector would require an unnecessary copy. > > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2989 > > + send(Messages::WebPageProxy::SetDataDetectionResult(dataDetectionResult)); > > Seems like this should have a trailing 's' I've used the singular when I'm passing the struct that contains results (plural).
Committed revision 195722.