Bug 15514 - <clipPath> with <use> not respected
Summary: <clipPath> with <use> not respected
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: Nobody
URL: http://www.carto.net/neumann/cartogra...
Keywords: HasReduction
: 16557 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-14 16:06 PDT by Eric Seidel (no email)
Modified: 2007-12-27 01:29 PST (History)
1 user (show)

See Also:


Attachments
test case (369 bytes, image/svg+xml)
2007-10-15 00:11 PDT, Eric Seidel (no email)
no flags Details
First attempt (47.63 KB, patch)
2007-12-25 06:18 PST, 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 Eric Seidel (no email) 2007-10-14 16:06:32 PDT
SVG displays extra black transparent square

http://www.carto.net/neumann/cartography/papermaps/japan.svgz

not sure why.  needs reduction.
Comment 2 Eric Seidel (no email) 2007-10-15 00:10:36 PDT
Turn out this is a problem with our <clipPath> and <use> support.
Comment 3 Eric Seidel (no email) 2007-10-15 00:11:01 PDT
Created attachment 16675 [details]
test case
Comment 4 Rob Buis 2007-12-25 06:18:00 PST
Created attachment 18107 [details]
First attempt

I fixed the bug but also tried to look at the functionality of using <use> from a clip path a bit more, particularly the part that describes indirect references are disallowed. The second testcase tests this, Opera and Firefox do allow that clip path, so either I am misunderstanding the spec or they are wrong.
Cheers,

Rob.
Comment 5 Eric Seidel (no email) 2007-12-25 15:00:24 PST
You are the most wonderful bug sniper ever!  All these old little bugs slowly getting picked off by Rob... one at a time... :)

I'll actually review your patch after all the xmas celebration (assuming no one else beats me to it).
Comment 6 Eric Seidel (no email) 2007-12-25 20:04:40 PST
Comment on attachment 18107 [details]
First attempt

A few comments.

1.  You might mention the section of the spec, or even the text, indicating the direct reference requirement:

14.3.5 Establishing a new clipping path
A 'clipPath' element can contain 'path' elements, 'text' elements, basic shapes (such as 'circle') or a 'use' element. If a 'use' element is a child of a 'clipPath' element, it must directly reference 'path', 'text' or basic shape elements.

Single line ifs (including those with comments) do no use { } according to the webkit style guidelines.

Otherwise looks great.  I assume that both test cases show 100x100 green rects on TOT?

r=me, assuming you fix the spec comment and style issue.
Comment 7 Rob Buis 2007-12-26 00:41:17 PST
Landed in r28991.
Comment 8 Eric Seidel (no email) 2007-12-27 01:29:05 PST
*** Bug 16557 has been marked as a duplicate of this bug. ***