summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/filter-effects/svg-unknown-input-001.html
blob: 7789f2a9af4f1492fa6db36b53a72ada151f61d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<title>Filter Effects: The in attribute</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="https://www.w3.org/TR/filter-effects-1/#CommonAttributes">
<link rel="match" href="svg-unknown-input-ref.html">
<meta name="flags" content="svg">
<meta name="assert" content="References to non-existent results on a first primitive must be treated like SourceGraphic.">
<p>The test passes if you see a green square and no red.</p>
<svg width="100" height="100">
  <defs>
    <filter id="f" x="0" y="0" width="100" height="100" filterUnits="userSpaceOnUse">
      <feComposite in="unknown" in2="SourceGraphic" result="a"/>
      <feFlood flood-color="green" result="b"/>
      <feComposite in="b" in2="a"/>
    </filter>
  </defs>
  <rect width="100" height="100" fill="red"/>
  <rect x="25" y="25" width="50" height="50" fill="green" filter="url(#f)"/>
</svg>