[Webkit-unassigned] [Bug 144137] New: SVGFilterBuilder should drive the builtin sourceAlpha from the passed sourceGraphic

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 23 18:37:58 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=144137

            Bug ID: 144137
           Summary: SVGFilterBuilder should drive the builtin sourceAlpha
                    from the passed sourceGraphic
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sabouhallawa at apple.com
                CC: zimmermann at kde.org

Created attachment 251526
  --> https://bugs.webkit.org/attachment.cgi?id=251526&action=review
test case

Open the attached test case.

Result: A black square is displayed.
Expected: A lime square should be displayed.

When creating the SVGFilterBuilder, we create a SourceAlpha object from the current SourceGraphic. We should create the SourceAlpha from the previousEffect. If there is no effect applied before, the previousEffect will be the sourceGraphic.

In the attached test case. Here is what is happening:

1. A lime <div> is created.
2. On top of it, a red <div> is created. But two filter are applied to this <div>
   a. The first filter is css opacity(0) filter, which results a transparent square (the alpha bytes are all zeros)
   b. The second filter is an SVG filter which merges the SourceAlpha of the filter with the existing drawing.

The bug happens because we create the SourceAlpha of the SVGFilterBuilder from the current SourceGraphic. And since the current SourceGraphic is a lime square, the sourceAlpha will be black square (the r, g, b are zeros but a is 1). So when it is merged with the existing drawing it draws a black square.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150424/238d237a/attachment.html>


More information about the webkit-unassigned mailing list