Bug 15645 - WebKit fails to render <use> example in SVG 1.1 spec
Summary: WebKit fails to render <use> example in SVG 1.1 spec
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nikolas Zimmermann
URL: http://www.w3.org/TR/SVG/images/struc...
Keywords: NeedsReduction
Depends on:
Blocks:
 
Reported: 2007-10-23 16:53 PDT by Eric Seidel (no email)
Modified: 2007-12-03 10:58 PST (History)
1 user (show)

See Also:


Attachments
Initial patch (2.45 KB, patch)
2007-12-02 17:00 PST, Nikolas Zimmermann
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-10-23 16:53:21 PDT
WebKit fails to render <use> example in SVG 1.1 spec

http://www.w3.org/TR/SVG/images/struct/Use04.svg
is the file

http://www.w3.org/TR/SVG/struct.html#UseElement
explains the file

I haven't looked at why we fail yet.
Comment 1 Nikolas Zimmermann 2007-11-25 05:09:43 PST
Removing rule 8, makes it work as expected:

      /* rule 8 */ g > path { visibility: hidden }

Investigating soon.
Comment 2 Nikolas Zimmermann 2007-11-25 05:15:57 PST
Ok, found the culprit:
<path> is referenced by the <use> element. In our generated tree the <path> will be a direct child element of <g> (which replaces the <use> in the generated tree). Though the spec cleary states:

Rules 7 and 8: CSS selectors only apply to the formal document tree, not on the generated tree; thus, these selectors will not yield a match.

We need to support this. (while reminding ourselves that class & id selectors etc. still need to work within the generated subtree)
Comment 3 Nikolas Zimmermann 2007-12-02 17:00:31 PST
Created attachment 17657 [details]
Initial patch
Comment 4 Eric Seidel (no email) 2007-12-02 21:48:48 PST
Comment on attachment 17657 [details]
Initial patch

This needs to include landing the test case.  I think this is otherwise right, but hyatt really should have a look.
Comment 5 Dave Hyatt 2007-12-02 21:50:04 PST
Comment on attachment 17657 [details]
Initial patch

r=me
Comment 6 Nikolas Zimmermann 2007-12-03 10:58:54 PST
Landed in r28357.