зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1139560 - Fix srcset parser 'After descriptor' state mishandling spaces. r=jst
This commit is contained in:
Родитель
5b798a33e0
Коммит
46f4269b7a
|
@ -621,11 +621,13 @@ ResponsiveImageCandidate::ConsumeDescriptors(nsAString::const_iterator& aIter,
|
|||
// End of current descriptor, consume it, skip spaces
|
||||
// ("After descriptor" state in spec) before continuing
|
||||
descriptors.AddDescriptor(Substring(currentDescriptor, iter));
|
||||
for (; iter != end && *iter == char16_t(' '); ++iter);
|
||||
for (; iter != end && nsContentUtils::IsHTMLWhitespace(*iter); ++iter);
|
||||
if (iter == end) {
|
||||
break;
|
||||
}
|
||||
currentDescriptor = iter;
|
||||
// Leave one whitespace so the loop advances to this position next iteration
|
||||
iter--;
|
||||
} else if (*iter == char16_t('(')) {
|
||||
inParens = true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче