[Webkit-unassigned] [Bug 139412] New: SVG chained filter effects clip out-of-region drawing incorrectly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 8 13:36:09 PST 2014


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

            Bug ID: 139412
           Summary: SVG chained filter effects clip out-of-region drawing
                    incorrectly
    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 242844
  --> https://bugs.webkit.org/attachment.cgi?id=242844&action=review
Test case

Open the following SVG in WebKit:

<svg xmlns="http://www.w3.org/2000/svg">
    <filter id="f1" x="0" y="0" width="100" height="100" filterUnits="userSpaceOnUse">
      <!-- Create a green square at x=0. -->
      <feFlood result="red" x="100" y="0" flood-color="red"/>
      <feFlood result="green" flood-color="green"/>
      <!--
          Attempt to offset the red square left to cover up the green square.
          However, this filter's filter region should clip away the red square,
          and only transparent pixels should be offset left, leaving the green
          square intact.
      -->
      <feOffset result="red" in="SourceGraphic" dx="-100" x="0" y="0" width="200" height="100"/>
      <feMerge>
          <feMergeNode in="green"/>
          <feMergeNode in="red"/>
      </feMerge>
    </filter>
    <rect x="0" y="0" width="100" height="100" filter="url(#f1)"/>
</svg>

Result: Nothing is drawn.
Expected: A 100 x 100 green rectangle. A black rectangle is drawn at (0,0). The filter f1 has a red rectangle drawn at (100,0). This rectangle should be completely clipped since it outside the rectangle area of the target element. When offsetting this rectangle with dx=-1, this should not have any effect because it clipped when it was first drawn. Merging this empty rectangle with a green rectangle should result in a green rectangle at (0,0)

NOTE: FireFox and Chrome both render this SVG as expected.
NOTE: This test is an imported test from Mozilla SVG test suite but is modified a little to narrow down the problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141208/8de1c236/attachment-0002.html>


More information about the webkit-unassigned mailing list