Index: LayoutTests/animations/interpolation/svg-flood-opacity-interpolation.html |
diff --git a/LayoutTests/animations/interpolation/svg-flood-opacity-interpolation.html b/LayoutTests/animations/interpolation/svg-flood-opacity-interpolation.html |
index 05f69d429328bc75b16fa9087d45e2a1d2eab795..ed96ec4ed11c2e40595395512f066f2167e808c3 100644 |
--- a/LayoutTests/animations/interpolation/svg-flood-opacity-interpolation.html |
+++ b/LayoutTests/animations/interpolation/svg-flood-opacity-interpolation.html |
@@ -1,31 +1,94 @@ |
<!DOCTYPE html> |
<meta charset="UTF-8"> |
<style> |
+.container { |
+ display: inline-block; |
+} |
+.parent { |
+ flood-opacity: 0.8; |
+} |
+.target { |
+ flood-opacity: 0.6; |
+} |
svg { |
- width: 100px; |
- height: 100px; |
- background: red; |
+ background: black; |
} |
-svg rect { |
+rect { |
fill: black; |
filter: url(#test); |
} |
</style> |
<body> |
<template id="target-template"> |
- <svg> |
+ <svg width="10" height="100"> |
<defs> |
<filter id="test"> |
- <feFlood x="10" y="10" width="80" height="80" flood-color="blue" class="target" /> |
+ <feFlood x="0" y="0" width="10" height="100" flood-color="blue" class="target" /> |
</filter> |
</defs> |
- <rect width="100" height="100"></rect> |
+ <rect width="10" height="100"></rect> |
</svg> |
</template> |
<script src="resources/interpolation-test.js"></script> |
<script> |
assertInterpolation({ |
property: 'flood-opacity', |
+ from: '', |
+ to: '0.4', |
+}, [ |
+ {at: -1, is: '0.8'}, |
+ {at: -0.25, is: '0.65'}, |
+ {at: 0, is: '0.6'}, |
+ {at: 0.25, is: '0.55'}, |
+ {at: 1, is: '0.4'}, |
+ {at: 1.25, is: '0.35'}, |
+ {at: 2, is: '0.2'}, |
+]); |
+ |
+assertInterpolation({ |
+ property: 'flood-opacity', |
+ from: 'initial', |
+ to: '0.4', |
+}, [ |
+ {at: -1, is: '1'}, |
+ {at: -0.25, is: '1'}, |
+ {at: 0, is: '1'}, |
+ {at: 0.25, is: '0.85'}, |
+ {at: 1, is: '0.4'}, |
+ {at: 1.25, is: '0.25'}, |
+ {at: 2, is: '0'}, |
+]); |
+ |
+assertInterpolation({ |
+ property: 'flood-opacity', |
+ from: 'inherit', |
+ to: '0.4', |
+}, [ |
+ {at: -1, is: '1'}, |
+ {at: -0.25, is: '0.9'}, |
+ {at: 0, is: '0.8'}, |
+ {at: 0.25, is: '0.7'}, |
+ {at: 1, is: '0.4'}, |
+ {at: 1.25, is: '0.3'}, |
+ {at: 2, is: '0'}, |
+]); |
+ |
+assertInterpolation({ |
+ property: 'flood-opacity', |
+ from: 'unset', |
+ to: '0.4', |
+}, [ |
+ {at: -1, is: '1'}, |
+ {at: -0.25, is: '1'}, |
+ {at: 0, is: '1'}, |
+ {at: 0.25, is: '0.85'}, |
+ {at: 1, is: '0.4'}, |
+ {at: 1.25, is: '0.25'}, |
+ {at: 2, is: '0'}, |
+]); |
+ |
+assertInterpolation({ |
+ property: 'flood-opacity', |
from: '0.25', |
to: '0.75' |
}, [ |