summaryrefslogtreecommitdiffstats
path: root/layout/svg/crashtests/1758029-1.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/svg/crashtests/1758029-1.html
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/svg/crashtests/1758029-1.html')
-rw-r--r--layout/svg/crashtests/1758029-1.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/layout/svg/crashtests/1758029-1.html b/layout/svg/crashtests/1758029-1.html
new file mode 100644
index 0000000000..2097e875ee
--- /dev/null
+++ b/layout/svg/crashtests/1758029-1.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<style>
+ body { background: gray; }
+ canvas { border: 2px solid black;}
+</style>
+
+<img id="img"
+ onload="go()"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==">
+<canvas id="canvas"></canvas>
+<script>
+ const ctx = canvas.getContext("2d", { desynchronized: true });
+ const SVG_FILTER = `
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <filter id="posterize">
+ <feComponentTransfer>
+ <feFuncR type="discrete" tableValues="0,1" />
+ <feFuncG type="discrete" tableValues="0,1" />
+ <feFuncB type="discrete" tableValues="0,1" />
+ <feFuncA type="discrete" tableValues="0,1" />
+ </feComponentTransfer>
+ </filter>
+ </svg>`;
+
+ const FILTER1 = `url('data:image/svg+xml;utf8,${SVG_FILTER.replace(/\n/g, "")
+ .replace(/\s+/g, " ")
+ .trim()}#posterize') grayscale(50%) brightness(50%)`;
+ function go() {
+ canvas.width = img.naturalWidth;
+ canvas.height = img.naturalHeight;
+
+ ctx.imageSmoothingEnabled = true;
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
+ ctx.filter = FILTER1;
+ ctx.drawImage(img, 0, 0);
+ setTimeout(() => { document.documentElement.removeAttribute("class")}, 0);
+ }
+</script>