Reftest suite for SVG filters (bug 414784)

This commit is contained in:
roc+@cs.cmu.edu 2008-02-17 17:12:57 -08:00
parent e4a0813dbc
commit eb71b9dab1
52 changed files with 802 additions and 0 deletions

View File

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" width="80" height="80" fill="#00ff00"/>
<rect x="110" y="10" width="80" height="80" fill="#00ff00"/>
<rect x="210" y="10" width="80" height="80" fill="#ffff00"/>
<rect x="310" y="10" width="80" height="80" fill="#000000"/>
<rect x="410" y="10" width="80" height="80" fill="#ffff00"/>
</svg>

After

Width:  |  Height:  |  Size: 354 B

View File

@ -0,0 +1,38 @@
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feFlood flood-color="#ff0000" result="flood"/>
<feBlend mode="normal" in="SourceGraphic" in2="flood" x="10%" y="10%" width="80%" height="80%"/>
</filter>
<rect x="0" y="0" width="100" height="100" fill="#00ff00" filter="url(#f1)"/>
<filter id="f2" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feFlood flood-color="#ff0000" result="flood"/>
<feBlend mode="mutiply" in="SourceGraphic" in2="flood" x="10%" y="10%" width="80%" height="80%"/>
</filter>
<rect x="100" y="0" width="100" height="100" fill="#00ff00" filter="url(#f2)"/>
<filter id="f3" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feFlood flood-color="#ff0000" result="flood"/>
<feBlend mode="screen" in="SourceGraphic" in2="flood" x="10%" y="10%" width="80%" height="80%"/>
</filter>
<rect x="200" y="0" width="100" height="100" fill="#00ff00" filter="url(#f3)"/>
<filter id="f4" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feFlood flood-color="#ff0000" result="flood"/>
<feBlend mode="darken" in="SourceGraphic" in2="flood" x="10%" y="10%" width="80%" height="80%"/>
</filter>
<rect x="300" y="0" width="100" height="100" fill="#00ff00" filter="url(#f4)"/>
<filter id="f5" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feFlood flood-color="#ff0000" result="flood"/>
<feBlend mode="lighten" in="SourceGraphic" in2="flood" x="10%" y="10%" width="80%" height="80%"/>
</filter>
<rect x="400" y="0" width="100" height="100" fill="#00ff00" filter="url(#f5)"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="100" height="100" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 110 B

View File

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feFlood flood-color="#ff0000" result="flood" x="0" y="0" width="100" height="100"/>
<feBlend mode="normal" in="SourceGraphic" in2="flood"/>
</filter>
<rect x="0" y="0" width="100" height="100" fill="#00ff00" filter="url(#f1)"/>
</svg>

After

Width:  |  Height:  |  Size: 386 B

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" width="80" height="80" fill="#345612" fill-opacity="0.5"/>
</svg>

After

Width:  |  Height:  |  Size: 129 B

View File

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feColorMatrix type="matrix" values="0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0.5 0"
x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"/>
</filter>
<rect x="0" y="0" width="100" height="100" fill="#123456" filter="url(#f1)"/>
</svg>

After

Width:  |  Height:  |  Size: 448 B

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="100" height="100" fill="#345612" fill-opacity="0.5"/>
</svg>

After

Width:  |  Height:  |  Size: 129 B

View File

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feColorMatrix type="matrix" values="0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0.5 0"
style="color-interpolation-filters:sRGB"/>
</filter>
<rect x="0" y="0" width="100" height="100" fill="#123456" filter="url(#f1)"/>
</svg>

After

Width:  |  Height:  |  Size: 375 B

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" width="80" height="80" fill="#00ffff"/>
</svg>

After

Width:  |  Height:  |  Size: 110 B

View File

@ -0,0 +1,15 @@
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feComponentTransfer x="10%" y="10%" width="80%" height="80%"
style="color-interpolation-filters:sRGB">
<feFuncR type="table" tableValues="1 0 0 1"/>
<feFuncG type="discrete" tableValues="0 1 0"/>
<feFuncB type="linear" slope="0.5" intercept="0.75"/>
<feFuncA type="identity"/>
</feComponentTransfer>
</filter>
<rect x="0" y="0" width="100" height="100" fill="#808080" filter="url(#f1)"/>
</svg>

