Implement the HTML5 algorithm for parsing a legacy color value: add comment pointing out that HTML5 says we should handle system colors. (Bug 121738)

This commit is contained in:
L. David Baron 2010-06-03 13:11:34 -07:00
Родитель 7d1e9ef96f
Коммит 46fa64dce6
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -1164,6 +1164,11 @@ nsAttrValue::ParseColor(const nsAString& aString, nsIDocument* aDocument)
}
}
// FIXME (maybe): HTML5 says we should handle system colors. This
// means we probably need another storage type, since we'd need to
// handle dynamic changes. However, I think this is a bad idea:
// http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-May/026449.html
// Use NS_LooseHexToRGB as a fallback if nothing above worked.
if (NS_LooseHexToRGB(colorStr, &color)) {
SetColorValue(color, aString);