| Summary: | Fix SVG systemLanguage conditional processing | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | karlcow, sabouhallawa, simon.fraser, webkit-bug-importer, zimmermann |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=262146 | ||
|
Description
Ahmad Saleem
2023-09-26 14:21:13 PDT
Merge this as well: https://source.chromium.org/chromium/chromium/src/+/592442acb95d29bd54f068f70009a6ec47fa863b static bool isLangTagPrefix(const String& langTag, const String& language)
{
if (!langTag.startsWithIgnoringASCIICase(language))
return false;
return langTag.length() == language.length() || langTag[language.length()] == '-';
}
static bool matchLanguageList(const String& langTag, const Vector<String>& languages)
{
for (const auto& value : languages) {
if (isLangTagPrefix(langTag, value))
return true;
}
return false;
}
and following changes here: "SVGTests::isValid()"
for (auto& langTag : attributes->systemLanguage().items()) {
if (matchLanguageList(langTag, genericDefaultLanguage))
return false;
}
___
It leads to following compile errors:
candidate function not viable: no known conversion from 'StringView' to 'const Vector<String>'
for 2nd argument
and
no matching function for call to 'matchLanguageList'
___
Still looking into it but if someone want to take it. Go ahead and run with it. Might not come back soon but good to share what tried to make it easier for others.
Probably fixing Bug 262146 first would help with this one. |