Summary: | Elements with display="none" in a <clipPath> still contribute to clipping path | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Cameron McCormack (:heycam) <heycam> | ||||||
Component: | SVG | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | ||||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.5 | ||||||||
URL: | http://mcc.id.au/temp/2008/clipPath-display-none.svg | ||||||||
Attachments: |
|
Description
Cameron McCormack (:heycam)
2008-04-07 04:21:56 PDT
Relatedly, when computing the clipping path from a given <clipPath>, each child element of it needs to have its clipping path (i.e., what's specified by the 'clip-path' property) applied before being unioned into the resulting clipping path. Created attachment 20440 [details]
First attempt
This should do it. I am not sure whether I did the test stuff right, as in that the png is in the right dir...
The second remark from Cameron handles I think a different bug, and IMHO we need
a new bug and testcase to proof that we have this problem.
Cheers,
Rob.
Filed bug 18398 with test case for the related bug. Comment on attachment 20440 [details]
First attempt
Ok, so two things:
1. style error:
if ( pathStyle->display() != NONE )
(no spaces inside the ( ))
2. You should test visibility: hidden as well. What's the expected behavior there?
Also:
// FIXME: How do we know the element has done a layout?
We could pretty easily test the not-yet-layout case, but I'm not sure that layout even matters here, since we're calling a DOM method toClipPath(), however I'm not sure the DOM can really get the right proportions... how does it resolve lengths correctly?
We at least need a visibility: hidden test, IMO.
(In reply to comment #4) > 2. You should test visibility: hidden as well. What's the expected behavior > there? visibility='hidden' (but display!='inline') elements still contribute to the clip path. Created attachment 20456 [details]
Now with improved testcase
Fix the style issue and make the testcase check for visibility=hidden too.
Cheers,
Rob.
Comment on attachment 20456 [details]
Now with improved testcase
If you update the testcase to mention the purpose of visibility="hidden" (that we're testing to make sure that it does not affect clipping) then r=me.
I don't need to see the patch again before you land.
|