After

Width:  |  Height:  |  Size: 598 B

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="100" height="100" fill="#00ffff"/>
</svg>

After

Width:  |  Height:  |  Size: 110 B

View File

@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feComponentTransfer
style="color-interpolation-filters:sRGB">
<feFuncR type="table" tableValues="1 0 0 1"/>
<feFuncG type="discrete" tableValues="0 1 0"/>
<feFuncB type="linear" slope="0.5" intercept="0.75"/>
<feFuncA type="identity"/>
</feComponentTransfer>
</filter>
<rect x="0" y="0" width="100" height="100" fill="#808080" filter="url(#f1)"/>
</svg>

After

Width:  |  Height:  |  Size: 525 B

View File

@ -0,0 +1,22 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" width="40" height="80" fill="#00ff00"/>
<rect x="10" y="10" width="40" height="80" fill="#ff0000" opacity="0.5"/>
<rect x="50" y="10" width="40" height="80" fill="#ff0000" opacity="0.5"/>
<rect x="110" y="10" width="40" height="80" fill="#ff0000"/>
<rect x="250" y="10" width="40" height="80" fill="#ff0000"/>
<rect x="310" y="10" width="40" height="80" fill="#00ff00"/>
<rect x="310" y="10" width="40" height="80" fill="#ff0000" opacity="0.5"/>
<rect x="450" y="10" width="40" height="80" fill="#ff0000"/>
<rect x="510" y="10" width="40" height="80" fill="#ffff00"/>
<rect x="550" y="10" width="40" height="80" fill="#ff0000"/>
<rect x="0" y="100" width="100" height="100" fill="#000000"/>
<rect x="10" y="110" width="80" height="80" fill="#ffffff"/>
</svg>

After

Width:  |  Height:  |  Size: 828 B

View File

@ -0,0 +1,82 @@
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feFlood flood-color="#ff0000" flood-opacity="0.5" result="flood"/>
<feComposite x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
in="flood" operator="over" in2="SourceGraphic"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="50" height="100" fill="#00ff00"/>
<rect x="50" y="0" width="50" height="100" fill="#00ff00" opacity="0"/>
</g>
<filter id="f2" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feFlood flood-color="#ff0000" result="flood"/>
<feComposite x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
in="flood" operator="in" in2="SourceGraphic"/>
</filter>
<g filter="url(#f2)">
<rect x="100" y="0" width="50" height="100" fill="#00ff00"/>
<rect x="150" y="0" width="50" height="100" fill="#00ff00" opacity="0"/>
</g>
<filter id="f3" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feFlood flood-color="#ff0000" result="flood"/>
<feComposite x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
in="flood" operator="out" in2="SourceGraphic"/>
</filter>
<g filter="url(#f3)">
<rect x="200" y="0" width="50" height="100" fill="#00ff00"/>
<rect x="250" y="0" width="50" height="100" fill="#00ff00" opacity="0"/>
</g>
<filter id="f4" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feFlood flood-color="#ff0000" flood-opacity="0.5" result="flood"/>
<feComposite x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
in="flood" operator="atop" in2="SourceGraphic"/>
</filter>
<g filter="url(#f4)">
<rect x="300" y="0" width="50" height="100" fill="#00ff00"/>
<rect x="350" y="0" width="50" height="100" fill="#00ff00" opacity="0"/>
</g>
<filter id="f5" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feFlood flood-color="#ff0000" result="flood"/>
<feComposite x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
in="flood" operator="xor" in2="SourceGraphic"/>
</filter>
<g filter="url(#f5)">
<rect x="400" y="0" width="50" height="100" fill="#00ff00"/>
<rect x="450" y="0" width="50" height="100" fill="#00ff00" opacity="0"/>
</g>
<filter id="f6" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feFlood flood-color="#ff0000" result="flood"/>
<feComposite x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
in="flood" operator="arithmetic" in2="SourceGraphic"
k2="1" k3="1"/>
</filter>
<g filter="url(#f6)">
<rect x="500" y="0" width="50" height="100" fill="#00ff00"/>
<rect x="550" y="0" width="50" height="100" fill="#00ff00" opacity="0"/>
</g>
<!-- Test the tricky case where the arithmetic operator leads to drawing outside
the bounding box of the source images -->
<filter id="f7" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse"
x="0" y="100" width="100" height="100">
<feComposite x="10" y="110" width="80" height="80" style="color-interpolation-filters:sRGB"
in="SourceGraphic" operator="arithmetic" in2="SourceGraphic"
k4="1"/>
</filter>
<rect x="0" y="100" width="100" height="100" fill="#000000"/>
<g filter="url(#f7)">
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="50" height="100" fill="#00ff00"/>
<rect x="0" y="0" width="50" height="100" fill="#ff0000" opacity="0.5"/>
<rect x="50" y="0" width="50" height="100" fill="#ff0000" opacity="0.5"/>
</svg>

