diff options
author | Cary Clark <cary@android.com> | 2010-01-25 12:49:57 -0500 |
---|---|---|
committer | Cary Clark <cary@android.com> | 2010-01-25 12:49:57 -0500 |
commit | 3b3752c8d25150e6cf8d31c0fc5d9f8953a5c4f7 (patch) | |
tree | aa2c5536181dc37356a38a916d67e414ad0ced6d | |
parent | ae1b04df679593f44b55779daac6ef70fc0ff8d0 (diff) | |
download | external_webkit-3b3752c8d25150e6cf8d31c0fc5d9f8953a5c4f7.zip external_webkit-3b3752c8d25150e6cf8d31c0fc5d9f8953a5c4f7.tar.gz external_webkit-3b3752c8d25150e6cf8d31c0fc5d9f8953a5c4f7.tar.bz2 |
allow text node boundaries to delimit addresses
The current boundary condition for a state without a trailing
zip code is a couple of spaces or a non-alphanumeric character,
like punctuation. Add allowing the end of the text node as
a termination condition.
Fixes http://b/2384326
-rw-r--r-- | WebKit/android/nav/CacheBuilder.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp index 784c3aa..c665887 100644 --- a/WebKit/android/nav/CacheBuilder.cpp +++ b/WebKit/android/nav/CacheBuilder.cpp @@ -1889,7 +1889,9 @@ CacheBuilder::FoundState CacheBuilder::FindPartialAddress(const UChar* baseChars s->mProgress = ZIP_CODE; // a couple of delimiters is an indication that the state name is good // or, a non-space / non-alpha-digit is also good - s->mZipDelimiter = s->mLineCount > 2 || isUnicodeSpace(ch) == false; + s->mZipDelimiter = s->mLineCount > 2 + || isUnicodeSpace(ch) == false + || chars == s->mEnd; if (WTF::isASCIIDigit(ch)) s->mZipStart = chars; goto resetState; |