mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1139560 - Fix srcset parser 'After descriptor' state mishandling spaces. r=jst
This commit is contained in:
parent
47ba37744a
commit
e974724ccd
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user