Bug 7627 - SVG from the W3C SVG 1.1 test suite (cubic01.svg) renders as all black
Summary: SVG from the W3C SVG 1.1 test suite (cubic01.svg) renders as all black
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Major
Assignee: Nobody
URL: http://www.w3.org/TR/SVG11/images/pat...
Keywords:
: 8041 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-06 11:42 PST by Rob Buis
Modified: 2006-04-05 21:33 PDT (History)
1 user (show)

See Also:


Attachments
Possible fix (639 bytes, patch)
2006-03-06 13:52 PST, Rob Buis
no flags Details | Formatted Diff | Diff
New patch (646 bytes, patch)
2006-03-07 05:21 PST, Rob Buis
hyatt: review+
Details | Formatted Diff | Diff
Even more complete patch (2.32 KB, patch)
2006-04-04 13:58 PDT, Rob Buis
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Buis 2006-03-06 11:42:30 PST
The svg indicated by the URL renders as one black rect, while
it should show path(s).
Comment 1 Rob Buis 2006-03-06 13:52:11 PST
Created attachment 6902 [details]
Possible fix
Comment 2 Rob Buis 2006-03-07 05:21:21 PST
Created attachment 6917 [details]
New patch

Patch tested and okayed by mitzpettel
Comment 3 Darin Adler 2006-03-07 08:59:33 PST
Comment on attachment 6917 [details]
New patch

Needs change log. Needs layout test, or perhaps an existing test already checks this. If you omit the boolean, then true is the default, so I suggest omitting it instead of passing true.
Comment 4 Rob Buis 2006-03-07 13:47:59 PST
(In reply to comment #3)
> (From update of attachment 6917 [details] [edit])
> Needs change log. Needs layout test, or perhaps an existing test already checks
> this. If you omit the boolean, then true is the default, so I suggest omitting
> it instead of passing true.
> 

Hi Darin,

I can do most of the above, however I could not explain so far
why the change works. I'd really like to be able to do this before
seeing the change in, so I'll keep looking for the reason, but
if anyone else can explain why it works, please let me know..
Cheers,

Rob.
Comment 5 Darin Adler 2006-03-08 08:59:20 PST
Comment on attachment 6917 [details]
New patch

Seems relatively straightforward to investigate further. One idea is to figure out what is parsed differently in the CSS in the different modes. The DOM inspector might even help. Another idea is to reduce this test page further.

Marking this patch review- because we don't want to land it until we understand what's wrong, and because it needs change log, layout test, etc.
Comment 6 Rob Buis 2006-04-04 04:32:17 PDT
*** Bug 8041 has been marked as a duplicate of this bug. ***
Comment 7 Dave Hyatt 2006-04-04 13:19:30 PDT
This is the correct fix.  SVG is always parsed in strict mode because it's XML, so passing "true" instead of checking the document's mode is the right thing to do.
Comment 8 Dave Hyatt 2006-04-04 13:19:50 PDT
Comment on attachment 6917 [details]
New patch

r=me
Comment 9 Rob Buis 2006-04-04 13:27:05 PDT
After quite some time looking in the wrong places, I found
out in non-strict mode in CSSGrammar.y all class values are
lower cased, causing mismatching when we really are looking for
class values with upper case in them. So class=foo is not a problem,
but class=Foo is, as shown by several testcases.
Cheers,

Rob.
Comment 10 Rob Buis 2006-04-04 13:58:03 PDT
Created attachment 7509 [details]
Even more complete patch

This time it should have everything, testcase, changelogs etc...
Cheers,

Rob.
Comment 11 Eric Seidel (no email) 2006-04-04 14:45:25 PDT
Comment on attachment 7509 [details]
Even more complete patch

Looks great.