Bug 83051

Summary: [Cairo] SVG shadows show through opaque objects
Product: WebKit Reporter: Philip Rogers <pdr>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, bugs-noreply, krit, mrobinson, thorton, zimmermann
Priority: P2 Keywords: DoNotImportToRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Update test expectations so this test fails instead of silently passing none

Description Philip Rogers 2012-04-03 11:19:06 PDT
SVG shadows show through opaque objects, causing the test "svg/css/group-with-shadow.svg" to fail on skia platforms.

For a repro, just open LayoutTests/svg/css/group-with-shadow.svg and notice the faint grey shadow on top of the purple box. It's much easier to see if you change the testcase to use a white box, and I would recommend that this testcase be changed so busy sheriffs don't make the same mistake again and check in incorrect expectations.
Comment 1 Philip Rogers 2012-04-03 11:34:51 PDT
Created attachment 135375 [details]
Update test expectations so this test fails instead of silently passing
Comment 2 Peter Kasting 2012-07-31 20:48:08 PDT
Comment on attachment 135375 [details]
Update test expectations so this test fails instead of silently passing

This patch landed long ago.
Comment 3 Dirk Schulze 2014-05-13 08:02:50 PDT
Looking at the implementation, Cairo might still be affected. CC: mrobinson
Comment 4 Martin Robinson 2014-05-13 15:04:18 PDT
The original bug seems to be about the Skia backend. What about the Cairo implementation looks broken to you?
Comment 5 Dirk Schulze 2014-05-13 22:51:06 PDT
(In reply to comment #4)
> The original bug seems to be about the Skia backend. What about the Cairo implementation looks broken to you?

It was implemented by Aryeh in a platform independent way for Cairo and Qt.

Here is the link to the test: http://trac.webkit.org/export/168780/trunk/LayoutTests/svg/css/group-with-shadow.svg Compare it to http://trac.webkit.org/export/168780/trunk/LayoutTests/platform/mac/svg/css/group-with-shadow-expected.png

Also, try a tests where elements are overlapping and apply the shadow on a group element: http://jsfiddle.net/rTPaG/

Is the shadow drawn for the group (as it should be) or for each element individually?
Comment 6 Martin Robinson 2014-05-15 15:09:46 PDT
(In reply to comment #5)

> Is the shadow drawn for the group (as it should be) or for each element individually?


In the jsfiddle example the shadow is drawn for each element individually.
Comment 7 Martin Robinson 2014-05-15 15:12:17 PDT
(In reply to comment #5)

> Here is the link to the test: http://trac.webkit.org/export/168780/trunk/LayoutTests/svg/css/group-with-shadow.svg Compare it to http://trac.webkit.org/export/168780/trunk/LayoutTests/platform/mac/svg/css/group-with-shadow-expected.png

The faint shadow also appears in the Mac expected results, so is this also an issue with the CG backend?