After

Width:  |  Height:  |  Size: 256 B

View File

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feFlood flood-color="#ff0000" flood-opacity="0.5" result="flood" x="0" y="0" width="100" height="100"/>
<feComposite style="color-interpolation-filters:sRGB"
in="flood" operator="over" in2="SourceGraphic"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="50" height="100" fill="#00ff00"/>
<rect x="50" y="0" width="50" height="100" fill="#00ff00" opacity="0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 540 B

View File

@ -0,0 +1,17 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="48" y="10" width="1" height="80" fill="#00ff00"/>
<rect x="51" y="10" width="1" height="80" fill="#00ff00"/>
<rect x="249" y="10" width="2" height="80" fill="#000000"/>
<rect x="349" y="10" width="2" height="80" fill="#000000"/>
<rect x="1" y="100" width="1" height="100" fill="#00ff00"/>
<rect x="99" y="100" width="1" height="100" fill="#00ff00"/>
<rect x="101" y="100" width="1" height="100" fill="#ff0000"/>
<rect x="201" y="100" width="1" height="100" fill="#0000ff"/>
</svg>

After

Width:  |  Height:  |  Size: 538 B

View File

@ -0,0 +1,75 @@
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feConvolveMatrix x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
order="3" kernelMatrix="0 1 0 1 -4 1 0 1 0" in="SourceGraphic"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="100" height="100" fill="#00ff00" opacity="0"/>
<rect x="49" y="0" width="2" height="100" fill="#00ff00"/>
</g>
<!-- can't figure out a good way to test kernelUnitLength
<filter id="f2" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feConvolveMatrix x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
order="3" kernelUnitLength="0.1" kernelMatrix="0 1 0 1 -4 1 0 1 0" in="SourceGraphic"/>
</filter>
<g filter="url(#f2)">
<rect x="100" y="0" width="100" height="100" fill="#00ff00" opacity="0"/>
<rect x="140" y="0" width="20" height="100" fill="#00ff00"/>
</g>
-->
<filter id="f3" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feConvolveMatrix x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
order="3" kernelMatrix="0 1 0 1 -4 1 0 1 0" bias="-1" preserveAlpha="true" in="SourceGraphic"/>
</filter>
<g filter="url(#f3)">
<rect x="200" y="0" width="100" height="100" fill="#00ff00" opacity="0"/>
<rect x="249" y="0" width="2" height="100" fill="#00ff00"/>
</g>
<filter id="f4" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feConvolveMatrix x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
order="3" kernelMatrix="0 1 0 1 -4 1 0 1 0" divisor="100000" preserveAlpha="true" in="SourceGraphic"/>
</filter>
<g filter="url(#f4)">
<rect x="300" y="0" width="100" height="100" fill="#00ff00" opacity="0"/>
<rect x="349" y="0" width="2" height="100" fill="#00ff00"/>
</g>
<filter id="f5" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feConvolveMatrix style="color-interpolation-filters:sRGB"
order="3" kernelMatrix="0 1 0 1 -4 1 0 1 0" edgeMode="wrap" in="SourceGraphic"/>
</filter>
<g filter="url(#f5)">
<rect x="0" y="100" width="100" height="100" fill="#00ff00" opacity="0"/>
<rect x="0" y="100" width="1" height="100" fill="#00ff00"/>
</g>
<filter id="f6" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feConvolveMatrix style="color-interpolation-filters:sRGB"
order="3" kernelMatrix="0 1 0 1 -4 1 0 1 0" edgeMode="duplicate" in="SourceGraphic"/>
</filter>
<g filter="url(#f6)">
<rect x="100" y="100" width="100" height="100" fill="#00ff00" opacity="0"/>
<rect x="100" y="100" width="1" height="100" fill="#ff0000"/>
</g>
<filter id="f7" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feConvolveMatrix style="color-interpolation-filters:sRGB"
order="3" kernelMatrix="0 1 0 1 -4 1 0 1 0" edgeMode="none" in="SourceGraphic"/>
</filter>
<g filter="url(#f7)">
<rect x="200" y="100" width="100" height="100" fill="#00ff00" opacity="0"/>
<rect x="200" y="100" width="1" height="100" fill="#0000ff"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="48" y="0" width="1" height="500" fill="#00ff00"/>
<rect x="51" y="0" width="1" height="500" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 168 B

