diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
commit | 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /testing/web-platform/tests/css/css-backgrounds/box-shadow | |
parent | Initial commit. (diff) | |
download | firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-backgrounds/box-shadow')
16 files changed, 362 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/box-shadow-blur-definition-001.xht b/testing/web-platform/tests/css/css-backgrounds/box-shadow/box-shadow-blur-definition-001.xht new file mode 100644 index 0000000000..e6ae0a2e90 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/box-shadow-blur-definition-001.xht @@ -0,0 +1,47 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>CSS Test: blur computation for box-shadow</title> + <link rel="author" title="L. David Baron" href="https://dbaron.org/" /> + <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> + <link rel="help" href="http://www.w3.org/TR/css3-background/#the-box-shadow"/> + <meta name="assert" content="the resulting shadow must approximate (with each pixel being within 5% of its expected value) the image that would be generated by applying to the shadow a Gaussian blur with a standard deviation equal to half the blur radius" /> + <style type="text/css"> + div.stripecontainer { + width: 600px; + height: 30px; + border: medium solid blue; + } + div.refimage, div.blurcontainer { + width: 600px; + height: 10px; + } + div.refimage img { + display: block; + } + div.blurcontainer { position: relative; overflow: hidden } + div.blur { + position: absolute; + width: 2000px; + height: 2010px; + top: -1000px; /* places 1000px both above and below container */ + left: -2000px; /* places right edge at left of container */ + box-shadow: 300px 0 100px black; + } + </style> + </head> + <body> + <p>The following test should contain three grayscale stripes, each 10 + pixels tall, with no space between them, but all enclosed within a + blue border. At all points, the middle stripe must be <strong>the + same color as or darker than</strong> the top stripe, and <strong>the + same color as or lighter than</strong> the bottom stripe. (This tests + that the blurring algorithm produces results within 5% of a Gaussian + blur.)</p> + <div class="stripecontainer"> + <div class="refimage"><img height="10" width="600" src="support/box-shadow-blur-definition-001-light-bound.png" alt="[reference stripe image]" /></div> + <div class="blurcontainer"><div class="blur"></div></div> + <div class="refimage"><img height="10" width="600" src="support/box-shadow-blur-definition-001-dark-bound.png" alt="[reference stripe image]" /></div> + </div> + </body> +</html> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-001-ref.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-001-ref.html new file mode 100644 index 0000000000..7e64fa9f63 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-001-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<style> + .piece { + position: absolute; + left: 5px; + top: 5px; + width: 95px; + height: 95px; + border: solid; + } +</style> +<div style="position:relative; margin:50px;"> + <div class="piece" style="border-width:0 5px 0 0;"></div> + <div class="piece" style="margin-left:120px; border-width:0 5px 0 0;"></div> + <div class="piece" style="margin-left:240px; border-width:0 5px 5px 0;"></div> +</div> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-001.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-001.html new file mode 100644 index 0000000000..1c7193fa7b --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-001.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/css-break-3/#break-decoration"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1402736"> +<link rel="match" href="slice-block-fragmentation-001-ref.html"> +<div style="margin:50px; columns:3; column-fill:auto; gap:20px; width:340px; height:100px;"> + <div style="box-shadow:5px 5px black; height:300px;"></div> +</div> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-002-ref.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-002-ref.html new file mode 100644 index 0000000000..2c148d8a52 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-002-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<style> + .piece { + position: absolute; + left: -5px; + top: 0; + width: 95px; + height: 95px; + border: solid; + } +</style> +<div style="position:relative; margin:50px;"> + <div class="piece" style="top:-5px; border-width:5px 0 0 5px;"></div> + <div class="piece" style="margin-left:120px; border-width:0 0 0 5px;"></div> + <div class="piece" style="margin-left:240px; border-width:0 0 0 5px;"></div> +</div> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-002.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-002.html new file mode 100644 index 0000000000..b645ed82ea --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-002.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/css-break-3/#break-decoration"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1402736"> +<link rel="match" href="slice-block-fragmentation-002-ref.html"> +<div style="margin:50px; columns:3; column-fill:auto; gap:20px; width:340px; height:100px;"> + <div style="box-shadow:-5px -5px black; height:300px;"></div> +</div> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-003-ref.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-003-ref.html new file mode 100644 index 0000000000..a58e810174 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-003-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<style> + .piece { + position: absolute; + left: -8px; + top: 0; + width: 100px; + height: 100px; + border: solid; + } +</style> +<div style="position:relative; margin:50px;"> + <div class="piece" style="top:-8px; border-width:8px 12px 0 8px;"></div> + <div class="piece" style="margin-left:140px; border-width:0 12px 0 8px;"></div> + <div class="piece" style="margin-left:280px; border-width:0 12px 12px 8px;"></div> +</div> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-003.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-003.html new file mode 100644 index 0000000000..4fca18bfdd --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-003.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/css-break-3/#break-decoration"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1402736"> +<link rel="match" href="slice-block-fragmentation-003-ref.html"> +<div style="margin:50px; columns:3; column-fill:auto; gap:40px; width:380px; height:100px;"> + <div style="box-shadow:2px 2px 0 10px black; width:100px; height:300px;"></div> +</div> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001-ref.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001-ref.html new file mode 100644 index 0000000000..171e4935ed --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> +<div style="font:16px/40px Ahem; color:cyan;"> + <span style="position:relative;"> + pppÉÉÉ + <div style="position:absolute; inset:5px 0 -5px 5px; border:solid black; border-width:0 0 5px 0;"></div> + </span> + <br> + <span style="position:relative;"> + pppÉÉÉ + <div style="position:absolute; inset:5px 0 -5px 5px; border:solid black; border-width:0 0 5px 0;"></div> + </span> + <br> + <span style="position:relative;"> + pppÉÉÉ + <div style="position:absolute; inset:5px -5px -5px 5px; border:solid black; border-width:0 5px 5px 0;"></div> + </span> +</div> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001.html new file mode 100644 index 0000000000..46eab59ab2 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/css-break-3/#break-decoration"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1402736"> +<link rel="match" href="slice-inline-fragmentation-001-ref.html"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> +<div style="font:16px/40px Ahem; color:cyan;"> + <span style="box-shadow:5px 5px black;"> + pppÉÉÉ <br> + pppÉÉÉ <br> + pppÉÉÉ + </span> +</div> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002-ref.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002-ref.html new file mode 100644 index 0000000000..baf297fe2c --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> +<div style="font:16px/40px Ahem; color:cyan;"> + <span style="position:relative;"> + pppÉÉÉ + <div style="position:absolute; inset:-5px 5px 5px -5px; border:solid black; border-width:5px 0 0 5px;"></div> + </span> + <br> + <span style="position:relative;"> + pppÉÉÉ + <div style="position:absolute; inset:-5px 5px 5px 0; border:solid black; border-width:5px 0 0 0;"></div> + </span> + <br> + <span style="position:relative;"> + pppÉÉÉ + <div style="position:absolute; inset:-5px 5px 5px 0; border:solid black; border-width:5px 0 0 0;"></div> + </span> +</div> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002.html new file mode 100644 index 0000000000..516abcf2a9 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/css-break-3/#break-decoration"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1402736"> +<link rel="match" href="slice-inline-fragmentation-002-ref.html"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> +<div style="font:16px/40px Ahem; color:cyan;"> + <span style="box-shadow:-5px -5px black;"> + pppÉÉÉ <br> + pppÉÉÉ <br> + pppÉÉÉ + </span> +</div> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003-ref.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003-ref.html new file mode 100644 index 0000000000..4c1954b3e6 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> +<div style="font:16px/40px Ahem; color:cyan;"> + <span style="position:relative;"> + pppÉÉÉ + <div style="position:absolute; inset:-8px 0 -12px -8px; border:solid black; border-width:8px 0 12px 8px;"></div> + </span> + <br> + <span style="position:relative;"> + pppÉÉÉ + <div style="position:absolute; inset:-8px 0 -12px 0; border:solid black; border-width:8px 0 12px 0;"></div> + </span> + <br> + <span style="position:relative;"> + pppÉÉÉ + <div style="position:absolute; inset:-8px -12px -12px 0; border:solid black; border-width:8px 12px 12px 0;"></div> + </span> +</div> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003.html new file mode 100644 index 0000000000..336c01f5ba --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/css-break-3/#break-decoration"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1402736"> +<link rel="match" href="slice-inline-fragmentation-003-ref.html"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> +<div style="font:16px/40px Ahem; color:cyan;"> + <span style="box-shadow:2px 2px 0 10px black;"> + pppÉÉÉ <br> + pppÉÉÉ <br> + pppÉÉÉ + </span> +</div> diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/support/box-shadow-blur-definition-001-dark-bound.png b/testing/web-platform/tests/css/css-backgrounds/box-shadow/support/box-shadow-blur-definition-001-dark-bound.png Binary files differnew file mode 100644 index 0000000000..695f414ad8 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/support/box-shadow-blur-definition-001-dark-bound.png diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/support/box-shadow-blur-definition-001-light-bound.png b/testing/web-platform/tests/css/css-backgrounds/box-shadow/support/box-shadow-blur-definition-001-light-bound.png Binary files differnew file mode 100644 index 0000000000..4f680b4bcb --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/support/box-shadow-blur-definition-001-light-bound.png diff --git a/testing/web-platform/tests/css/css-backgrounds/box-shadow/tools/box-shadow-blur-definition-001-image-generator.html b/testing/web-platform/tests/css/css-backgrounds/box-shadow/tools/box-shadow-blur-definition-001-image-generator.html new file mode 100644 index 0000000000..8a48fe357b --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow/tools/box-shadow-blur-definition-001-image-generator.html @@ -0,0 +1,144 @@ +<!DOCTYPE HTML> +<html> +<head> +<title>image generator for box-shadow tests</title> +<meta charset="UTF-8"> +<!-- + +This file uses canvas to generate the images used (and checked in to +the repository) for these tests. + +Since the tests are blurring a very tall (relative to the Gaussian +kernel) straight boundary, we can use a one dimensional Gaussian +function to generate the image. + +We're blurring a space that has black on the left 300 pixels and white +on the right 300 pixels. We treat pixel edges as 0, 1, 2, ..., 600 and +pixel centers as 0.5, 1.5, ..., 599.5. + +Therefore we want the cumulative gaussian, with 5% slop, rounded using +floor or ceiling to provide *extra* tolerance. This means the color +values for each pixel should be the output of the following R commands: + +floor(pmax(0, pnorm(seq(0,599)+0.5, mean=300, sd=50) - 0.05) * 255) +ceiling(pmin(1, pnorm(seq(0,599)+0.5, mean=300, sd=50) + 0.05) * 255) + +--> +<script> +var darker = [ + // output of + // floor(pmax(0, pnorm(seq(0,599)+0.5, mean=300, sd=50) - 0.05) * 255) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 32, 33, 34, + 36, 37, 39, 40, 42, 43, 45, 46, 48, 49, 51, 53, 54, 56, 58, 59, 61, 63, + 65, 66, 68, 70, 72, 74, 76, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, + 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, + 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, + 155, 157, 159, 160, 162, 164, 166, 168, 169, 171, 173, 174, 176, 178, + 179, 181, 182, 184, 185, 187, 188, 190, 191, 193, 194, 195, 197, 198, + 199, 201, 202, 203, 204, 205, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 218, 219, 220, 221, 222, 222, 223, 224, 224, 225, + 226, 226, 227, 227, 228, 229, 229, 230, 230, 231, 231, 232, 232, 232, + 233, 233, 234, 234, 234, 235, 235, 235, 236, 236, 236, 236, 237, 237, + 237, 237, 238, 238, 238, 238, 238, 238, 239, 239, 239, 239, 239, 239, + 239, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 241, 241, 241, + 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, + 241, 241, 241, 241, 241, 241, 241, 241, 241, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242 +]; + +var lighter = [ + // output of + // ceiling(pmin(1, pnorm(seq(0,599)+0.5, mean=300, sd=50) + 0.05) * 255) + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, + 19, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 23, 23, 23, 24, 24, 25, + 25, 26, 26, 27, 28, 28, 29, 29, 30, 31, 31, 32, 33, 33, 34, 35, 36, 37, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 56, + 57, 58, 60, 61, 62, 64, 65, 67, 68, 70, 71, 73, 74, 76, 77, 79, 81, 82, + 84, 86, 87, 89, 91, 93, 95, 96, 98, 100, 102, 104, 106, 108, 110, 112, + 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, + 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, + 170, 172, 174, 176, 178, 179, 181, 183, 185, 187, 189, 190, 192, 194, + 196, 197, 199, 201, 202, 204, 206, 207, 209, 210, 212, 213, 215, 216, + 218, 219, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 246, 247, + 248, 249, 250, 250, 251, 252, 252, 253, 253, 254, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255 +] + +function append_link(arr, name) { + if (arr.length != 600) { + return; + } + var canvas = document.createElement("canvas"); + canvas.setAttribute("width", 600); + canvas.setAttribute("height", 10); + var cx = canvas.getContext("2d"); + for (var x = 0; x < 600; ++x) { + var color = arr[x]; + cx.fillStyle = "rgb(" + color + "," + color + "," + color + ")"; + cx.fillRect(x, 0, 1, 10); + } + + var a = document.createElement("a"); + a.setAttribute("href", canvas.toDataURL("image/png", "")); + a.appendChild(document.createTextNode(name)); + var p = document.createElement("p"); + p.appendChild(a); + document.body.appendChild(p); +} + +function run() { + append_link(darker, "box-shadow-blur-definition-001-dark-bound.png"); + append_link(lighter, "box-shadow-blur-definition-001-light-bound.png"); +} + +window.addEventListener("load", run); +</script> +</head> +<body> +</body> +</html> |