RESOLVED FIXED 32584
Opacity and shadow both clip away too much in some cases with filters
https://bugs.webkit.org/show_bug.cgi?id=32584
Summary Opacity and shadow both clip away too much in some cases with filters
Beth Dakin
Reported 2009-12-15 15:01:48 PST
svg/filters/shadow-on-rect-with-filter.svg is currently failing the pixel tests because we started using a transparency layer for shadows and clipping appropriately. Turns out the same bug already existed for opacity which does the same thing; in other words, if you replace the shadow style in that test case with "opacity: 0.5," we clip too much in the same way.
Attachments
fix for the clipping bug (35.73 KB, patch)
2009-12-18 09:01 PST, Dirk Schulze
no flags
Dirk Schulze
Comment 1 2009-12-18 02:14:00 PST
Yes. http://trac.webkit.org/browser/trunk/WebCore/rendering/SVGRenderSupport.cpp#93 and http://trac.webkit.org/browser/trunk/WebCore/rendering/SVGRenderSupport.cpp#L102 SVGRenderSupport uses the boundingbox. We might use the union of filter rect and objectboundingbox for the clipping, if filters are present. But atm the filter rect is calculated at http://trac.webkit.org/browser/trunk/WebCore/rendering/SVGRenderSupport.cpp#L135.
Dirk Schulze
Comment 2 2009-12-18 05:24:26 PST
*** Bug 32702 has been marked as a duplicate of this bug. ***
Dirk Schulze
Comment 3 2009-12-18 05:51:05 PST
It needs a redesign, but I already have a patch for it. Just needs a bit more clean-up and testing.
Dirk Schulze
Comment 4 2009-12-18 09:01:19 PST
Created attachment 45154 [details] fix for the clipping bug This fixes the failing pixel tests. Sadly object->repaintRectInLocalCoordinates() seems to change some local values of Renderers, so many filter related LayoutTests have different results. Also we still have to calculate the filterRect a second time on drawing. But this is not avoidable, since we call the filters by id and one filter can be used by different object's.
Nikolas Zimmermann
Comment 5 2009-12-18 20:25:51 PST
*** Bug 32765 has been marked as a duplicate of this bug. ***
Nikolas Zimmermann
Comment 6 2009-12-18 20:26:01 PST
There are other affected tests (run pixel tests with --tolerance 0, and you'll see the errors): svg/css/arrow-with-shadow.svg svg/css/group-with-shadow.svg svg/css/stars-with-shadow.html svg/filters/shadow-on-rect-with-filter.svg
Nikolas Zimmermann
Comment 7 2009-12-18 20:28:03 PST
(In reply to comment #6) > There are other affected tests (run pixel tests with --tolerance 0, and you'll > see the errors): > svg/css/arrow-with-shadow.svg > svg/css/group-with-shadow.svg > svg/css/stars-with-shadow.html > svg/filters/shadow-on-rect-with-filter.svg ^^^^^^^^^^^^^^^^^ Beth already reported that one, oops. Closed the bug 32584 that I just filed, it's a duplicate of this bug. All have the same problem -- we _do_ need a pixel tests bot :( Beth, can you do anything from the Apple side about this?
Dirk Schulze
Comment 8 2009-12-30 01:11:42 PST
The clipping bug is fixed with r52647. I'm not sure, if the patch also fixes: svg/css/arrow-with-shadow.svg svg/css/group-with-shadow.svg svg/css/stars-with-shadow.html If not, we have to open another bug.
Note You need to log in before you can comment on or make changes to this bug.