mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Implement the HTML5 algorithm for parsing a legacy color value: add comment pointing out whitespace and emptiness issues. (Bug 121738)
This commit is contained in:
parent
46fa64dce6
commit
975623ca0e
@ -1142,6 +1142,10 @@ nsAttrValue::ParseColor(const nsAString& aString, nsIDocument* aDocument)
|
||||
{
|
||||
ResetIfSet();
|
||||
|
||||
// FIXME (partially, at least): HTML5's algorithm says we shouldn't do
|
||||
// the whitespace compression, trimming, or the test for emptiness.
|
||||
// (I'm a little skeptical that we shouldn't do the whitespace
|
||||
// trimming; WebKit also does it.)
|
||||
nsAutoString colorStr(aString);
|
||||
colorStr.CompressWhitespace(PR_TRUE, PR_TRUE);
|
||||
if (colorStr.IsEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user