View File

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feConvolveMatrix style="color-interpolation-filters:sRGB"
order="3" kernelMatrix="0 1 0 1 -4 1 0 1 0" in="SourceGraphic"/>
</filter>
<g filter="url(#f1)">
<rect x="49" y="0" width="2" height="10000" fill="#00ff00"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 386 B

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="50" width="40" height="40" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 110 B

View File

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feFlood flood-color="#ff0000" result="flood"/>
<feDisplacementMap x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
in="SourceGraphic" in2="flood" scale="1" xChannelSelector="R" yChannelSelector="G"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="100" height="100" fill="#00ff00"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 517 B

View File

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="50" width="50" height="50" fill="#00ff00"/>
<rect x="100" y="50" width="50" height="50" fill="#00ff00"/>
<rect x="50" y="100" width="100" height="50" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 232 B

View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feFlood flood-color="#ff0000" result="flood" x="0" y="0" width="100" height="100"/>
<feDisplacementMap style="color-interpolation-filters:sRGB"
in="SourceGraphic" in2="flood" scale="100" xChannelSelector="R" yChannelSelector="G"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="100" height="100" fill="#00ff00"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 491 B

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" width="80" height="80" fill="#00ff00" opacity="0.5"/>
</svg>

After

Width:  |  Height:  |  Size: 124 B

View File

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feFlood x="10%" y="10%" width="80%" height="80%" flood-color="#00ff00" flood-opacity="0.5"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="100" height="100" fill="#00ff00" opacity="0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 384 B

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<rect x="0" y="0" width="100%" height="100%" fill="#00ff00" opacity="0.5"/>
</svg>

After

Width:  |  Height:  |  Size: 151 B

View File

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feFlood flood-color="#00ff00" flood-opacity="0.5"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="100" height="100" fill="#0000ff"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 307 B

View File

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" width="80" height="80" fill="#00ff00"/>
<rect x="110" y="10" width="80" height="80" fill="#00ff00" fill-opacity="0.5"/>
</svg>

After

Width:  |  Height:  |  Size: 191 B

View File

@ -0,0 +1,22 @@
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feGaussianBlur x="10%" y="10%" width="80%" height="80%" in="SourceGraphic" stdDeviation="0.1"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="100" height="100" fill="#00ff00"/>
</g>
<filter id="f2" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feGaussianBlur x="10%" y="10%" width="80%" height="80%" in="SourceAlpha" stdDeviation="0.1"
result="blur" style="color-interpolation-filters:sRGB"/>
<feFlood flood-color="#00ff00" result="flood"/>
<feComposite in="flood" operator="in" in2="blur"/>
</filter>
<g filter="url(#f2)">
<rect x="100" y="0" width="100" height="100" fill="#00ff00" fill-opacity="0.5"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 881 B

