Bug 12062

Summary: WebCore does not handle CSS-specified fill fallback correctly
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: SVGAssignee: Rob Buis <rwlbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: remi_zara
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://www.w3.org/TR/SVG/painting.html#SpecifyingPaint
Attachments:
Description Flags
test case
none
First attempt mjs: review+

Description Eric Seidel (no email) 2007-01-01 16:43:02 PST
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.
Comment 1 Eric Seidel (no email) 2007-01-01 16:43:37 PST
Created attachment 12150 [details]
test case
Comment 2 RĂ©mi Zara 2007-02-03 03:23:54 PST
This is also the case for stroke
Comment 3 Rob Buis 2007-06-23 08:26:24 PDT
Created attachment 15199 [details]
First attempt

I don't know why I kept this on my HD so long, seems simple now :)
Cheers,

Rob.
Comment 4 Maciej Stachowiak 2007-06-26 00:13:07 PDT
Comment on attachment 15199 [details]
First attempt

seems simple enough... r=me
Comment 5 Rob Buis 2007-06-26 00:48:51 PDT
Landed in r23788.