Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2252833003: [ios] Use range.length instead of range.location for substring matching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index a8ac6e39465c766c05892a514cbfe1f2e2ba4f8e..b2905e33be8c186dd3d46a8c6456739b19cf758c 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -1612,7 +1612,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
for (UIGestureRecognizer* iRecognizer in [view gestureRecognizers]) {
if (iRecognizer != recognizer) {
NSString* description = [iRecognizer description];
- if ([description rangeOfString:fragment].location != NSNotFound) {
+ if ([description rangeOfString:fragment].length) {
[iRecognizer requireGestureRecognizerToFail:recognizer];
// requireGestureRecognizerToFail: doesn't retain the recognizer, so it
// is possible for |iRecognizer| to outlive |recognizer| and end up with
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698