This tracks the work required to support lookup in WK2 on iOS. rdar://problem/19994090
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.