StyledElement: Simplify addCSSColor().
Created attachment 117689 [details]
Comment on attachment 117689 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=117689&action=review
> + // An empty string doesn't apply a color. (Only whitespace does, which is why this check occurs before trimming.)
This wording (and the old wording) is terribly confusing.
The phrase “only whitespace applies a color” is not what we mean here. What we mean is “A string containing only whitespace applies a color”. So we need to word it that way: “A string containing only”, “One containing only”, “A string with only”, or “One with only”.
The term “trimming” is confusing, since the function called below is stripWhiteSpace, and does not use the word “trim”.
> + Color color(colorString);
I think I’d call this local variable parsedColor.
Committed r101870: <http://trac.webkit.org/changeset/101870>