summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/filter-effects/effect-reference-lighting-no-light.tentative.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/filter-effects/effect-reference-lighting-no-light.tentative.html
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/filter-effects/effect-reference-lighting-no-light.tentative.html')
-rw-r--r--testing/web-platform/tests/css/filter-effects/effect-reference-lighting-no-light.tentative.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/filter-effects/effect-reference-lighting-no-light.tentative.html b/testing/web-platform/tests/css/filter-effects/effect-reference-lighting-no-light.tentative.html
new file mode 100644
index 0000000000..beefd47a54
--- /dev/null
+++ b/testing/web-platform/tests/css/filter-effects/effect-reference-lighting-no-light.tentative.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>CSS Filters: feDiffuseLighting and feSpecularLighting error handling.</title>
+<link rel="help" href="https://drafts.fxtf.org/filter-effects/#feDiffuseLightingElement">
+<link rel="help" href="https://drafts.fxtf.org/filter-effects/#feSpecularLightingElement">
+<link rel="match" href="reference/effect-reference-lighting-no-light.tentative-ref.html">
+<meta name="assert" content="This test ensures that invalid parameters to both feDiffuseLighting and feSpecularLighting produce transparent black."/>
+<style>
+.target {
+ display: inline-block;
+ width: 100px;
+ height: 100px;
+ background-color: red;
+}
+</style>
+<div class="target" style="filter: url(#noLightDiffuse)"></div>
+<div class="target" style="filter: url(#noLightSpecular)"></div>
+<svg height="0" color-interpolation-filters="sRGB">
+ <filter id="noLightDiffuse" x="0" y="0" width="1" height="1">
+ <feDiffuseLighting lighting-color="blue"/>
+ <!-- Using 0.5 on the matrices below can cause in different engines
+ an off-by-one difference (127 vs. 128), when rounding 127.5 (255 * 0.5)
+ either up or downwards.
+ Hence, the test uses 0.502 (~128/255) to avoid this tie-break. -->
+ <feColorMatrix values="1 0 0 0 0,
+ 0 1 0 0 0.502,
+ 0 0 1 0 0,
+ 0 0 0 1 1"/>
+ </filter>
+
+ <filter id="noLightSpecular" x="0" y="0" width="1" height="1">
+ <feSpecularLighting lighting-color="blue"/>
+ <feColorMatrix values="1 0 0 0 0,
+ 0 1 0 0 0.502,
+ 0 0 1 0 0,
+ 0 0 0 1 1"/>
+ </filter>
+</svg>