|
3 | 3 |
|
4 | 4 | <head>
|
5 | 5 | <meta charset="UTF-8">
|
6 |
| - <link rel="match" href="display-none-mask-ref.html" /> |
| 6 | + <title>Mask behaviour when mask image is missing or display:none</title> |
| 7 | + <link rel="match" href="display-none-mask-ref.html"> |
| 8 | + <link name="author" title="Timothy Nikkel" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1624532"> |
| 9 | + <link name="author" title="Mike Bremford" href="http://bfo.com"> <!-- edited 202010 --> |
| 10 | + <link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-mask-image"> |
| 11 | + <link rel="help" href="https://drafts.fxtf.org/css-masking-1/#MaskElement"> |
| 12 | + <link rel="help" href="https://github.com/w3c/fxtf-drafts/issues/245"> |
| 13 | + <meta name="assert" content="A missing or invalid mask image is equivalent to transparent black (i.e. nothing is displayed). A mask with display:none is disabled (which is a change to the specified behaviour as of issue 245)"> |
7 | 14 | </head>
|
8 | 15 |
|
9 | 16 | <body>
|
10 | 17 | <svg width="200" height="200">
|
| 18 | + <!-- missing/invalid mask is equivalent to transparent black - nothing displayed --> |
11 | 19 | <foreignObject x="0" y="0" width="200" height="200" style="mask: url('#notfound');">
|
12 | 20 | <div style="width: 200px; height: 200px; background: red"></div>
|
13 | 21 | </foreignObject>
|
14 | 22 | </svg>
|
15 | 23 | <svg width="200" height="200">
|
| 24 | + <!-- display:none on mask means mask is not applied (new in https://github.com/w3c/fxtf-drafts/issues/245) --> |
16 | 25 | <foreignObject x="0" y="0" width="200" height="200" style="mask: url('#noneMask');">
|
17 |
| - <div style="width: 200px; height: 200px; background: red"></div> |
| 26 | + <div style="width: 200px; height: 200px; background: green"></div> |
18 | 27 | </foreignObject>
|
19 | 28 | </svg>
|
20 | 29 | <svg width="200" height="200">
|
21 | 30 | <foreignObject x="0" y="0" width="200" height="200">
|
| 31 | + <!-- missing/invalid mask is equivalent to transparent black - nothing displayed --> |
22 | 32 | <div style="width: 200px; height: 200px; background: red; mask: url('#notfound');"></div>
|
23 | 33 | </foreignObject>
|
24 | 34 | </svg>
|
25 | 35 | <svg width="200" height="200">
|
26 | 36 | <foreignObject x="0" y="0" width="200" height="200">
|
27 |
| - <div style="width: 200px; height: 200px; background: red; mask: url('#noneMask');"></div> |
| 37 | + <!-- display:none on mask means mask is not applied (new in https://github.com/w3c/fxtf-drafts/issues/245) --> |
| 38 | + <div style="width: 200px; height: 200px; background: green; mask: url('#noneMask');"></div> |
28 | 39 | </foreignObject>
|
29 | 40 | </svg>
|
30 | 41 |
|
|
45 | 56 | </mask>
|
46 | 57 | </defs>
|
47 | 58 | <foreignObject x="0" y="0" width="200" height="200" style="mask: url('#aMask');">
|
48 |
| - <div style="width: 200px; height: 200px; background: red;"></div> |
| 59 | + <div style="width: 200px; height: 200px; background: green;"></div> |
49 | 60 | </foreignObject>
|
50 | 61 | </svg>
|
51 | 62 | <svg width="200" height="200">
|
52 | 63 | <foreignObject x="0" y="0" width="200" height="200">
|
53 |
| - <div style="width: 200px; height: 200px; background: red; mask: url('#aMask');"></div> |
| 64 | + <div style="width: 200px; height: 200px; background: green; mask: url('#aMask');"></div> |
54 | 65 | </foreignObject>
|
55 | 66 | </svg>
|
56 | 67 |
|
57 | 68 | <!-- make sure masking works on active content -->
|
58 | 69 | <svg width="200" height="200">
|
59 | 70 | <foreignObject x="0" y="0" width="200" height="200" style="mask: url('#aMask');">
|
60 |
| - <div style="width: 200px; height: 200px; background: red; will-change: transform"></div> |
| 71 | + <div style="width: 200px; height: 200px; background: green; will-change: transform"></div> |
61 | 72 | </foreignObject>
|
62 | 73 | </svg>
|
63 | 74 | <svg width="200" height="200">
|
64 | 75 | <foreignObject x="0" y="0" width="200" height="200">
|
65 |
| - <div style="width: 200px; height: 200px; background: red; will-change: transform; mask: url('#aMask');"></div> |
| 76 | + <div style="width: 200px; height: 200px; background: green; will-change: transform; mask: url('#aMask');"></div> |
66 | 77 | </foreignObject>
|
67 | 78 | </svg>
|
68 | 79 | </body>
|
|
0 commit comments