Bug 14010

Summary: Add tests to check filter, mask, clip, opacity and marker ordering
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, krit, webkit.review.bot
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Bug Depends on: 14012    
Bug Blocks: 68469, 26389    
Attachments:
Description Flags
Correct order of filter clipper and masker
none
Correct order of filter clipper and masker none

Description Eric Seidel (no email) 2007-06-06 02:25:32 PDT
Add tests to check filter, mask, clip, opacity and marker ordering

I just added a prepareToRenderSVGContent to simplify handling of filters, masks and clips throughout all of the various SVG renderers.  In doing so, I realized that we were ordering filters slightly differently in the different classes.  I'm not yet 100% sure which ordering is correct, but we definitely need to add some tests to make sure that we keep filter, mask, clip, opacity and marker operations in the correct order going forward.

This just requires someone to write up a nice test case. :)
Comment 1 Dirk Schulze 2009-12-18 00:52:11 PST
We realy use the wrong order. At first the filter should be applied to the object, than masker/clipping and opacity at the end. The order of masker and clipper doesn't realy matter. Either we clip the content away and mask afterwards or we mask the content and clip it afterwards. There is no difference in the result.
I'll upload a patch.
Comment 2 Dirk Schulze 2009-12-18 03:26:32 PST
Created attachment 45139 [details]
Correct order of filter clipper and masker

Correct order of filter clipper and masker.
Comment 3 WebKit Review Bot 2009-12-18 03:30:13 PST
style-queue ran check-webkit-style on attachment 45139 [details] without any errors.
Comment 4 Eric Seidel (no email) 2009-12-18 09:50:43 PST
Comment on attachment 45139 [details]
Correct order of filter clipper and masker

Ideally your ChangeLog should link to the relevant section of the spec.  Or at least the bug should.

It looks like the rect in the mask you made doesn't do anything.  It's not clear to me from the example how it would have changed from the old behavior ro the new one, but I believe you when you say it changed.
Comment 5 Dirk Schulze 2009-12-18 13:43:30 PST
Created attachment 45181 [details]
Correct order of filter clipper and masker

The mask on the example just dims the contrast and shows, that it doesn't have any affect on the clipping. You can still see, that the clipper affects on top of the filtering.
I changed the Changelog and mention the part of the spec. I swiched the masker and clipper. We might profit of clipping away some context before the masking process later.
Comment 6 WebKit Review Bot 2009-12-18 13:46:34 PST
style-queue ran check-webkit-style on attachment 45181 [details] without any errors.
Comment 7 Nikolas Zimmermann 2009-12-19 13:25:04 PST
Comment on attachment 45181 [details]
Correct order of filter clipper and masker

krit++ Finally! r=me.
Comment 8 WebKit Commit Bot 2009-12-19 13:36:08 PST
Comment on attachment 45181 [details]
Correct order of filter clipper and masker

Clearing flags on attachment: 45181

Committed r52394: <http://trac.webkit.org/changeset/52394>
Comment 9 WebKit Commit Bot 2009-12-19 13:36:13 PST
All reviewed patches have been landed.  Closing bug.