The SVG spec says that when fill is specified fill="url(#foo) green" if #foo is not found, then "green" is used. if "green" is not found, the document is in error.
WebKit (intentionally) avoids ever putting the document in error. And instead falls back to the default fill (black) when a fill URI is invalid. However, in this case, WebKit should first check to see if any other fills were specified first. In this case, it it should be green.
See test case. Opera renders it correctly.
(Note, this can't be done by the CSS parser, as the uri might not resolve at that time. the SVGPaint needs to carry this additional information about fallback.
Created attachment 12150 [details]
This is also the case for stroke
Created attachment 15199 [details]
I don't know why I kept this on my HD so long, seems simple now :)
Comment on attachment 15199 [details]
seems simple enough... r=me
Landed in r23788.