diff options
Diffstat (limited to 'WebCore/page/DOMWindow.cpp')
-rw-r--r-- | WebCore/page/DOMWindow.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp index 71ad7cb..86708de 100644 --- a/WebCore/page/DOMWindow.cpp +++ b/WebCore/page/DOMWindow.cpp @@ -331,20 +331,20 @@ void DOMWindow::parseModalDialogFeatures(const String& featuresArg, HashMap<Stri Vector<String>::const_iterator end = features.end(); for (Vector<String>::const_iterator it = features.begin(); it != end; ++it) { String s = *it; - int pos = s.find('='); - int colonPos = s.find(':'); - if (pos >= 0 && colonPos >= 0) + size_t pos = s.find('='); + size_t colonPos = s.find(':'); + if (pos != notFound && colonPos != notFound) continue; // ignore any strings that have both = and : - if (pos < 0) + if (pos == notFound) pos = colonPos; - if (pos < 0) { + if (pos == notFound) { // null string for value means key without value map.set(s.stripWhiteSpace().lower(), String()); } else { String key = s.left(pos).stripWhiteSpace().lower(); String val = s.substring(pos + 1).stripWhiteSpace().lower(); - int spacePos = val.find(' '); - if (spacePos != -1) + size_t spacePos = val.find(' '); + if (spacePos != notFound) val = val.left(spacePos); map.set(key, val); } |