Bug 155278

Summary: Retrieve additional context for some data detector link for preview and action menu
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: WebKit2Assignee: Enrica Casucci <enrica>
Status: RESOLVED FIXED    
Severity: Normal CC: thorton
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch thorton: review+

Enrica Casucci
Reported 2016-03-09 17:05:34 PST
Some data detector results can be augmented retrieving the text surrounding the link. rdar://problem/24884951
Attachments
Patch (12.46 KB, patch)
2016-03-09 17:23 PST, Enrica Casucci
thorton: review+
Enrica Casucci
Comment 1 2016-03-09 17:23:42 PST
Tim Horton
Comment 2 2016-03-09 17:29:10 PST
Comment on attachment 273516 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=273516&action=review > Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:446 > + NSMutableDictionary *extendedContext = nil; > + extendedContext = [[[NSMutableDictionary alloc] init] autorelease]; Why autorelease instead of RetainPtr? > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3837 > + newContext = [[[NSMutableDictionary alloc] init] autorelease]; Ditto. > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2208 > + info.textBefore = plainTextReplacingNoBreakSpace(rangeExpandedByCharactersInDirectionAtWordBoundary(linkRange->startPosition(), 350, DirectionBackward).get(), TextIteratorDefaultBehavior, true); Random 350 in the middle of the line could use constant-ing.
Enrica Casucci
Comment 3 2016-03-09 18:05:58 PST
Committed revision 197916.
Note You need to log in before you can comment on or make changes to this bug.