View File

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<rect x="130" y="130" width="40" height="40" fill="#00ff00"/>
<rect x="90" y="390" width="120" height="120" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 201 B

View File

@ -0,0 +1,40 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<!-- It's unfortunately hard to reftest the extent of the blur. We can at
least make sure it paints *something* -->
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feGaussianBlur in="SourceGraphic" stdDeviation="10"/>
</filter>
<g filter="url(#f1)">
<rect x="100" y="100" width="100" height="100" fill="#00ff00"/>
</g>
<!-- the radius affected by the box-blur is bounded by 3 times the standard
deviation -->
<rect x="0" y="0" width="300" height="130" fill="#ffffff"/>
<rect x="0" y="130" width="130" height="40" fill="#ffffff"/>
<rect x="170" y="130" width="130" height="40" fill="#ffffff"/>
<rect x="0" y="170" width="300" height="130" fill="#ffffff"/>
<!-- we can test whether the blur is a reasonable size by bumping up
non-zero alpha values a lot -->
<filter id="f2" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feGaussianBlur in="SourceGraphic" stdDeviation="10"/>
<feComponentTransfer>
<feFuncA type="linear" slope="1000"/>
</feComponentTransfer>
</filter>
<g filter="url(#f2)">
<rect x="100" y="400" width="100" height="100" fill="#00ff00"/>
</g>
<!-- there should be nonzero alpha values everywhere within 1 standard
deviation of the original image -->
<rect x="0" y="300" width="300" height="90" fill="#ffffff"/>
<rect x="0" y="390" width="90" height="120" fill="#ffffff"/>
<rect x="210" y="390" width="90" height="120" fill="#ffffff"/>
<rect x="0" y="510" width="300" height="90" fill="#ffffff"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<image xlink:href="mozilla-banner.gif" x="10" y="10" width="600" height="58"/>
</svg>

After

Width:  |  Height:  |  Size: 172 B

View File

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse"
x="10" y="10" width="700" height="700">
<feImage xlink:href="mozilla-banner.gif" x="10" y="10" width="600" height="58"
style="color-interpolation-filters:sRGB"/>
</filter>
<g filter="url(#f1)">
</g>
</svg>

After

Width:  |  Height:  |  Size: 384 B

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" width="30" height="80" fill="#00ff00"/>
<rect x="40" y="10" width="50" height="80" fill="#0000ff"/>
</svg>

After

Width:  |  Height:  |  Size: 170 B

View File

@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feFlood x="0" y="0" width="50%" height="100%" flood-color="#00ff00" result="left"/>
<feFlood x="40%" y="0" width="60%" height="100%" flood-color="#0000ff" result="right"/>
<feMerge x="10%" y="10%" width="80%" height="80%">
<feMergeNode in="left"/>
<feMergeNode in="right"/>
</feMerge>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="100" height="100" fill="#000000"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 578 B

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<rect x="0" y="0" width="40%" height="100%" fill="#00ff00"/>
<rect x="40%" y="0" width="60%" height="100%" fill="#0000ff"/>
</svg>

After

Width:  |  Height:  |  Size: 199 B

View File

@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feFlood x="0" y="0" width="50%" height="100%" flood-color="#00ff00" result="left"/>
<feFlood x="40%" y="0" width="60%" height="100%" flood-color="#0000ff" result="right"/>
<feMerge>
<feMergeNode in="left"/>
<feMergeNode in="right"/>
</feMerge>
</filter>
<g filter="url(#f1)">
</g>
</svg>

After

Width:  |  Height:  |  Size: 451 B

View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" width="80" height="80" fill="#00ff00"/>
<rect x="135" y="45" width="30" height="10" fill="#00ff00"/>
<rect x="10" y="110" width="80" height="80" fill="#00ff00"/>
<rect x="30" y="130" width="40" height="40" fill="#000000"/>
<rect x="125" y="115" width="50" height="70" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 358 B

View File

