Index: third_party/WebKit/Source/core/testing/MockHyphenation.cpp |
diff --git a/third_party/WebKit/Source/core/testing/MockHyphenation.cpp b/third_party/WebKit/Source/core/testing/MockHyphenation.cpp |
index 08e1d6991bf435db98d7d301c9b0746e8c9eabfb..5e166d9a0dfdbbadf403973cd5e675d18980ed1e 100644 |
--- a/third_party/WebKit/Source/core/testing/MockHyphenation.cpp |
+++ b/third_party/WebKit/Source/core/testing/MockHyphenation.cpp |
@@ -9,13 +9,13 @@ |
size_t MockHyphenation::lastHyphenLocation(const StringView& text, |
size_t beforeIndex) const |
{ |
- String str = text.toString(); |
- if (str.endsWith("phenation", TextCaseASCIIInsensitive)) { |
- if (beforeIndex - (str.length() - 9) > 4) |
- return 4 + (str.length() - 9); |
- if (str.endsWith("hyphenation", TextCaseASCIIInsensitive) |
- && beforeIndex - (str.length() - 11) > 2) { |
- return 2 + (str.length() - 11); |
+ RefPtr<StringImpl> str = text.toString(); |
+ if (str->endsWithIgnoringASCIICase("phenation", 9)) { |
+ if (beforeIndex - (str->length() - 9) > 4) |
+ return 4 + (str->length() - 9); |
+ if (str->endsWithIgnoringASCIICase("hyphenation", 11) |
+ && beforeIndex - (str->length() - 11) > 2) { |
+ return 2 + (str->length() - 11); |
} |
} |
return 0; |