Use RetainPtr and rename +autocorrectionRectsWithRects:lastRect: to +autocorrectionRe...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2019 23:49:09 +0000 (23:49 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2019 23:49:09 +0000 (23:49 +0000)
commitea7c7214ccabd0bf62bc2ef0be3cd04748f2e5a2
tree9e8c4502d2c2c31fc7dddea8c606c182b28d8a38
parent966335a2ef781a9e594eafb295484413a70c8be0
Use RetainPtr and rename +autocorrectionRectsWithRects:lastRect: to +autocorrectionRectsWithFirstCGRect:lastCGRect:
https://bugs.webkit.org/show_bug.cgi?id=197122

Reviewed by Wenson Hsieh.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]): Renamed; formerly named +autocorrectionRectsWithRects:lastRect:.
While I am here use else-branch to initialize firstRect and lastRect just to make the code closer to the optimal
assembly. Also use Vector::{isEmpty, first, last}() instead of using the index operator overload and size() for
emptiness checks. The code is more readable at the cost being ever so slightly slower (due to the overflow checks
in first() and last()), but this code is likely not hot enough for it to matter.
(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]): Update for renaming.
(+[WKAutocorrectionRects autocorrectionRectsWithFirstCGRect:lastCGRect:]): Ditto.
(+[WKAutocorrectionRects autocorrectionRectsWithRects:lastRect:]): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm