Bug 12062 - WebCore does not handle CSS-specified fill fallback correctly
: WebCore does not handle CSS-specified fill fallback correctly
: WebKit
: 420+
: Macintosh Mac OS X 10.4
: P2 Normal
Assigned To:
: http://www.w3.org/TR/SVG/painting.htm...
  Show dependency treegraph
Reported: 2007-01-01 16:43 PST by
Modified: 2007-06-26 00:48 PST (History)

test case (167 bytes, image/svg+xml)
2007-01-01 16:43 PST, Eric Seidel
no flags Details
First attempt (92.30 KB, patch)
2007-06-23 08:26 PST, Rob Buis
mjs: review+
Review Patch | Details | Formatted Diff | Diff


You need to log in before you can comment on or make changes to this bug.

Description From 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 From 2007-01-01 16:43:37 PST -------
Created an attachment (id=12150) [details]
test case
------- Comment #2 From 2007-02-03 03:23:54 PST -------
This is also the case for stroke
------- Comment #3 From 2007-06-23 08:26:24 PST -------
Created an attachment (id=15199) [details]
First attempt

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

------- Comment #4 From 2007-06-26 00:13:07 PST -------
(From update of attachment 15199 [details])
seems simple enough... r=me
------- Comment #5 From 2007-06-26 00:48:51 PST -------
Landed in r23788.