Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: third_party/WebKit/LayoutTests/svg/filters/feColorMatrix-values.svg

Issue 1366903002: Make error-handling for feColorMatrix consistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/svg/filters/feColorMatrix-values.svg
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feColorMatrix-values.svg b/third_party/WebKit/LayoutTests/svg/filters/feColorMatrix-values.svg
index d444225119a4431ff6b2c28a0b83f5f50419b80b..f9fa3837dda53f7d7d3a1fcc31dd25c4cd504fb6 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feColorMatrix-values.svg
+++ b/third_party/WebKit/LayoutTests/svg/filters/feColorMatrix-values.svg
@@ -1,9 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
-<defs>
+ <defs>
<filter id="satfull">
<feColorMatrix type="saturate" values="1" />
</filter>
+ <!-- Display default parameters when values is not present. -->
<filter id="matnull">
<feColorMatrix type="matrix" />
</filter>
@@ -14,55 +15,38 @@
<feColorMatrix type="hueRotate" />
</filter>
- <filter id="matbad">
- <feColorMatrix type="matrix" values="1 1 1" />
+ <!-- Display default parameters when there are too many/few values. -->
+ <filter id="mattoofew">
+ <feColorMatrix type="matrix" values="1 0.5 1" />
</filter>
- <filter id="satbad">
- <feColorMatrix type="saturate" values="1 1 1" />
+ <filter id="mattoomany">
+ <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1" />
</filter>
- <filter id="huebad">
- <feColorMatrix type="hueRotate" values="1 1 1" />
+ <filter id="sattoomany">
+ <feColorMatrix type="saturate" values="0.5 1 1" />
+ </filter>
+ <filter id="huetoomany">
+ <feColorMatrix type="hueRotate" values="240 1 1" />
</filter>
+ <!-- The saturation argument is clamped to [0, 1]. -->
<filter id="satrange">
- <feColorMatrix type="saturate" values="1 1" />
+ <feColorMatrix type="saturate" values="42" />
</filter>
+ <!-- For type=huerotate, values[0] is an angle and thus have wrapping behavior. -->
<filter id="huerange">
<feColorMatrix type="hueRotate" values="720" />
</filter>
+ </defs>
-</defs>
- <g font-size="24" fill="black">
- <!-- Backround for tests. Green is success and red is failure -->
- <rect y="0" x="0" width="400" height="400" fill="lime" style="filter:url(#satfull)" />
- <rect y="2" x="2" width="196" height="396" fill="red" />
-
- <!-- Display default parameters when values is not present -->
- <text y="40" x="10" >Should be default</text>
- <text y="70" x="10" >matrix.</text>
- <rect y="0" x="0" width="200" height="104" fill="lime" style="filter:url(#matnull)" />
- <text y="140" x="10" >Should be default</text>
- <text y="170" x="10" >saturate.</text>
- <rect y="100" x="0" width="200" height="104" fill="lime" style="filter:url(#satnull)" />
- <text y="240" x="10" >Should be default</text>
- <text y="270" x="10" >hueRotate.</text>
- <rect y="200" x="0" width="200" height="104" fill="lime" style="filter:url(#huenull)" />
- <text y="340" x="10">Should be valid</text>
- <text y="370" x="10">hueRotate.</text>
- <rect y="300" x="0" width="200" height="99" fill="lime" style="filter:url(#huerange)" />
-
- <!-- Do not render element if values is invalid -->
- <rect y="2" x="202" width="196" height="96" fill="red" style="filter:url(#matbad)" />
- <text y="40" x="210" style="filter:url(#matbad)">Invalid matrix</text>
- <text y="70" x="210" style="filter:url(#matbad)">values attribute.</text>
- <rect y="102" x="202" width="196" height="96" fill="red" style="filter:url(#huebad)" />
- <text y="140" x="210" style="filter:url(#huebad)">Invalid saturate</text>
- <text y="170" x="210" style="filter:url(#huebad)">values attribute.</text>
- <rect y="202" x="202" width="196" height="96" fill="red" style="filter:url(#satbad)" />
- <text y="240" x="210" style="filter:url(#satbad)">Invalid hueRotate</text>
- <text y="270" x="210" style="filter:url(#satbad)">values attribute.</text>
- <rect y="302" x="202" width="196" height="96" fill="red" style="filter:url(#satrange)" />
- <text y="340" x="210" style="filter:url(#satrange)">Saturate must </text>
- <text y="370" x="210" style="filter:url(#satrange)">have one value.</text>
-</g>
+ <rect width="300" height="300" fill="red" />
+ <rect y="0" width="100" height="100" fill="lime" filter="url(#matnull)"/>
+ <rect y="0" x="100" width="100" height="100" fill="lime" filter="url(#mattoofew)"/>
+ <rect y="0" x="200" width="100" height="100" fill="lime" filter="url(#mattoomany)"/>
+ <rect y="100" width="100" height="100" fill="lime" filter="url(#satnull)"/>
+ <rect y="100" x="100" width="100" height="100" fill="lime" filter="url(#sattoomany)"/>
+ <rect y="100" x="200" width="100" height="100" fill="lime" filter="url(#satrange)"/>
+ <rect y="200" width="100" height="100" fill="lime" filter="url(#huenull)"/>
+ <rect y="200" x="100" width="100" height="100" fill="lime" filter="url(#huetoomany)"/>
+ <rect y="200" x="200" width="100" height="100" fill="lime" filter="url(#huerange)"/>
</svg>

Powered by Google App Engine
This is Rietveld 408576698