diff options
author | Iain Merrick <husky@google.com> | 2010-08-19 17:55:56 +0100 |
---|---|---|
committer | Iain Merrick <husky@google.com> | 2010-08-23 11:05:40 +0100 |
commit | f486d19d62f1bc33246748b14b14a9dfa617b57f (patch) | |
tree | 195485454c93125455a30e553a73981c3816144d /WebCore/page/UserContentURLPattern.cpp | |
parent | 6ba0b43722d16bc295606bec39f396f596e4fef1 (diff) | |
download | external_webkit-f486d19d62f1bc33246748b14b14a9dfa617b57f.zip external_webkit-f486d19d62f1bc33246748b14b14a9dfa617b57f.tar.gz external_webkit-f486d19d62f1bc33246748b14b14a9dfa617b57f.tar.bz2 |
Merge WebKit at r65615 : Initial merge by git.
Change-Id: Ifbf384f4531e3b58475a662e38195c2d9152ae79
Diffstat (limited to 'WebCore/page/UserContentURLPattern.cpp')
-rw-r--r-- | WebCore/page/UserContentURLPattern.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/WebCore/page/UserContentURLPattern.cpp b/WebCore/page/UserContentURLPattern.cpp index 09eb678..272284a 100644 --- a/WebCore/page/UserContentURLPattern.cpp +++ b/WebCore/page/UserContentURLPattern.cpp @@ -63,14 +63,14 @@ bool UserContentURLPattern::parse(const String& pattern) { DEFINE_STATIC_LOCAL(const String, schemeSeparator, ("://")); - int schemeEndPos = pattern.find(schemeSeparator); - if (schemeEndPos == -1) + size_t schemeEndPos = pattern.find(schemeSeparator); + if (schemeEndPos == notFound) return false; m_scheme = pattern.left(schemeEndPos); - int hostStartPos = schemeEndPos + schemeSeparator.length(); - if (hostStartPos >= static_cast<int>(pattern.length())) + unsigned hostStartPos = schemeEndPos + schemeSeparator.length(); + if (hostStartPos >= pattern.length()) return false; int pathStartPos = 0; @@ -78,8 +78,8 @@ bool UserContentURLPattern::parse(const String& pattern) if (equalIgnoringCase(m_scheme, "file")) pathStartPos = hostStartPos; else { - int hostEndPos = pattern.find("/", hostStartPos); - if (hostEndPos == -1) + size_t hostEndPos = pattern.find("/", hostStartPos); + if (hostEndPos == notFound) return false; m_host = pattern.substring(hostStartPos, hostEndPos - hostStartPos); @@ -96,7 +96,7 @@ bool UserContentURLPattern::parse(const String& pattern) } // No other '*' can occur in the host. - if (m_host.find("*") != -1) + if (m_host.find("*") != notFound) return false; pathStartPos = hostEndPos; |