| Summary: | Add support for lookup on iOS | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Enrica Casucci <enrica> | ||||
| Component: | WebKit2 | Assignee: | Enrica Casucci <enrica> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | bdakin, thorton | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Enrica Casucci
2015-04-28 11:21:26 PDT
Created attachment 251870 [details]
Patch
Comment on attachment 251870 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251870&action=review > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1309 > + CGRect presentationRect = view->_page->editorState().selectionIsRange ? view->_page->editorState().postLayoutData().selectionRects[0].rect() : view->_page->editorState().postLayoutData().caretRectAtStart; Why do we only use the first rect? What happens if you have a multi-line selection? (In reply to comment #2) > Comment on attachment 251870 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=251870&action=review > > > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1309 > > + CGRect presentationRect = view->_page->editorState().selectionIsRange ? view->_page->editorState().postLayoutData().selectionRects[0].rect() : view->_page->editorState().postLayoutData().caretRectAtStart; > > Why do we only use the first rect? What happens if you have a multi-line > selection? We could in theory compute the union of the rects, but this is used only to position the popover. I don't have clear indication of what is expected here and I think this is good enough to start. Committed revision 183503. |