|
1 <!DOCTYPE html> |
|
2 <!-- |
|
3 Any copyright is dedicated to the Public Domain. |
|
4 http://creativecommons.org/licenses/publicdomain/ |
|
5 |
|
6 Makes sure that no image is drawn when an empty region of the source image |
|
7 is specified by -moz-image-rect(). |
|
8 --> |
|
9 <html> |
|
10 <head> |
|
11 <title>Testcases: -moz-image-rect() [bug 113577]</title> |
|
12 <style> |
|
13 div.wrapper { |
|
14 width: 32px; |
|
15 height: 32px; |
|
16 margin: 10px; |
|
17 background-color: red; |
|
18 } |
|
19 div.wrapper div { |
|
20 width: 32px; |
|
21 height: 32px; |
|
22 background: no-repeat; |
|
23 } |
|
24 /* Zero width and height */ |
|
25 #test1 { |
|
26 background-image: -moz-image-rect(url(green-16x16-in-blue-32x32.png), 0, 0, 0, 0); |
|
27 } |
|
28 /* Negative height */ |
|
29 #test2 { |
|
30 background-image: -moz-image-rect(url(green-16x16-in-blue-32x32.png), 32, 32, 0, 0); |
|
31 } |
|
32 /* Image rect outside the source image */ |
|
33 #test3 { |
|
34 background-image: -moz-image-rect(url(green-16x16-in-blue-32x32.png), 100, 200, 200, 100); |
|
35 } |
|
36 /* Negative height */ |
|
37 #test4 { |
|
38 /* It is only after the source image size is available that it can be |
|
39 determined if this image is empty or not. */ |
|
40 background-image: -moz-image-rect(url(green-16x16-in-blue-32x32.png), 16, 32, 50%, 16); |
|
41 } |
|
42 </style> |
|
43 </head> |
|
44 <body> |
|
45 <div class="wrapper"><div id="test1"></div></div> |
|
46 <div class="wrapper"><div id="test2"></div></div> |
|
47 <div class="wrapper"><div id="test3"></div></div> |
|
48 <div class="wrapper"><div id="test4"></div></div> |
|
49 </body> |
|
50 </html> |