Created attachment 67524 [details]
testcase. pass if the computed value of background-color is #c0e000.
Some attributes like <font color> or <body bgcolor> can take color keywords. In HTML5, such keywords are limited to "transparent" and SVG color keywords defined in CSS3 Color module. Any strings other than these keywords would follow the "rules for parsing a legacy color value" http://whatwg.org/html5#rules-for-parsing-a-legacy-color-value
The keyword "currentColor" is also defined in css3-color, but in a different section from SVG Color keywords. Hence, if that keyword is specified in attributes which can take color keywords, it should follow the algorithm and return #c0e000, rather than the value of the "color" property, which is how the keyword is processed in CSS. However, WebKit does apply the value of the "color" property rather than #c0e000.
Is this causing compat problems on any sites, or are you just noting that it doesn't match the spec? Tab Atkins has suggested WebKit's behavior be standardized:
(In reply to comment #1)
> Is this causing compat problems on any sites, or are you just noting that it doesn't match the spec? Tab Atkins has suggested WebKit's behavior be standardized:
The latter (I was playing with WebKit's HTML5 parser and found it). I don't really think if there's any sites with <font color=currentcolor> or such...
For currentcolor: Trident behaves the same; Gecko seems to do what HTML5 suggests (converting "currentcolor" to #c0e000); Presto ignores the value. I don't have a strong opinion about which should be standard.
https://bugs.webkit.org/show_bug.cgi?id=63029 is fixed and it resolves this, too.
Does this need to have a regression test landed?
(In reply to comment #4)
> Does this need to have a regression test landed?
Probably, yes. I can just fold this into the existing tests I added for #63029.
Sounds good to me.
Was it landed as part of bug 63029? I don't see such a subtest there.
(In reply to comment #7)
> Was it landed as part of bug 63029? I don't see such a subtest there.
No, it was landed as part of bug 64576.