zalan@apple.com | 6d3d2a7 | 2014-04-08 14:50:38 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>This tests that border images sized and positioned properly on subpixels.</title> |
| 5 | <style> |
| 6 | div { |
| 7 | border-width:0px 0px 0px 0.5px; |
| 8 | position: fixed; |
| 9 | -webkit-border-image: -webkit-linear-gradient(black, black) 1 100%; |
simon.fraser@apple.com | b110f90 | 2021-08-27 21:30:29 +0000 | [diff] [blame] | 10 | border-style: solid; |
zalan@apple.com | 6d3d2a7 | 2014-04-08 14:50:38 +0000 | [diff] [blame] | 11 | } |
| 12 | </style> |
| 13 | </head> |
| 14 | <body> |
| 15 | <p id="container"></p> |
| 16 | <script> |
| 17 | var container = document.getElementById("container"); |
| 18 | w=5; h=5; |
| 19 | for (i = 0; i < 15; ++i) { |
| 20 | b = 0; |
| 21 | for (j = 0; j < 15; ++j) { |
| 22 | var e = document.createElement("div"); |
| 23 | e.style.top = ((w + 1) * i) + "px"; |
| 24 | e.style.left = ((w + 1) * j) + "px"; |
| 25 | e.style.width = w + "px"; |
| 26 | e.style.height = h + "px"; |
| 27 | e.style.borderLeftWidth = b + "px"; |
| 28 | container.appendChild(e); |
| 29 | w+=0.1; |
| 30 | h+=0.1; |
| 31 | b+=0.5; |
| 32 | } |
| 33 | } |
| 34 | </script> |
| 35 | </body> |
| 36 | </html> |