@ -0,0 +1,38 @@
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feMorphology operator="erode" radius="0.2 0.2" x="10%" y="10%" width="80%" height="80%"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="100" height="100" fill="#00ff00"/>
</g>
<filter id="f2" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feMorphology operator="erode" radius="0.3 0.4" x="10%" y="10%" width="80%" height="80%"/>
</filter>
<g filter="url(#f2)">
<rect x="100" y="0" width="100" height="100" fill="#00ff00" fill-opacity="0"/>
<rect x="105" y="5" width="90" height="90" fill="#00ff00"/>
</g>
<filter id="f3" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feMorphology operator="dilate" radius="0.2 0.2" x="10%" y="10%" width="80%" height="80%"/>
</filter>
<g filter="url(#f3)">
<rect x="0" y="100" width="100" height="100" fill="#00ff00"/>
<rect x="10" y="110" width="80" height="80" fill="#000000"/>
</g>
<filter id="f4" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feMorphology operator="dilate" radius="0.2 0.3" x="10%" y="10%" width="80%" height="80%"/>
</filter>
<g filter="url(#f4)">
<rect x="100" y="100" width="100" height="100" fill="#00ff00" fill-opacity="0"/>
<rect x="145" y="145" width="10" height="10" fill="#00ff00"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="20" y="20" width="60" height="60" fill="#00ff00"/>
<rect x="135" y="45" width="30" height="10" fill="#00ff00"/>
<rect x="-20" y="80" width="140" height="140" fill="#00ff00"/>
<rect x="30" y="130" width="40" height="40" fill="#000000"/>
<rect x="125" y="115" width="50" height="70" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 360 B

View File

@ -0,0 +1,32 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feMorphology operator="erode" radius="20 20"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="100" height="100" fill="#00ff00"/>
</g>
<filter id="f2" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feMorphology operator="erode" radius="30 40"/>
</filter>
<g filter="url(#f2)">
<rect x="105" y="5" width="90" height="90" fill="#00ff00"/>
</g>
<filter id="f3" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feMorphology operator="dilate" radius="20 20"/>
</filter>
<g filter="url(#f3)">
<rect x="0" y="100" width="100" height="100" fill="#00ff00"/>
<rect x="10" y="110" width="80" height="80" fill="#000000"/>
</g>
<filter id="f4" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feMorphology operator="dilate" radius="20 30"/>
</filter>
<g filter="url(#f4)">
<rect x="145" y="145" width="10" height="10" fill="#00ff00"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="15" y="25" width="75" height="65" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 110 B

View File

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feOffset x="10%" y="10%" width="80%" height="80%" dx="0.15" dy="0.25"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="100" height="100" fill="#00ff00"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 351 B

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="15" y="25" width="100" height="100" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 112 B

View File

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feOffset dx="15" dy="25"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="100" height="100" fill="#00ff00"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 282 B

View File

@ -0,0 +1,21 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" width="10" height="10" fill="#00ff00"/>
<rect x="40" y="10" width="20" height="10" fill="#00ff00"/>
<rect x="80" y="10" width="10" height="10" fill="#00ff00"/>
<rect x="20" y="20" width="20" height="20" fill="#0000ff"/>
<rect x="60" y="20" width="20" height="20" fill="#0000ff"/>
<rect x="10" y="40" width="10" height="20" fill="#00ff00"/>
<rect x="40" y="40" width="20" height="20" fill="#00ff00"/>
<rect x="80" y="40" width="10" height="20" fill="#00ff00"/>
<rect x="20" y="60" width="20" height="20" fill="#0000ff"/>
<rect x="60" y="60" width="20" height="20" fill="#0000ff"/>
<rect x="10" y="80" width="10" height="10" fill="#00ff00"/>
<rect x="40" y="80" width="20" height="10" fill="#00ff00"/>
<rect x="80" y="80" width="10" height="10" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 834 B

View File

