From f486d19d62f1bc33246748b14b14a9dfa617b57f Mon Sep 17 00:00:00 2001 From: Iain Merrick Date: Thu, 19 Aug 2010 17:55:56 +0100 Subject: Merge WebKit at r65615 : Initial merge by git. Change-Id: Ifbf384f4531e3b58475a662e38195c2d9152ae79 --- WebCore/page/UserContentURLPattern.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'WebCore/page/UserContentURLPattern.cpp') 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(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; -- cgit v1.1