Looking at the RenderLayer code, I found a bug on the applying order of masking and filters. The Filter Effects spec say that the applying order is: filter, clipping, masking, opacity. In WebKit it is currently: clipping, masking, filters, opacity. So filters should be the first thing to do.
Have a patch for that but need to write a test case first.
Created attachment 159267 [details] Patch
Do we get it right in composited mode?
I did not upload an explicit test for it, but yes, it does work with compositing mode.
Comment on attachment 159267 [details] Patch Clearing flags on attachment: 159267 Committed r126084: <http://trac.webkit.org/changeset/126084>
All reviewed patches have been landed. Closing bug.