| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Harri Porten (porten@kde.org) | 2 * Copyright (C) 2000 Harri Porten (porten@kde.org) |
| 3 * Copyright (C) 2006 Jon Shier (jshier@iastate.edu) | 3 * Copyright (C) 2006 Jon Shier (jshier@iastate.edu) |
| 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights resev
ed. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights resev
ed. |
| 5 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 void WindowFeatures::parseDialogFeatures(const String& string, DialogFeaturesMap
& map) | 237 void WindowFeatures::parseDialogFeatures(const String& string, DialogFeaturesMap
& map) |
| 238 { | 238 { |
| 239 Vector<String> vector; | 239 Vector<String> vector; |
| 240 string.split(';', vector); | 240 string.split(';', vector); |
| 241 size_t size = vector.size(); | 241 size_t size = vector.size(); |
| 242 for (size_t i = 0; i < size; ++i) { | 242 for (size_t i = 0; i < size; ++i) { |
| 243 const String& featureString = vector[i]; | 243 const String& featureString = vector[i]; |
| 244 | 244 |
| 245 size_t separatorPosition = featureString.find('='); | 245 size_t separatorPosition = featureString.find('='); |
| 246 size_t colonPosition = featureString.find(':'); | 246 size_t colonPosition = featureString.find(':'); |
| 247 if (separatorPosition != notFound && colonPosition != notFound) | 247 if (separatorPosition != kNotFound && colonPosition != kNotFound) |
| 248 continue; // ignore strings that have both = and : | 248 continue; // ignore strings that have both = and : |
| 249 if (separatorPosition == notFound) | 249 if (separatorPosition == kNotFound) |
| 250 separatorPosition = colonPosition; | 250 separatorPosition = colonPosition; |
| 251 | 251 |
| 252 String key = featureString.left(separatorPosition).stripWhiteSpace().low
er(); | 252 String key = featureString.left(separatorPosition).stripWhiteSpace().low
er(); |
| 253 | 253 |
| 254 // Null string for value indicates key without value. | 254 // Null string for value indicates key without value. |
| 255 String value; | 255 String value; |
| 256 if (separatorPosition != notFound) { | 256 if (separatorPosition != kNotFound) { |
| 257 value = featureString.substring(separatorPosition + 1).stripWhiteSpa
ce().lower(); | 257 value = featureString.substring(separatorPosition + 1).stripWhiteSpa
ce().lower(); |
| 258 value = value.left(value.find(' ')); | 258 value = value.left(value.find(' ')); |
| 259 } | 259 } |
| 260 | 260 |
| 261 map.set(key, value); | 261 map.set(key, value); |
| 262 } | 262 } |
| 263 } | 263 } |
| 264 | 264 |
| 265 } // namespace WebCore | 265 } // namespace WebCore |
| OLD | NEW |