Commit 0f1d2213 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

[css-filters]: Migrate effect-reference-lighting-no-light.html to WPT

Original CL: https://codereview.chromium.org/1375793003

BUG=1063749
R=fs@opera.com

Change-Id: I5b01b83b412ce0b3ad9f4391f0248241a02a36f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2138221
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#757177}
parent d6f810ff
<!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;
......@@ -12,8 +17,12 @@
<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.5,
0 1 0 0 0.502,
0 0 1 0 0,
0 0 0 1 1"/>
</filter>
......@@ -21,7 +30,7 @@
<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.5,
0 1 0 0 0.502,
0 0 1 0 0,
0 0 0 1 1"/>
</filter>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment