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.
Removing rule 8, makes it work as expected: /* rule 8 */ g > path { visibility: hidden } Investigating soon.
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)
Created attachment 17657 [details] Initial patch
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 on attachment 17657 [details] Initial patch r=me
Landed in r28357.