Lines Matching refs:position

72 static bool skipExactly(const UChar*& position, const UChar* end, UChar delimiter)
74 if (position < end && *position == delimiter) {
75 ++position;
82 static bool skipExactly(const UChar*& position, const UChar* end)
84 if (position < end && characterPredicate(*position)) {
85 ++position;
91 static void skipUtil(const UChar*& position, const UChar* end, UChar delimiter)
93 while (position < end && *position != delimiter)
94 ++position;
98 static void skipWhile(const UChar*& position, const UChar* end)
100 while (position < end && characterPredicate(*position))
101 ++position;
202 const UChar* position = begin;
205 while (position < end) {
206 skipWhile<isASCIISpace>(position, end);
207 const UChar* beginSource = position;
208 skipWhile<isSourceCharacter>(position, end);
210 if (isFirstSourceInList && equalIgnoringCase("'none'", beginSource, position - beginSource))
219 if (parseSource(beginSource, position, scheme, host, port, hostHasWildcard, portHasWildcard)) {
225 ASSERT(position == end || isASCIISpace(*position));
245 const UChar* position = begin;
248 skipUtil(position, end, ':');
250 if (position == end) {
252 if (!parseHost(beginHost, position, host, hostHasWildcard))
257 if (end - position == 1) {
258 ASSERT(*position == ':');
260 if (!parseScheme(begin, position, scheme))
265 ASSERT(end - position >= 2);
266 if (position[1] == '/') {
267 if (!parseScheme(begin, position, scheme)
268 || !skipExactly(position, end, ':')
269 || !skipExactly(position, end, '/')
270 || !skipExactly(position, end, '/'))
272 beginHost = position;
273 skipUtil(position, end, ':');
276 if (position == beginHost)
279 if (!parseHost(beginHost, position, host, hostHasWildcard))
282 if (position == end) {
287 if (!skipExactly(position, end, ':'))
290 if (!parsePort(position, end, port, portHasWildcard))
307 const UChar* position = begin;
309 if (!skipExactly<isASCIIAlpha>(position, end))
312 skipWhile<isSchemeContinuationCharacter>(position, end);
314 if (position != end)
334 const UChar* position = begin;
336 if (skipExactly(position, end, '*')) {
339 if (position == end)
342 if (!skipExactly(position, end, '.'))
346 const UChar* hostBegin = position;
348 while (position < end) {
349 if (!skipExactly<isHostCharacter>(position, end))
352 skipWhile<isHostCharacter>(position, end);
354 if (position < end && !skipExactly(position, end, '.'))
358 ASSERT(position == end);
380 const UChar* position = begin;
381 skipWhile<isASCIIDigit>(position, end);
383 if (position != end)
440 const UChar* position = value.characters();
441 const UChar* end = position + value.length();
443 while (position < end) {
444 skipWhile<isASCIISpace>(position, end);
446 const UChar* optionsValueBegin = position;
448 if (!skipExactly<isOptionValueCharacter>(position, end))
451 skipWhile<isOptionValueCharacter>(position, end);
453 String optionsValue(optionsValueBegin, position - optionsValueBegin);
546 const UChar* position = policy.characters();
547 const UChar* end = position + policy.length();
549 while (position < end) {
550 const UChar* directiveBegin = position;
551 skipUtil(position, end, ';');
554 if (parseDirective(directiveBegin, position, name, value)) {
559 ASSERT(position == end || *position == ';');
560 skipExactly(position, end, ';');
573 const UChar* position = begin;
574 skipWhile<isASCIISpace>(position, end);
576 const UChar* nameBegin = position;
577 skipWhile<isDirectiveNameCharacter>(position, end);
580 if (nameBegin == position)
583 name = String(nameBegin, position - nameBegin);
585 if (position == end)
588 if (!skipExactly<isASCIISpace>(position, end))
591 skipWhile<isASCIISpace>(position, end);
593 const UChar* valueBegin = position;
594 skipWhile<isDirectiveValueCharacter>(position, end);
596 if (position != end)
600 if (valueBegin == position)
603 value = String(valueBegin, position - valueBegin);