Use std::min<VisiblePosition> and std::max<VisiblePosition> when the result needs to be copied instead of doing the comparison by hand to make the code a tiny bit more clear. Also, don't copy a VisiblePosition when doing the min/max in-place.
Created attachment 403003 [details] Patch
Comment on attachment 403003 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=403003&action=review > Source/WebKit/ChangeLog:12 > + are unlikely to effect code generation. If they do, they make things a tiny bit more > + efficient. To be precise, only the latter makes things a tiny bit more efficient.
Comment on attachment 403003 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=403003&action=review r=me > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:4183 > + startOfRangeOfInterestInSelection = std::max<VisiblePosition>(rangeOfInterestStart, selectionStart); > + endOfRangeOfInterestInSelection = std::min<VisiblePosition>(rangeOfInterestEnd, selectionEnd); No need to specify <VisiblePosition> when both arguments are <VisiblePosition>.
Comment on attachment 403003 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=403003&action=review Thanks for the review, Geoff! >> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:4183 >> + endOfRangeOfInterestInSelection = std::min<VisiblePosition>(rangeOfInterestEnd, selectionEnd); > > No need to specify <VisiblePosition> when both arguments are <VisiblePosition>. OK.
Created attachment 403004 [details] To Land
Comment on attachment 403004 [details] To Land Clearing flags on attachment: 403004 Committed r263634: <https://trac.webkit.org/changeset/263634>
All reviewed patches have been landed. Closing bug.
<rdar://problem/64865522>