summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-paint-api/paint2d-filter-ref.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/css-paint-api/paint2d-filter-ref.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/css-paint-api/paint2d-filter-ref.html')
-rw-r--r--testing/web-platform/tests/css/css-paint-api/paint2d-filter-ref.html61
1 files changed, 61 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-paint-api/paint2d-filter-ref.html b/testing/web-platform/tests/css/css-paint-api/paint2d-filter-ref.html
new file mode 100644
index 0000000000..2e4b979ad8
--- /dev/null
+++ b/testing/web-platform/tests/css/css-paint-api/paint2d-filter-ref.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ canvas { display: inline-block; }
+</style>
+</head>
+<body>
+<canvas id='output0' width='100' height='100'></canvas>
+<canvas id='output1' width='100' height='100'></canvas>
+<canvas id='output2' width='100' height='100'></canvas>
+<canvas id='output3' width='100' height='100'></canvas>
+<canvas id='output4' width='100' height='100'></canvas>
+<br>
+<canvas id='output5' width='100' height='100'></canvas>
+<canvas id='output6' width='100' height='100'></canvas>
+<canvas id='output7' width='100' height='100'></canvas>
+<canvas id='output8' width='100' height='100'></canvas>
+<canvas id='output9' width='100' height='100'></canvas>
+<br>
+<canvas id='output10' width='100' height='100'></canvas>
+<canvas id='output11' width='100' height='100'></canvas>
+<canvas id='output12' width='100' height='100'></canvas>
+<canvas id='output13' width='100' height='100'></canvas>
+<canvas id='output14' width='100' height='100'></canvas>
+
+<script>
+var paint = function(id, filter) {
+ var c = document.getElementById(id);
+ var ctx = c.getContext('2d');
+ ctx.filter = filter;
+ ctx.fillStyle = '#A00';
+ ctx.fillRect(0, 0, 15, 15);
+ ctx.fillStyle = '#0A0';
+ ctx.fillRect(15, 0, 15, 15);
+ ctx.fillStyle = '#00A';
+ ctx.fillRect(0, 15, 15, 15);
+ ctx.fillStyle = "#AA0";
+ ctx.fillRect(15, 15, 15, 15);
+ return ctx;
+};
+
+paint('output0', "none");
+paint('output1', "blur(10px)");
+paint('output2', "blur(0px)");
+paint('output3', "blur(16px)");
+paint('output4', "blur(0px)");
+paint('output5', "brightness(40%)");
+paint('output6', "contrast(20%)");
+paint('output7', "drop-shadow(0 0 5px green)");
+paint('output8', "grayscale(100%)");
+paint('output9', "invert(100%)");
+paint('output10', "opacity(50%)");
+paint('output11', "saturate(20%)");
+paint('output12', "sepia(100%)");
+paint('output13', "sepia(1) hue-rotate(200deg)");
+paint('output14', "url(#url)");
+</script>
+</body>
+</html>
+