@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feFlood flood-color="#00ff00" x="0%" y="0%" width="20%" height="20%" result="flood1"/>
<feFlood flood-color="#0000ff" x="20%" y="20%" width="20%" height="20%" result="flood2"/>
<feComposite in="flood1" in2="flood2" x="0%" y="0%" width="40%" height="40%" result="pair"/>
<feTile x="10%" y="10%" width="80%" height="80%" in="pair"/>
</filter>
<g filter="url(#f1)">
<rect x="0" y="0" width="100" height="100" fill="#00ff00"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 616 B

View File

@ -0,0 +1,21 @@
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="100" height="100" fill="#00ff00"/>
<rect x="200" y="0" width="100" height="100" fill="#00ff00"/>
<rect x="400" y="0" width="100" height="100" fill="#00ff00"/>
<rect x="100" y="100" width="100" height="100" fill="#0000ff"/>
<rect x="300" y="100" width="100" height="100" fill="#0000ff"/>
<rect x="0" y="200" width="100" height="100" fill="#00ff00"/>
<rect x="200" y="200" width="100" height="100" fill="#00ff00"/>
<rect x="400" y="200" width="100" height="100" fill="#00ff00"/>
<rect x="100" y="300" width="100" height="100" fill="#0000ff"/>
<rect x="300" y="300" width="100" height="100" fill="#0000ff"/>
<rect x="0" y="400" width="100" height="100" fill="#00ff00"/>
<rect x="200" y="400" width="100" height="100" fill="#00ff00"/>
<rect x="400" y="400" width="100" height="100" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 874 B

View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feFlood flood-color="#00ff00" x="0%" y="0%" width="20%" height="20%" result="flood1"/>
<feFlood flood-color="#0000ff" x="20%" y="20%" width="20%" height="20%" result="flood2"/>
<feComposite in="flood1" in2="flood2" x="0%" y="0%" width="40%" height="40%" result="pair"/>
<feTile in="pair"/>
</filter>
<g filter="url(#f1)">
</g>
</svg>

After

Width:  |  Height:  |  Size: 489 B

View File

@ -0,0 +1,43 @@
# In general, the fe*-1 tests test basic functionality clipped to a filter primitive
# subregion. The fe*-2 tests test with no clipping (which stresses
# the automatic optimal surface-size computation a bit more).
== feBlend-1.svg feBlend-1-ref.svg
== feBlend-2.svg feBlend-2-ref.svg
== feColorMatrix-1.svg feColorMatrix-1-ref.svg
== feColorMatrix-2.svg feColorMatrix-2-ref.svg
== feComponentTransfer-1.svg feComponentTransfer-1-ref.svg
== feComponentTransfer-2.svg feComponentTransfer-2-ref.svg
== feComposite-1.svg feComposite-1-ref.svg
== feComposite-2.svg feComposite-2-ref.svg
== feConvolveMatrix-1.svg feConvolveMatrix-1-ref.svg
== feConvolveMatrix-2.svg feConvolveMatrix-2-ref.svg
== feDisplacementMap-1.svg feDisplacementMap-1-ref.svg
== feDisplacementMap-2.svg feDisplacementMap-2-ref.svg
== feFlood-1.svg feFlood-1-ref.svg
== feFlood-2.svg feFlood-2-ref.svg
== feGaussianBlur-1.svg feGaussianBlur-1-ref.svg
== feGaussianBlur-2.svg feGaussianBlur-2-ref.svg
== feImage-1.svg feImage-1-ref.svg
== feMerge-1.svg feMerge-1-ref.svg
== feMerge-2.svg feMerge-2-ref.svg
== feMorphology-1.svg feMorphology-1-ref.svg
== feMorphology-2.svg feMorphology-2-ref.svg
== feOffset-1.svg feOffset-1-ref.svg
== feOffset-2.svg feOffset-2-ref.svg
== feTile-1.svg feTile-1-ref.svg
== feTile-2.svg feTile-2-ref.svg
# no tests for feSpecularLighting, feDiffuseLighting or feTurbulence

View File

@ -5,6 +5,8 @@ include bugs/reftest.list
# sizing tests
include sizing/reftest.list
include filters/reftest.list
# Mozilla only tests (i.e. those containing XUL/XBL/etc.)
include moz-only/reftest.list