зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1139560 - Fix srcset parser 'After descriptor' state mishandling spaces. r=jst
This commit is contained in:
Родитель
7e5e65290d
Коммит
99dc02a8c8
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче