• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/WebCore-7537.78.1/platform/network/

Lines Matching refs:pos

47 // true if there is more to parse, after incrementing pos past whitespace.
48 // Note: Might return pos == str.length()
49 static inline bool skipWhiteSpace(const String& str, unsigned& pos, bool fromHttpEquivMeta)
54 while (pos < len && str[pos] <= ' ')
55 ++pos;
57 while (pos < len && (str[pos] == '\t' || str[pos] == ' '))
58 ++pos;
61 return pos < len;
65 // incrementing pos on match, otherwise leaving pos unchanged.
66 // Note: Might return pos == str.length()
67 static inline bool skipToken(const String& str, unsigned& pos, const char* token)
70 unsigned current = pos;
81 pos = current;
86 static inline bool skipEquals(const String& str, unsigned &pos)
88 return skipWhiteSpace(str, pos, false) && str[pos++] == '=' && skipWhiteSpace(str, pos, false);
91 // True if a value present, incrementing pos to next space or semicolon, if any.
92 // Note: might return pos == str.length().
93 static inline bool skipValue(const String& str, unsigned& pos)
95 unsigned start = pos;
97 while (pos < len) {
98 if (str[pos] == ' ' || str[pos] == '\t' || str[pos] == ';')
100 ++pos;
102 return pos != start;
172 unsigned pos = 0;
174 if (!skipWhiteSpace(refresh, pos, fromHttpEquivMeta))
177 while (pos != len && refresh[pos] != ',' && refresh[pos] != ';')
178 ++pos;
180 if (pos == len) { // no URL
187 delay = refresh.left(pos).stripWhiteSpace().toDouble(&ok);
191 ++pos;
192 skipWhiteSpace(refresh, pos, fromHttpEquivMeta);
193 unsigned urlStartPos = pos;
201 urlStartPos = pos; // e.g. "Refresh: 0; url.html"
303 unsigned int pos, len;
304 findCharsetInMediaType(mediaType, pos, len);
305 return mediaType.substring(pos, len);
313 size_t pos = start;
316 while (pos < length) {
317 pos = mediaType.find("charset", pos, false);
318 if (pos == notFound || pos == 0) {
324 if (mediaType[pos-1] > ' ' && mediaType[pos-1] != ';') {
325 pos += 7;
329 pos += 7;
332 while (pos != length && mediaType[pos] <= ' ')
333 ++pos;
335 if (mediaType[pos++] != '=') // this "charset" substring wasn't a parameter name, but there may be others
338 while (pos != length && (mediaType[pos] <= ' ' || mediaType[pos] == '"' || mediaType[pos] == '\''))
339 ++pos;
342 unsigned endpos = pos;
343 while (pos != length && mediaType[endpos] > ' ' && mediaType[endpos] != '"' && mediaType[endpos] != '\'' && mediaType[endpos] != ';')
346 charsetPos = pos;
347 charsetLen = endpos - pos;
363 unsigned pos = 0;
365 if (!skipWhiteSpace(header, pos, false))
368 if (header[pos] == '0')
371 if (header[pos++] != '1') {
382 if (!skipWhiteSpace(header, pos, false))
385 if (header[pos++] != ';') {
387 failurePosition = pos;
391 if (!skipWhiteSpace(header, pos, false))
395 if (skipToken(header, pos, "mode")) {
398 failurePosition = pos;
402 if (!skipEquals(header, pos)) {
404 failurePosition = pos;
407 if (!skipToken(header, pos, "block")) {
409 failurePosition = pos;
413 } else if (skipToken(header, pos, "report")) {
416 failurePosition = pos;
420 if (!skipEquals(header, pos)) {
422 failurePosition = pos;
425 size_t startPos = pos;
426 if (!skipValue(header, pos)) {
428 failurePosition = pos;
431 reportURL = header.substring(startPos, pos - startPos);
435 failurePosition = pos;