tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 1ba9d6a01edd54a6f914ae71fa6a0396ddb4b4b4
parent aa9a7983ca1b2a3ed6e6b409d7b321ce9121a4f9
Author: Hans Otto Wirtz <hansottowirtz@gmail.com>
Date:   Thu,  4 Dec 2025 16:55:58 +0000

Bug 2003808 [wpt PR 56455] - Add feColorMatrix special value reftest, a=testonly

Automatic update from web-platform-tests
Add feColorMatrix special value reftest

--

wpt-commits: eaafc3193532206a1563c1dacf4b016bee0d573d
wpt-pr: 56455

Diffstat:
Atesting/web-platform/tests/css/filter-effects/fecolormatrix-special-value-ref.html | 25+++++++++++++++++++++++++
Atesting/web-platform/tests/css/filter-effects/fecolormatrix-special-value.html | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/testing/web-platform/tests/css/filter-effects/fecolormatrix-special-value-ref.html b/testing/web-platform/tests/css/filter-effects/fecolormatrix-special-value-ref.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<html> +<head> + <title>Filter Effects: Test feColorMatrix with specific special values</title> + <link rel="author" title="Hans Otto Wirtz" href="mailto:hansottowirtz@gmail.com"> +</head> + +<body> + <p>You should see 3 squares in 1 even brown color.</p> + + <svg viewBox='0 0 100 100' width="100" height="100" version="1.1" xmlns="http://www.w3.org/2000/svg"> + <rect x='0' y='0' width='100' height='100' fill="#CB4E00"></rect> + </svg> + + <svg viewBox='0 0 100 100' width="100" height="100" version="1.1" xmlns="http://www.w3.org/2000/svg"> + <rect x='0' y='0' width='100' height='100' fill="#CB4E00"></rect> + </svg> + + <svg viewBox='0 0 100 100' width="100" height="100" version="1.1" xmlns="http://www.w3.org/2000/svg"> + <rect x='0' y='0' width='100' height='100' fill="#CB4E00"></rect> + </svg> +</body> + +</html> +\ No newline at end of file diff --git a/testing/web-platform/tests/css/filter-effects/fecolormatrix-special-value.html b/testing/web-platform/tests/css/filter-effects/fecolormatrix-special-value.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> + <title>Filter Effects: Test feColorMatrix with specific special values</title> + <link rel="author" title="Hans Otto Wirtz" href="mailto:hansottowirtz@gmail.com"> + <link rel="help" href="http://www.w3.org/TR/filter-effects-1/#feColorMatrixElement"> + <link rel="help" href="http://www.w3.org/TR/filter-effects-1/#element-attrdef-fecolormatrix-type"> + <link rel="match" href="fecolormatrix-special-value-ref.html"> + <meta name="assert" content="If the test runs, you should see 3 squares in 1 even brown color."> + <meta name=fuzzy content="maxDifference=0-2;totalPixels=0-160000"> +</head> + +<body> + <p>You should see 3 squares in 1 even brown color.</p> + + <svg viewBox='0 0 100 100' width="100" height="100" version="1.1" xmlns="http://www.w3.org/2000/svg"> + <defs> + <linearGradient id="gradient"> + <stop stop-color="#11a9da" offset="0%" /> + <stop stop-color="#11a9da" offset="100%" /> + </linearGradient> + <filter id="filter" filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> + <feColorMatrix type="matrix" values="8 0.1486 0.1928 0 0 1 0.1353 0.1756 0 0 0 0 0 0 0 0 0 0 1 0"></feColorMatrix> + </filter> + </defs> + + <g filter="url(#filter)"> + <rect + x="0" + y="0" + width="100" + height="100" + fill="url(#gradient)" /> + </g> + </svg> + + <img width="100" height="100"/> + + <canvas width="100" height="100"></canvas> + + <script> + const canvas = document.querySelector('canvas'); + const svg = document.querySelector('svg'); + const img = document.querySelector('img'); + const svgString = new XMLSerializer().serializeToString(svg); + const ctx = canvas.getContext('2d'); + img.src = "data:image/svg+xml," + encodeURIComponent(svgString); + img.onload = () => { + ctx.drawImage(img, 0, 0); + document.documentElement.classList.remove('reftest-wait'); + }; + </script> +</body> + +</html> +\ No newline at end of file