tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

css-blending-test-plan-proposal.html (91810B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 	<title>Compositing and Blending test plan</title>
      5 	<meta charset='utf-8'>
      6 	<script src='http://www.w3.org/Tools/respec/respec-w3c-common'
      7 					async class='remove'></script>
      8 	<script class='remove'>
      9 		var respecConfig = {
     10 				specStatus: "unofficial",
     11 				shortName:  "css3-blending-test-plan",
     12 				editors: [
     13 							{
     14 								name: "Mirela Budaes",
     15 								company: "Adobe Systems, Inc.",
     16 								companyURL: "http://www.adobe.com/"
     17 							},
     18 							{
     19 								name: "Horia Olaru",
     20 								company: "Adobe Systems, Inc.",
     21 								companyURL: "http://www.adobe.com/"
     22 							},
     23 							{
     24 								name: "Mihai Tica",
     25 								company: "Adobe Systems, Inc.",
     26 								companyURL: "http://www.adobe.com/"
     27 							},
     28 
     29 				]
     30 		};
     31 	</script>
     32 	<style>
     33 		table
     34 		{
     35 			border-collapse:collapse;
     36 		}
     37 		table, td, th
     38 		{
     39 			border:1px solid black;
     40 			padding: 13px;
     41 		}
     42 		table
     43 		{
     44 			width: 100%;
     45 		}
     46 		img
     47 		{
     48 			width: 400px;
     49 		}
     50 	</style>
     51 </head>
     52 <body>
     53 	<section id='abstract'>
     54 		<p>
     55 			This document is intended to be used as a guideline for the testing
     56 			activities related to the Compositing and Blending spec [[!compositing-1]]. Its main
     57 			goal is to provide an overview of the general testing areas and an informative
     58 			description of possible test cases.
     59 		</p>
     60 		<p>
     61 			This document is not meant to replace the spec in determining the
     62 			normative and non-normative assertions to be tested, but rather
     63 			complement it.
     64 		</p>
     65 	</section>
     66 	<section>
     67 		<h2>Goals</h2>
     68 		<section>
     69 			<h3>Providing guidance on testing</h3>
     70 			<p>
     71 				In order to increase the quality of the test contributions, this
     72 				document offers a set of test cases description for conducting testing (see
     73 				<a href="#test-cases-description" class="sectionRef"></a>).
     74 			</p>
     75 		</section>
     76 		<section>
     77 			<h3>Creating automation-friendly tests</h3>
     78 			<p>
     79 				In terms of actual tests produced for the CSS Compositing and Blending, the main goal
     80 				is to ensure that most tests are automatable (i.e. they're either
     81 				reftests or use <code>testharness.js</code>). Even where manual tests
     82 				are absolutely necessary they should be written so that they can be
     83 				easily automated &ndash; as there are on-going efforts to make
     84 				WebDriver [[webdriver]] automated tests a first class citizen in W3C
     85 				testing. This means that even if a manual test requires user
     86 				interaction, the validation or PASS/FAIL conditions should still be
     87 				clear enough as to allow automatic validation if said interaction is
     88 				later automated.
     89 			</p>
     90 		</section>
     91 	</section>
     92 	<section>
     93 		<h2>Approach</h2>
     94 		<p>
     95 			Since CSS blending has only three new CSS properties,
     96 			the approach is to deep dive into every aspect of the spec as much as possible.
     97 
     98 			Tests will be created for the testing areas listed in <a href="#testig-areas" class="sectionRef"></a>
     99 			and having as guidance the test cases description from <a href="#test-cases-description" class="sectionRef"></a>.
    100 		</p>
    101 	</section>
    102 	<section>
    103 		<h2>Testing areas</h2>
    104 		<section>
    105 			<h3>Explicit testing areas</h3>
    106 				<p>
    107 				  These testing areas cover things explicitly defined in the normative sections of the Blending and Compositing spec. Please note that while detailed, this list is not necessarily
    108 				  exhaustive and some normative behaviors may not be contained in it.
    109 				  When in doubt, consult the Blending and Compositing spec or ask a question on the
    110 				  <a href="http://lists.w3.org/Archives/Public/www-style/">mailing
    111 				  list</a>.
    112 				</p>
    113 			<p>Below is the list of explicit testing areas:</p>
    114 			<ol>
    115 				<li>Proper parsing of the CSS properties and rendering according to the spec
    116 					<ul><code>mix-blend-mode</code></ul>
    117 					<ul><code>isolation</code></ul>
    118 					<ul><code>background-blend-mode</code></ul>
    119 				</li>
    120 				<li>SVG blending</li>
    121 				<li>Canvas 2D blending</li>
    122 			</ol>
    123 		</section>
    124 		<section>
    125 			<h3>Implicit testing areas</h3>
    126 			<p>
    127 			  These are testing areas either normatively defined in other specs
    128 			  that explicitly refer to the Blending and Compositing spec (e.g. [[!css3-transforms]])
    129 			  or simply not explicitly defined, but implied by various aspects of
    130 			  the spec (e.g. processing model, CSS 2.1 compliance, etc.).
    131 			  Please note that while detailed, this list is not necessarily
    132 			  exhaustive and some normative behaviors may not be contained in it.
    133 			  When in doubt, consult the Blending and Compositing spec or ask a question on the
    134 			  <a href="http://lists.w3.org/Archives/Public/www-style/">mailing
    135 			  list</a>.
    136 			</p>
    137 			<p>Below is the list of implicit testing areas:</p>
    138 			<ol>
    139 				<li>Blending different types of elements
    140 					<ul>
    141 						<li><code>&lt;video&gt;</code></li>
    142 						<li><code>&lt;canvas&gt;</code></li>
    143 						<li><code>&lt;table&gt;</code></li>
    144 						</ul>
    145 				</li>
    146 				<li>Blending elements with specific style rules applied
    147 					<ul>
    148 						<li><code>transforms</code></li>
    149 						<li><code>transitions</code> </li>
    150 						<li><code>animations</code> </li>
    151 					</ul>
    152 				</li>
    153 			</ol>
    154 		</section>
    155 	</section>
    156 	<section>
    157 			<h2>Test cases description</h2>
    158 			<section>
    159 				<h3>Test cases for <code>mix-blend-mode</code></h3>
    160 				<p>
    161 					The following diagram describes a list of notations to be used later on in the document as well as the general document structure the test cases will follow. The test cases should not be limited to this structure. This should be a wireframe and people are encouraged to come up with complex test cases as well.
    162 				</p>
    163 				<p>
    164 					<img id="test_outline" src="test_template.png" alt="Mix-blend-mode sample elements">
    165 				</p>
    166 				<p>The intended structure of the document is the following:</p>
    167 					<pre>
    168 &lt;body&gt;
    169  &lt;div id="[P]"&gt;
    170    &lt;div id="[IN-S]"&gt;&lt;/div&gt;
    171    &lt;div id="[IN-P]"&gt;
    172      &lt;div id="[B]"&gt;
    173        &lt;div id="[CB]"&gt;&lt;/div&gt;
    174      &lt;/div&gt;
    175    &lt;/div&gt;
    176  &lt;/div&gt;
    177 &lt;/body&gt;
    178 					</pre>
    179 				<p> Unless otherwise stated, test cases assume the following properties for the elements: <br>
    180 					<ul>
    181 					<li> default value for the <code>background-color</code> of the <code>body</code></li>
    182 					<li> <code>background-color</code> set to a fully opaque color for all the other elements </li>
    183 					</ul>
    184 				</p>
    185 				<p>The CSS associated to the elements used in the tests shouldn't use properties that creates a stacking context, except the ones specified in the test case descriptions.</p>
    186 				<p>Every test case has a description of the elements used. The notation from the image is used in the test case description too (e.g. for parent element the notation is [P]). Each test case uses only a subset of the elements while the other elements should just be removed.
    187 				</p></p>
    188 				<section>
    189 					<h4>An element with <code>mix-blend-mode</code> other than normal creates a stacking context</h4>
    190 					<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#mix-blend-mode" >spec</a>: <q>Applying a blendmode other than ‘normal’ to the element must establish a new stacking context [CSS21].</q></p>
    191 					<table>
    192 						<tr>
    193 							<th>Test name</th>
    194 							<th>Elements and styles</th>
    195 							<th>Expected result</th>
    196 						</tr>
    197 						<tr>
    198 							<td>Simple <code>&lt;div&gt;</td>
    199 							<td>1 element required: <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    200 								[B] - element with <code>mix-blend-mode</code> other than normal
    201 							 </td>
    202 							<td>The element [B] creates a stacking context</td>
    203 						</tr>
    204 					</table>
    205 				</section>
    206 				<section>
    207 					<h4>An element with <code>mix-blend-mode</code> blends with the content within the current stacking context</h4>
    208 					<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#csscompositingrules_CSS">spec</a>: <q>An element that has blending applied, must blend with all the underlying content of the stacking context [CSS21] that that element belongs to.</q> </p>
    209 					<table>
    210 						<tr>
    211 							<th>Test name</th>
    212 							<th>Elements and styles</th>
    213 							<th>Expected result</th>
    214 						</tr>
    215 						<tr>
    216 							<td>Blending simple elements </td>
    217 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and  <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    218 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    219 								[B] - element with <code>mix-blend-mode</code> other than normal
    220 							</td>
    221 							<td>The color of the parent element [P] mixes with the color of the child element [B].</td>
    222 						</tr>
    223 						<tr>
    224 							<td>Blending <code>&lt;video&gt;</code></td>
    225 							<td>2 elements required: <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="Sibling of the element [B]">[IN-S]</a> <br>
    226 								[B] - <code>&lt;video&gt;</code> element with <code>mix-blend-mode</code> other than normal <br>
    227 								[IN-S] - sibling(of the element [B]) visually overlaping the <code>&lt;video&gt;</code> element <br>
    228 								[IN-S] has some text inside
    229 						</td>
    230 							<td>The content of the <code>video</code> element [B] mixes with the colors of the sibling element and the text from [IN-S].</td>
    231 						</tr>
    232 						<tr>
    233 							<td>Blending with a sibling</td>
    234 							<td>3 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>, <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="Sibling of the element [B]">[IN-S]</a> <br>
    235 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    236 								[B] - element with <code>mix-blend-mode</code> other than normal <br>
    237 								[IN-S] - sibling of the element [B] <br>
    238 								The [IN-S] element visually overlaps the [B] element
    239 							</td>
    240 							<td>The colors of the parent element [P] and the sibling element [IN-S] mixes with the color of the blended element [B].</td>
    241 						</tr>
    242 						<tr>
    243 							<td>Blending with two levels of ascendants</td>
    244 							<td>3 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>, <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="child of the element [P]">[IN-P]</a> <br>
    245 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    246 								[B] - element with <code>mix-blend-mode</code> other than normal <br>
    247 								[IN-P] - Intermediate child element between the parent [P] and the child [B]
    248 							</td>
    249 							<td>The colors of the parent element [P] and the child element [IN-P] mixes with the color of the blended element [B].</td>
    250 						</tr>
    251 					</table>
    252 				</section>
    253 				<section>
    254 					<h4>An element with <code>mix-blend-mode</code> doesn't blend with anything outside the current stacking context</h4>
    255 					<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#csscompositingrules_CSS">spec</a>: <q> An element that has blending applied, must blend with all the underlying content of the stacking context [CSS21] that that element belongs to.</q></p>
    256 					<table>
    257 						<tr>
    258 							<th>Test name</th>
    259 							<th>Elements and styles</th>
    260 							<th>Expected result</th>
    261 						</tr>
    262 						<tr>
    263 							<td>Blending child overflows the parent</td>
    264 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    265 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    266 								[B] - element with <code>mix-blend-mode</code> other than normal <br>
    267 								The blending element [B] has content that lies outside the parent element. <br>
    268 								Set the <code>background-color</code> of the <code>body</code> to a value other than default</td>
    269 							<td>The color of the parent element mixes with the color of the child element. <br>
    270 								 The area of the child element outside of the parent element doesn't mix with the color of the <code>body</code></td>
    271 						</tr>
    272 						<tr>
    273 							<td>Parent with transparent pixels</td>
    274 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    275 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    276 								The element has some text inside and default value for <code>background-color</code> <br>
    277 								[B] - element with <code>mix-blend-mode</code> other than normal <br>
    278 								The <code>background-color</code> of the <code>body</code> has a value other than default</td>
    279 							<td>The color of the text from the parent element [P] mixes with the color of the child element [B]. <br>
    280 							No blending between the color of the <code>body</code> and the color of the blending element [B].
    281 							 </td>
    282 						</tr>
    283 						<tr>
    284 							<td>Parent with <code>border-radius</code></td>
    285 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    286 									[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    287 									[P] has <code>border-radius</code> specified (e.g.50%). <br>
    288 									[B] - element with <code>mix-blend-mode</code> other than normal <br>
    289 									[B] has content that lies outside the parent element, over a rounded corner. <br>
    290 									The <code>background-color</code> of the <code>body</code> has a value other than default. </td>
    291 							<td>The color of the parent element mixes with the color of the child element. <br>
    292 								 The area of the child element which draws over the rounded corner doesn't mix with the color of the <code>body</code></td>
    293 						</tr>
    294 					</table>
    295 				</section>
    296 				<section>
    297 					<h4>An element with <code>mix-blend-mode</code> other than normal must cause a group to be isolated</h4>
    298 					<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#isolation" >spec</a>: <q>operations that cause the creation of stacking context [CSS21] must cause a group to be isolated.</q> </p>
    299 					<table>
    300 						<tr>
    301 							<th>Test name</th>
    302 							<th>Elements and styles</th>
    303 							<th>Expected result</th>
    304 						</tr>
    305 						<tr>
    306 							<td>Child of the blended element has opacity</td>
    307 							<td>3 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>, <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="Child of the lement [B]">[CB]</a> <br>
    308 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    309 								[B] - element with <code>mix-blend-mode</code> other than normal <br>
    310 								[CB] - child of the element [B] with <code>opacity</code> less than one. </td>
    311 							<td>The group created by the two child elements([B] and [CB]) is blended with the parent element [P]. <br>
    312 							No blending between [B] and [CB]</td>
    313 						</tr>
    314 						<tr>
    315 							<td>Overflowed child of the blended element</td>
    316 							<td>3 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>, <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="Child of the lement [B]">[CB]</a> <br>
    317 									[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    318 									[B] - element with <code>mix-blend-mode</code> other than normal <br>
    319 									[CB] - child of the element [B] with content that lies outside the parent element [B].
    320 							</td>
    321 							<td>The group created by the two child elements([B] and [CB]) is blended with the parent element [P]. <br>
    322 							No blending between [B] and [CB]. There is only one color for the entire element [CB] </td>
    323 						</tr>
    324 						<tr>
    325 							<td>Blended element with transparent pixels</td>
    326 							<td>3 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>, <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="Child of the lement [B]">[CB]</a> <br>
    327 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    328 								[B] - element with <code>mix-blend-mode</code> other than normal and transparent <code>background-color</code> <br>
    329 								[CB] - child of the element [B]
    330 							</td>
    331 							<td>The group created by the two child elements([B] and [CB]) is blended with the parent element [P]. <br>
    332 							No blending between [B] and [CB]. </td>
    333 						</tr>
    334 					</table>
    335 				</section>
    336 				<section>
    337 					<h4>An element with <code>mix-blend-mode</code> must work properly with css transforms</h4>
    338 					<table>
    339 						<tr>
    340 							<th>Test name</th>
    341 							<th>Elements and styles</th>
    342 							<th>Expected result</th>
    343 						</tr>
    344 						<tr>
    345 							<td>Parent with 3D transform</td>
    346 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and  <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    347 								[P] - parent element with <code>3D transform</code> <br>
    348 								[B] - element with <code>mix-blend-mode</code> other than normal
    349 							<td>The color of the parent element [P] mixes with the color of the child element [B] <br>
    350 								The element (and the content) of the element [P] is properly transformed
    351 							</td>
    352 						</tr>
    353 						<tr>
    354 							<td>Blended element with 3D transform</td>
    355 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>, <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="Child of the lement [B]">[CB]</a> <br>
    356 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    357 								[B] - element with <code>mix-blend-mode</code> other than normal and <code>3D transform</code> <br>
    358 								[CB] - child of the element [B] </td>
    359 							<td> The color of the parent element [P] mixes with the color of the child element [B] <br>
    360 								The element (and the content) of the element [P] is properly transformed </td>
    361 						</tr>
    362 						<tr>
    363 							<td>Both parent and blended element with 3D transform</td>
    364 							<td> 2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and  <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    365 								[P] - parent element with <code>3D transform</code> <br>
    366 								[B] - element with <code>mix-blend-mode</code> other than normal and <code>3D transform</code>
    367 							</td>
    368 							<td>The color of the parent element [P] mixes with the color of the child element [B] <br>
    369 								The elements (and the content) of the elements [P]  and [B] are properly transformed</td>
    370 						</tr>
    371 						<tr>
    372 							<td>Blended element with transform and preserve-3d</td>
    373 							<td>3 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>, <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="Child of the lement [B]">[CB]</a> <br>
    374 									[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    375 									[B] - element with <code>mix-blend-mode</code> other than normal and transform with <code>transform-style:preserve-3d</code> <br>
    376 									[CB] - child of the element [B]. It has 3D transform property</td>
    377 							<td> The child element [CB] will NOT preserve its 3D position. <br>
    378 							<code>mix-blend-mode</code> override the behavior of <code>transform-style:preserve-3d</code>:
    379 							creates a flattened representation of the descendant elements <br>
    380 							The color of the group created by the child elements([B] and [CB]) will blend with the color of the parent element [P] </td>
    381 						</tr>
    382 						<tr>
    383 							<td>Blended element with transform and perspective</td>
    384 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    385 									[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    386 									[B] - element with <code>mix-blend-mode</code> other than normal and transform with <code>perspective</code> set to positive length </td>
    387 							<td>The colors of the parent and the child are mixed ([P] and [B]) <br>
    388 								The element (and the content) of the element [B] is properly transformed
    389 							</td>
    390 						</tr>
    391 						<tr>
    392 							<td>Sibling with 3D transform between the parent and the blended element</td>
    393 							<td>3 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>, <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="Sibling of the element [B]">[IN-S]</a> <br>
    394 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    395 								[B] - element with <code>mix-blend-mode</code> other than normal <br>
    396 								[IN-S] - Sibling(of the element [B]) with <code>3D transform</code> between the parent [P] and the child [B]
    397 								 </td>
    398 							<td>The colors of the parent element [P] and the transformed sibling element [IN-S] mixes with the color of the blended element [B].<br>
    399 							The element (and the content) of the element [IN-S] is properly transformed
    400 							</td>
    401 						</tr>
    402 						<tr>
    403 							<td>Parent with 3D transform and transition</td>
    404 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and  <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    405 								[P] - parent element with <code>3D transform</code> and transition <br>
    406 								[B] - element with <code>mix-blend-mode</code> other than normal
    407 							<td>The color of the parent element [P] mixes with the color of the child element [B] <br>
    408 								The element (and the content) of the element [P] is properly transformed
    409 							</td>
    410 						</tr>
    411 						<tr>
    412 							<td>Sibling with 3D transform(and transition) between the parent and the blended element</td>
    413 							<td>3 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>, <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="Sibling of the element [B]">[IN-S]</a> <br>
    414 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    415 								[B] - element with <code>mix-blend-mode</code> other than normal <br>
    416 								[IN-S] - sibling(of the element [B]) with <code>3D transform</code> and transition between the parent [P] and the child [B]
    417 								 </td>
    418 							<td>The colors of the parent element [P] and the transformed sibling element [IN-S] mixes with the color of the blended element [B].<br>
    419 							The element (and the content) of the element [IN-S] is properly transformed
    420 							</td>
    421 						</tr>
    422 					</table>
    423 				</section>
    424 				<section>
    425 					<h4>An element with <code>mix-blend-mode</code> must work properly with elements with <code>overflow</code> property</h4>
    426 					<table>
    427 						<tr>
    428 							<td>Parent element with <code>overflow:scroll</code> </td>
    429 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    430 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    431 								[P] has <code>overflow:scroll</code> <br>
    432 								[B] - element with <code>mix-blend-mode</code> other than normal tat overflows the parents [P] dimensions so that it creates scrolling for the parent
    433 							<td>The color of the parent element [P] mixes with the color of the child element [B]. <br>
    434 								The scrolling mechanism is not affected.
    435 							</td>
    436 						</tr>
    437 						<tr>
    438 							<td>Blended element with <code>overflow:scroll</code></td>
    439 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    440 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    441 								[B] - element with <code>mix-blend-mode</code> other than normal, <code>overflow:scroll</code> and a child element that creates overflow for [B]</td>
    442 							<td>The color of the parent element [P] mixes with the color of the child element [B] <br>
    443 								The scrolling mechanism is not affected.
    444 							</td>
    445 						</tr>
    446 						<tr>
    447 							<td>Parent element with <code>overflow:scroll</code> and blended with <code>position:fixed</code> </td>
    448 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    449 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    450 								[P] has <code>overflow:scroll</code> <br>
    451 								[B] - element with <code>mix-blend-mode</code> other than normal, <code>position:fixed</code> and should overflow the parents [P] dimensions so that it creates scrolling for the parent</td>
    452 							<td>The color of the parent element [P] mixes with the color of the child element [B] <br>
    453 								The blending happens when scrolling the content of the parent element [P] too. <br>
    454 								The scrolling mechanism is not affected.
    455 							</td>
    456 						</tr>
    457 						<tr>
    458 							<td>Parent with <code>overflow:hidden</code> and <code>border-radius</code></td>
    459 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    460 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    461 								[P] has <code>overflow:hidden</code> and <code>border-radius</code> specified (e.g.50%) <br>
    462 								[B] - element with <code>mix-blend-mode</code> other than normal with content that lies outside the parent element, over a rounded corner <br>
    463 								Set the <code>background-color</code> of the <code>body</code> to a value other than default.</td>
    464 							<td>The color of the parent element mixes with the color of the child element. <br>
    465 								The area of the child element which draws over the rounded corner is properly cut </td>
    466 						</tr>
    467 						<tr>
    468 							<td>Blended element with <code>overflow:hidden</code> and <code>border-radius</code></td>
    469 							<td>3 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="Child of the lement [B]">[CB]</a> <br>
    470 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    471 								[B] - element with <code>mix-blend-mode</code> other than normal, <code>overflow:hidden</code> and <code>border-radius</code> specified (e.g.50%). <br>
    472 								[CB] - child of the element [B], with content that lies outside the parent element, over a rounded corner. <br> </td>
    473 							<td>The group created by the two child elements([B] and [CB]) is blended with the parent element [P]. <br>
    474 								No blending between [B] and [CB]. <br>
    475 								[CB] is properly clipped so no overflow is visible.</td>
    476 						</tr>
    477 						<tr>
    478 							<td>Intermediate child with <code>overflow:hidden</code> and <code>border-radius</code> between the parent and the blended element</td>
    479 							<td>3 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>, <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="child of the element [P]">[IN-P]</a> <br>
    480 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    481 								[B] - element with <code>mix-blend-mode</code> other than normal that overflows the parents [IN-P] dimensions
    482 								[IN-P] - child(of the element [P]) with <code>overflow:hidden</code> and <code>border-radius</code> specified (e.g.50%)
    483 								 </td>
    484 							<td>The colors of the parent element [P] and the child element [IN-P] mixes with the color of the blended element [B]. <br>
    485 								[B] is is properly clipped so no overflow is visible
    486 							</td>
    487 						</tr>
    488 					</table>
    489 				</section>
    490 			<section>
    491 				<h4>Other test cases</h4>
    492 				<table>
    493 					<tr>
    494 						<th>Test name</th>
    495 						<th>Elements and styles</th>
    496 						<th>Expected result</th>
    497 					</tr>
    498 					<tr>
    499 						<td>Blended element with <code>border-image</code> </td>
    500 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    501 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    502 							[B] - element with <code>mix-blend-mode</code> other than normal and <code>border-image</code> specified as a png file
    503 						</td>
    504 						<td>The color of the parent element [P] mixes with the color of the child element. <br>
    505 							The color of the <code>border-image</code> mixes with the color of the parent element [P].
    506 						</td>
    507 					</tr>
    508 					<tr>
    509 						<td>Blending with <code>&lt;canvas&gt;</code> </td>
    510 						<td>2 elements required: <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="Sibling of the element [B]">[IN-S]</a> <br>
    511 							[B] - <code>&lt;canvas&gt;</code> element with <code>mix-blend-mode</code> other than normal <br>
    512 							[IN-S] - Sibling of the <code>&lt;canvas&gt;</code> element with some text <br>
    513 							The [IN-S] element overlaps the <code>&lt;canvas&gt;</code> element
    514 						</td>
    515 						<td>The content of the <code>&lt;canvas&gt;</code> element mixes with the color of the sibling element and the text [IN-S].</td>
    516 					</tr>
    517 					<tr>
    518 						<td>Blended <code>&lt;canvas&gt;</code></td>
    519 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    520 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    521 							[B] - Child <code>&lt;canvas&gt;</code> element with <code>mix-blend-mode</code> other than normal
    522 						</td>
    523 						<td>The color of the <code>&lt;canvas&gt;</code> element [B] mixes with the color of the parent element [P] .</td>
    524 					</tr>
    525 					<tr>
    526 						<td>Blended <code>&lt;video&gt;</code></td>
    527 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    528 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    529 							[B] - <code>&lt;video&gt;</code> element with <code>mix-blend-mode</code> other than normal
    530 						</td>
    531 						<td>The color of the <code>&lt;video&gt;</code> element mixes with the color of the parent element [P] .</td>
    532 					</tr>
    533 					<tr>
    534 						<td>Blending with <code>&lt;iframe&gt;</code> </td>
    535 						<td>2 elements required: <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> and <a href="#test_outline" title="Sibling of the element [B]">[IN-S]</a> <br>
    536 								[B] - <code>&lt;iframe&gt;</code> element with <code>mix-blend-mode</code> other than normal <br>
    537 								[IN-S] - sibling(of the element [B]) with some text <br>
    538 								The [IN-S] element visually overlaps the <code>&lt;iframe&gt;</code> element
    539 						</td>
    540 						<td>The color of the <code>&lt;iframe&gt;</code> element mixes with the color of the sibling element and the text [IN-S].</td>
    541 					</tr>
    542 					<tr>
    543 						<td>Blended <code>&lt;iframe&gt;</code></td>
    544 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    545 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    546 							[B] - <code>&lt;iframe&gt;</code> element with <code>mix-blend-mode</code> other than normal
    547 						</td>
    548 						<td>The color of the <code>&lt;iframe&gt;</code> element [B] mixes with the color of the parent element [P]. </td>
    549 					</tr>
    550 					<tr>
    551 						<td>Blended element with <code>mask</code> property</td>
    552 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    553 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    554 							[B] - element with <code>mix-blend-mode</code> other than normal and <code>mask</code> property specified to an SVG image (e.g. circle)</td>
    555 						<td>The colors of the parent and the masked child are mixed ([P] and [B])</td>
    556 					</tr>
    557 					<tr>
    558 						<td>Blended element with <code>clip-path</code> property </td>
    559 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    560 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    561 							[B] - element with <code>mix-blend-mode</code> other than normal and <code>clip-path</code> property specified to a basic shape (e.g. ellipse)</td>
    562 						<td>The colors of the parent and the clipped child are mixed ([P] and [B])</td>
    563 					</tr>
    564 					<tr>
    565 						<td>Blended element with <code>filter</code> property</td>
    566 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    567 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    568 							[B] - element with <code>mix-blend-mode</code> other than normal and <code>filter</code> property value other than none </td>
    569 						<td>The filter is applied and the result is mixed with the parent element</td>
    570 					</tr>
    571 					<tr>
    572 						<td>Blended element with <code>transition</code></td>
    573 							<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    574 								[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    575 								[B] - element with <code>mix-blend-mode</code> other than normal and <code>transition-property</code> for <code>opacity</code> </td>
    576 						<td>The transition is applied and the result is mixed with the parent element</td>
    577 					</tr>
    578 						<tr>
    579 						<td>Blended element with <code>animation</code></td>
    580 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    581 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    582 							[B] - element with <code>mix-blend-mode</code> other than normal and <code>animation</code> specified</td>
    583 						<td>The animation is applied to the child element and the result is mixed with the parent element</td>
    584 					</tr>
    585 					<tr>
    586 						<td>Image element</td>
    587 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    588 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    589 							[B] - <code>&lt;img&gt;</code> element (.jpeg or .gif image) with <code>mix-blend-mode</code> other than normal</td>
    590 						<td>The color of the <code>&lt;img&gt;</code> is mixed with the color of the <code>&lt;div&gt;</code>.</td>
    591 					</tr>
    592 					<tr>
    593 						<td>SVG element</td>
    594 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    595 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    596 							[B] - SVG element with <code>mix-blend-mode</code> other than normal</td>
    597 						<td>The color of the SVG is mixed with the color of the <code>&lt;div&gt;</code>.</td>
    598 					</tr>
    599 					<tr>
    600 						<td>Paragraph element</td>
    601 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    602 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    603 							[B] - paragraph element with <code>mix-blend-mode</code> other than normal</td>
    604 						<td>The color of the text from the paragraph element is mixed with the color of the <code>&lt;div&gt;</code></td>
    605 					</tr>
    606 					<tr>
    607 						<td>Paragraph element and background-image</td>
    608 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    609 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    610 							 and  <code>background-image</code> <br>
    611 							[B] - Child <code>p</code> element with some text and <code>mix-blend-mode</code> other than normal</td>
    612 						<td>The color of the text from the <code>p</code> element is mixed with the background image of the <code>&lt;div&gt;</code>.</td>
    613 					</tr>
    614 					<tr>
    615 						<td>Set blending from JavaScript</td>
    616 						<td>2 elements required: <a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and <a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
    617 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
    618 							[B] - Child <code>&lt;div&gt;</code> element with no <code>mix-blend-mode</code> specified<br>
    619 							From JavaScript, set the <code>mix-blend-mode</code> property for the child <code>&lt;div&gt;</code> to a value other than normal</td>
    620 						<td>The colors of the <code>&lt;div&gt;</code> elements are mixed.</td>
    621 					</tr>
    622 				</table>
    623 			</section>
    624 		</section>
    625 		<section>
    626 			<h3>Test cases for SVG elements with <code>mix-blend-mode</code></h4>
    627 			<section>
    628 				<h4><code>mix-blend-mode</code> with simple SVG graphical elements</h4>
    629 				<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#mix-blend-mode" >spec</a> : <q><code>mix-blend-mode</code> applies to svg, g, use, image, path, rect, circle, ellipse, line, polyline, polygon, text, tspan, and marker.</q></p>
    630 				<table>
    631 					<tr>
    632 						<th>Test name</th>
    633 						<th>Elements and styles</th>
    634 						<th>Expected result</th>
    635 					</tr>
    636 					<tr>
    637 						<td>Circle with SVG background</td>
    638 						<td>Set a background color for the SVG.<br>
    639 							Create 16 <code>circle</code> elements and fill them with a solid color.
    640 							<br>Apply each <code>mix-blend-mode</code> on them.</td>
    641 						<td>The color of the <code>circle</code> is mixed with the color of the background.</td>
    642 					</tr>
    643 					<tr>
    644 						<td>Ellipse with SVG background</td>
    645 						<td>Set a background color for the SVG.<br>
    646 							Create an <code>ellipse</code> element and fill it with a solid color.
    647 							<br>Apply a <code>mix-blend-mode</code> on it other than <code>normal</code>.</td>
    648 						<td>The color of the <code>ellipse</code> is mixed with the color of the background.</td>
    649 					</tr>
    650 					<tr>
    651 						<td>Image with SVG background</td>
    652 						<td>Set a background color for the SVG.
    653 							<br>Create an <code>image</code> element and apply a <code>mix-blend-mode</code> other than <code>normal</code>.</td>
    654 						<td>The <code>image</code> is mixed with the color of the background.</td>
    655 					</tr>
    656 					<tr>
    657 						<td>Line with SVG background</td>
    658 						<td>Set a background color for the SVG.
    659 							<br>Create a <code>line</code> element and fill it with a solid color.
    660 							<br>Apply a <code>mix-blend-mode</code> on it other than <code>normal</code>.</td>
    661 						<td>The color of the <code>line</code> is mixed with the color of the background.</td>
    662 					</tr>
    663 					<tr>
    664 						<td>Path with SVG background</td>
    665 						<td>Set a background color for the SVG.
    666 							<br>Create a <code>path</code> element and fill it with a solid color.
    667 							<br>Apply a <code>mix-blend-mode</code> on it other than <code>normal</code>.</td>
    668 						<td>The color of the <code>path</code> is mixed with the color of the background.</td>
    669 					</tr>
    670 					<tr>
    671 						<td>Polygon with SVG background</td>
    672 						<td>Set a background color for the SVG.
    673 							<br>Create a <code>polygon</code> element and fill it with a solid color.
    674 							<br>Apply a <code>mix-blend-mode</code> on it other than <code>normal</code>.</td>
    675 						<td>The color of the <code>polygon</code> is mixed with the color of the background.</td>
    676 					</tr>
    677 					<tr>
    678 						<td>Polyline with SVG background</td>
    679 						<td>Set a background color for the SVG.
    680 							<br>Create a <code>polyline</code> element and fill it with a solid color.
    681 							<br>Apply a <code>mix-blend-mode</code> on it other than <code>normal</code>.</td>
    682 						<td>The color of the <code>polyline</code> is mixed with the color of the background.</td>
    683 					</tr>
    684 					<tr>
    685 						<td>Rect with SVG background</td>
    686 						<td>Set a background color for the SVG.
    687 							<br>Create a <code>rect</code> element and fill it with a solid color.
    688 							<br>Apply a <code>mix-blend-mode</code> on it other than <code>normal</code>.</td>
    689 						<td>The color of the <code>rect</code> is mixed with the color of the background.</td>
    690 					</tr>
    691 					<tr>
    692 						<td>Text with SVG background</td>
    693 						<td>Set a background color for the SVG.
    694 							<br>Create a <code>text</code> element and apply a <code>mix-blend-mode</code> other than <code>normal</code>.</td>
    695 						<td>The text is mixed with the color of the background.</td>
    696 					</tr>
    697 					<tr>
    698 						<td>Text having tspan with SVG background</td>
    699 						<td>Set a background color for the SVG.
    700 							<br>Create a <code>text</code> element and a <code>tspan</code> inside it.
    701 							<br>Apply a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>tspan</code>.</td>
    702 						<td>The text is mixed with the color of the background.</td>
    703 					</tr>
    704 					<tr>
    705 						<td>Gradient with SVG background</td>
    706 						<td>Set a background color for the SVG.
    707 							<br>Create a <code>rect</code> element and fill it with a <code>gradient</code>.
    708 							<br>Apply a <code>mix-blend-mode</code> on it other than normal.</td>
    709 						<td>The gradient is mixed with the color of the background.</td>
    710 					</tr>
    711 					<tr>
    712 						<td>Pattern with SVG background</td>
    713 						<td>Set a background color for the SVG.
    714 							<br>Create a <code>rect</code> element and fill it with a <code>pattern</code>.
    715 							<br>Apply a <code>mix-blend-mode</code> on it other than normal.</td>
    716 						<td>The pattern is mixed with the color of the background.</td>
    717 					</tr>
    718 					<tr>
    719 						<td>Set blending on an element from JavaScript</td>
    720 						<td>Set a background color for the SVG.
    721 							<br>Create a <code>rect</code> element and fill it with a solid color.
    722 							<br>Apply a <code>mix-blend-mode</code> (other than <code>normal</code>) on it from JavaScript.</td>
    723 						<td>The color of the <code>rect</code> is mixed with the color of the background.</td>
    724 					</tr>
    725 					<tr>
    726 						<td>Marker with SVG background</td>
    727 						<td>Set a background color for the SVG.
    728 							<br>Create a <code>line</code> element containing a marker.
    729 							<br>Apply a <code>mix-blend-mode</code> other than <code>normal</code> on the marker.</td>
    730 						<td>The marker color is mixed with the color of the background.</td>
    731 					</tr>
    732 					<tr>
    733 						<td>Metadata with SVG background</td>
    734 						<td>Set a background color for the SVG.
    735 							<br>Create a <code>metadata</code> element containing an embedded pdf.
    736 							<br>Apply a <code>mix-blend-mode</code> other than <code>normal</code> on the marker.</td>
    737 						<td>The metadata content is not mixed with the color of the background.</td>
    738 					</tr>
    739 					<tr>
    740 						<td>ForeignObject with SVG background</td>
    741 						<td>Set a background color for the SVG.
    742 							<br>Create a <code>foreignObject</code> element containing a simple xhtml file.
    743 							<br>Apply a <code>mix-blend-mode</code> other than <code>normal</code> on the marker.</td>
    744 						<td>The foreignObject content is not mixed with the color of the background.</td>
    745 					</tr>
    746 				</table>
    747 			</section>
    748 			<section>
    749 				<h4><code>mix-blend-mode</code> with SVG groups</h4>
    750 				<table>
    751 					<tr>
    752 						<th>Test name</th>
    753 						<th>Elements and styles</th>
    754 						<th>Expected result</th>
    755 					</tr>
    756 					<tr>
    757 						<td>Group of overlapping elements with SVG background</td>
    758 						<td>Set a background color for the SVG.
    759 							<br>Create a <code>group</code> element containing two overlapping <code>rect</code> elements, each filled with a different solid color.
    760 							<br>Apply a <code>mix-blend-mode</code> other than <code>normal</code> on the group.</td>
    761 						<td>The <code>group</code> is mixed as a whole with the color of the background.</td>
    762 					</tr>
    763 				</table>
    764 			</section>
    765 			<section>
    766 				<h4><code>mix-blend-mode</code> with isolated groups</h4>
    767 				<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#mix-blend-mode" >spec</a>:
    768 				<br><q>By default, every element must create a non-isolated group.<br>
    769 					However, certain operations in SVG will create isolated groups.<br>
    770 					If one of the following features is used, the group must become isolated:
    771 					<ul>
    772 					    <li>opacity</li>
    773 					    <li>filters</li>
    774 					    <li>3D transforms (2D transforms must NOT cause isolation)</li>
    775 					    <li>blending</li>
    776 					    <li>masking</li>
    777 					</ul>
    778 				</q>
    779 				</p>
    780 				<table>
    781 					<tr>
    782 						<th>Test name</th>
    783 						<th>Elements and styles</th>
    784 						<th>Expected result</th>
    785 					</tr>
    786 					<tr>
    787 						<td>Blending two elements in an isolated group</td>
    788 						<td>Set a background color for the SVG.<br>
    789 							Create a <code>group</code> element containing two overlapping <code>rect</code> elements, each filled with a different solid color.<br>
    790 							Apply <code>opacity</code> less than 1 on the group and a <code>mix-blend-mode</code> other than <code>normal</code> on the second rect.</td>
    791 						<td>Only the intersection of the <code>rect</code> elements should mix.</td>
    792 					</tr>
    793 					<tr>
    794 						<td>Blending in a group with opacity</td>
    795 						<td>Set a background color for the SVG.<br>
    796 							Create a <code>group</code> element containing a <code>rect</code> element filled with a different solid color.<br>
    797 							Apply <code>opacity</code> less than 1 on the group and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
    798 						<td>The <code>rect</code> will not mix with the content behind it.</td>
    799 					</tr>
    800 					<tr>
    801 						<td>Blending in a group with filter</td>
    802 						<td>Set a background color for the SVG.<br>
    803 							Create a <code>group</code> element containing a <code>rect</code> element filled with a different solid color.<br>
    804 							Apply a <code>filter</code> on the group and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
    805 						<td>The <code>rect</code> will not mix with the content behind it.</td>
    806 					</tr>
    807 					<tr>
    808 						<td>Blending in a group with 2D transform</td>
    809 						<td>Set a background color for the SVG.<br>
    810 							Create a <code>group</code> element containing a <code>rect</code> element filled with a different solid color.<br>
    811 							Apply a <code>transform</code> on the group and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
    812 						<td>The <code>rect</code> will mix with the content behind it.</td>
    813 					</tr>
    814 					<tr>
    815 						<td>Blending in a group with 3D transform</td>
    816 						<td>Set a background color for the SVG.<br>
    817 							Create a <code>group</code> element containing a <code>rect</code> element filled with a different solid color.<br>
    818 							Apply a 3d transform on the group and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
    819 						<td>The <code>rect</code> will not mix with the content behind it.</td>
    820 					</tr>
    821 					<tr>
    822 						<td>Blending in a group with a mask</td>
    823 						<td>Set a background color for the SVG.<br>
    824 							Create a <code>group</code> element containing a <code>rect</code> element filled with a different solid color.<br>
    825 							Apply a <code>mask</code> on the group and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
    826 						<td>The <code>rect</code> will not mix with the content behind it.</td>
    827 					</tr>
    828 					<tr>
    829 						<td>Blending in a group with mix-blend-mode</td>
    830 						<td>Set a background color for the SVG.<br>
    831 							Create a <code>group</code> element containing a <code>rect</code> element filled with a different solid color.<br>
    832 							Apply a <code>mix-blend-mode</code> other than <code>normal</code> on the group and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
    833 						<td>The <code>rect</code> will not mix with the content behind it.</td>
    834 					</tr>
    835 				</table>
    836 			</section>
    837 			<section>
    838 				<h4>Other test cases for SVG</h4>
    839 				<table>
    840 					<tr>
    841 						<td>Blend with element having opacity</td>
    842 						<td>Set a background color for the SVG.<br>
    843 							Create a <code>rect</code> element filled with a different solid color.<br>
    844 							Apply <code>opacity</code> less than 1 and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
    845 						<td>The <code>rect</code> will mix with the content behind it.</td>
    846 					</tr>
    847 					<tr>
    848 						<td>Blend with element having stroke</td>
    849 						<td>Set a background color for the SVG.<br>
    850 							Create a <code>rect</code> element filled with a different solid color.<br>
    851 							Apply a <code>stroke</code> and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
    852 						<td>The <code>rect</code> will mix with the content behind it.</td>
    853 					</tr>
    854 					<tr>
    855 						<td>Blend with element having stroke-opacity</td>
    856 						<td>Set a background color for the SVG.<br>
    857 							Create a <code>rect</code> element filled with a different solid color.<br>
    858 							Apply a <code>stroke</code>, <code>stroke-opacity</code> less than 1 and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
    859 						<td>The <code>rect</code> will mix with the content behind it.</td>
    860 					</tr>
    861 					<tr>
    862 						<td>Blend with element having stroke-dasharray</td>
    863 						<td>Set a background color for the SVG.<br>
    864 							Create a <code>rect</code> element filled with a different solid color.<br>
    865 							Apply a <code>stroke-dasharray</code> and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
    866 						<td>The <code>rect</code> will mix with the content behind it.</td>
    867 					</tr>
    868 					<tr>
    869 						<td>Blend with element having transform</td>
    870 						<td>Set a background color for the SVG.<br>
    871 							Create an <code>image</code> element. Apply a <code>transform</code> (any combination of <code>translate</code>, <code>rotate</code>, <code>scale</code>, <code>skew</code>) and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>image</code>.</td>
    872 						<td>The <code>image</code> will mix with the content behind it.</td>
    873 					</tr>
    874 					<tr>
    875 						<td>Blend with SVG having viewbox and preserveAspectRatio set</td>
    876 						<td>Set a background color for the SVG, as well as <code>viewbox</code> and <code>preserveAspectRatio</code>.<br>
    877 							Create a <code>rect</code> element filled with a different solid color and apply a <code>mix-blend-mode</code> other than <code>normal</code> on it.</td>
    878 						<td>The <code>rect</code> will mix with the content behind it.</td>
    879 					</tr>
    880 					<tr>
    881 						<td>Blend with an element having color-profile set</td>
    882 						<td>Set a background color for the SVG.<br>
    883 							Create an <code>image</code> element. Apply a <code>color-profile</code> (<code>sRGB</code>, for example) and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>image</code>.</td>
    884 						<td>The <code>image</code> will mix with the content behind it.</td>
    885 					</tr>
    886 					<tr>
    887 						<td>Blend with an element having overflow</td>
    888 						<td>Set a background color for the SVG.<br>
    889 							Create an <code>image</code> larger than the SVG.<br>
    890 							Apply <code>overflow</code> (<code>visible</code>, <code>hidden</code>, <code>scroll</code>) and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>image</code>.</td>
    891 						<td>The <code>image</code> will mix with the content behind it.</td>
    892 					</tr>
    893 					<tr>
    894 						<td>Blend with an element having clip-path</td>
    895 						<td>Set a background color for the SVG.<br>
    896 							Create an <code>image</code> element. Apply a <code>clip-path</code> and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>image</code>.</td>
    897 						<td>The <code>image</code> will mix with the content behind it.</td>
    898 					</tr>
    899 					<tr>
    900 						<td>Blend with an element having a mask</td>
    901 						<td>Set a background color for the SVG.<br>
    902 							Create an <code>image</code> element.<br>
    903 							Apply a <code>mask</code> and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>image</code>.</td>
    904 						<td>The <code>image</code> will mix with the content behind it.</td>
    905 					</tr>
    906 					<tr>
    907 						<td>Blend with an element having a filter</td>
    908 						<td>Set a background color for the SVG.<br>
    909 							Create an <code>image</code> element.<br>
    910 							Apply a <code>filter</code> and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>image</code>.</td>
    911 						<td>The <code>image</code> will mix with the content behind it.</td>
    912 					</tr>
    913 					<tr>
    914 						<td>Blend with an animated element</td>
    915 						<td>Set a background color for the SVG.<br>
    916 							Create a <code>rect</code> element filled with a different solid color.<br>
    917 							Apply an <code>animateTransform</code> and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
    918 						<td>The <code>rect</code> will mix with the content behind it.</td>
    919 					</tr>
    920 					<tr>
    921 						<td>Set blending from an SVG script element</td>
    922 						<td>Set a background color for the SVG.<br>
    923 							Create a <code>rect</code> element and fill it with a solid color.<br>
    924 							Apply a <code>mix-blend-mode</code> (other than <code>normal</code>) on it from an svg <code>script</code> element.</td>
    925 						<td>The <code>rect</code> will mix with the content behind it.</td>
    926 					</tr>
    927 				</table>
    928 			</section>
    929 		</section>
    930 		<section>
    931 			<h3>Test cases for <code>background-blend-mode</code></h3>
    932 			<section>
    933 				<h4>Blending between the background layers and the background color for an element with <code>background-blend-mode</code> </h4>
    934 				<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#background-blend-mode">spec</a>: <q>Each background layer must blend with the element's background layer that are below it and the element's background color.</q></p>
    935 				<table>
    936 					<tr>
    937 						<th>Test name</th>
    938 						<th>Elements and styles</th>
    939 						<th>Expected result</th>
    940 					</tr>
    941 					<tr>
    942 						<td>Images with different formats</td>
    943 						<td>Element with
    944 							<ul>
    945 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
    946 								<li><code>background-color</code> set to a fully opaque color</li>
    947 								<li><code>background-blend-mode</code> other than normal</li>
    948 							</ul>
    949 							Tests should be created for <code>&lt;image&gt;</code> with different formats such as PNG, JPEG or SVG
    950 						</td>
    951 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code></td>
    952 					</tr>
    953 					<tr>
    954 						<td>Gradient and background color</td>
    955 						<td>
    956 							Element with
    957 							<ul>
    958 								<li><code>background-image</code> set to an <code>&lt;gradient&gt;</code></li>
    959 								<li><code>background-color</code> set to a fully opaque color</li>
    960 								<li><code>background-blend-mode</code> other than normal</li>
    961 							</ul>
    962 						</td>
    963 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code></td>
    964 					</tr>
    965 					<tr>
    966 						<td>Image and gradient</td>
    967 						<td>
    968 							Element with
    969 							<ul>
    970 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code> on top of a <code>&lt;gradient&gt;</code></li>
    971 								<li><code>background-blend-mode</code> other than normal</li>
    972 							</ul>
    973 						</td>
    974 						<td>The content of the <code>&lt;image&gt;</code> is mixed with the content of the <code>&lt;gradient&gt;</code>
    975 						</td>
    976 					</tr>
    977 					<tr>
    978 						<td>Gradient and image</td>
    979 						<td>Element with
    980 							<ul>
    981 								<li><code>background-image</code> set to a <code>&lt;gradient&gt;</code> on top of an <code>&lt;image&gt;</code></li>
    982 								<li><code>background-blend-mode</code> other than normal</li>
    983 							</ul>
    984 						</td>
    985 						<td>The content of the <code>&lt;image&gt;</code> is mixed with the content of the <code>&lt;gradient&gt;</code></td>
    986 					</tr>
    987 					<tr>
    988 						<td>Two gradients</td>
    989 						<td>Element with
    990 							<ul>
    991 								<li><code>background-image</code> set to a <code>&lt;gradient&gt;</code> on top of another <code>&lt;gradient&gt;</code></li>
    992 								<li><code>background-blend-mode</code> other than normal</li>
    993 							</ul></td>
    994 						<td>The content of the two gradients is mixed</td>
    995 					</tr>
    996 					<tr>
    997 						<td>Two images</td>
    998 						<td>Element with
    999 							<ul>
   1000 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code> on top of another <code>&lt;image&gt;</code></li>
   1001 								<li><code>background-blend-mode</code> other than normal</li>
   1002 							</ul></td>
   1003 						<td>The content of the two images is mixed</td>
   1004 					</tr>
   1005 					<tr>
   1006 						<td>Image and background color with transparency</td>
   1007 						<td>Element with
   1008 							<ul>
   1009 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code> with transparency(e.g. PNG images)</li>
   1010 								<li><code>background-color</code> set to a transparent color</li>
   1011 								<li><code>background-blend-mode</code> other than normal</li>
   1012 							</ul>
   1013 						</td>
   1014 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code></td>
   1015 					</tr>
   1016 					<tr>
   1017 						<td>Cross-fade image and gradient</td>
   1018 						<td>Element with
   1019 							<ul>
   1020 								<li><code>background-image</code> set to a <q>cross-fade()</q> image on top of a <code>&lt;gradient&gt;</code> </li>
   1021 								<li><code>background-blend-mode</code> other than normal</li>
   1022 							</ul>
   1023 						</td>
   1024 						<td>The content of the cross-faded image is mixed with the content of the <code>&lt;gradient&gt;</code></td>
   1025 					</tr>
   1026 					<tr>
   1027 						<td>SVG image and background color</td>
   1028 						<td>Element with
   1029 							<ul>
   1030 								<li><code>background-image</code> set to a data URI for an SVG image </li>
   1031 								<li><code>background-color</code> set to a fully opaque color</li>
   1032 								<li><code>background-blend-mode</code> other than normal</li>
   1033 							</ul>
   1034 						</td>
   1035 						<td>The content of the image is mixed with the color of the background</td>
   1036 					</tr>
   1037 					<tr>
   1038 						<td>Animated gif image and background color</td>
   1039 						<td>Element with
   1040 							<ul>
   1041 								<li><code>background-image</code> set to an animated gif image</li>
   1042 								<li><code>background-color</code> set to a fully opaque color</li>
   1043 								<li><code>background-blend-mode</code> other than normal</li>
   1044 							</ul>
   1045 						</td>
   1046 						<td>The content of the image is mixed with the color of the background</td>
   1047 					</tr>
   1048 					<tr>
   1049 						<td>Set <code>background-blend-mode</code> from JavaScript</td>
   1050 						<td>Element with
   1051 							<ul>
   1052 								<li><code>background-image</code> set to a <code>gradient</code></li>
   1053 								<li><code>background-color</code> set to a fully opaque color</li>
   1054 								<li>no <code>background-blend-mode</code> explicitly specified</li>
   1055 								From JavaScript, set the <code>background-blend-mode</code> property to a value other than normal.
   1056 							</ul>
   1057 						</td>
   1058 						<td>The content of the gradient is mixed with the color of the background</td>
   1059 					</tr>
   1060 					<tr>
   1061 						<td><code>background-blend-mode</code> on element with 3D transform</td>
   1062 						<td>Element with
   1063 							<ul>
   1064 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1065 								<li><code>background-color</code> set to a fully opaque color</li>
   1066 								<li><code>background-blend-mode</code> other than normal</li>
   1067 								<li><code>transform</code> set to a 3D function like rotateX, rotateY or translateZ</li>
   1068 							</ul>
   1069 						</td>
   1070 						<td>The content of the image is mixed with the color of the background</td>
   1071 					</tr>
   1072 				</table>
   1073 			</section>
   1074 			<section>
   1075 				<h4>Background layers do not blend with content outside the background (or behind the element)</h4>
   1076 				<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#background-blend-mode">spec</a>: <q>Background layer must not blend with the content that is behind the element instead they must act as if they are rendered into an isolated group.</q>
   1077 				</p>
   1078 				<table>
   1079 					<tr>
   1080 						<th>Test name</th>
   1081 						<th>Elements and styles</th>
   1082 						<th>Expected result</th>
   1083 					</tr>
   1084 					<tr>
   1085 						<td>One background layer</td>
   1086 						<td>Element with
   1087 							<ul>
   1088 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1089 								<li><code>background-blend-mode</code> other than normal</li>
   1090 							</ul>
   1091 						</td>
   1092 						<td>The <code>background-image</code> is not mixed with anything outside the element</td>
   1093 					</tr>
   1094 					<tr>
   1095 						<td>Two elements</td>
   1096 						<td>2 elements required: a parent element with a child. <br>
   1097 							Each one with the following properties:
   1098 							<ul>
   1099 								<li><code>background-color</code> set to a fully opaque color</li>
   1100 								<li><code>background-blend-mode</code> other than normal</li>
   1101 							</ul>
   1102 						<td>No blending between the background colors of the two elements</td>
   1103 					</tr>
   1104 					<tr>
   1105 						<td>Parent and child with <code>background-blend-mode</code></td>
   1106 						<td>2 elements required: a parent element with a child <br>
   1107 							Parent properties: <br>
   1108 							<ul>
   1109 								<li><code>background-color</code> set to a fully opaque color</li>
   1110 								<li><code>background-blend-mode</code> other than normal</li>
   1111 							</ul>
   1112 							Child properties: <br>
   1113 							<ul>
   1114 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1115 								<li><code>background-blend-mode</code> other than normal</li>
   1116 							</ul>
   1117 						<td>The content of the image from the child element does not mixes with the background color from the parent element</td>
   1118 					</tr>
   1119 				</table>
   1120 			</section>
   1121 			<section>
   1122 				<h4> <code>background-blend-mode</code> list values apply to the corresponding background layer</h4>
   1123 				<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#background-blend-mode">spec</a>: <q>The ‘background-blend-mode’ list must be applied in the same order as ‘background-image’[CSS3BG]. This means that the first element in the list will apply to the layer that is on top.</q>
   1124 				</p>
   1125 				<table>
   1126 					<tr>
   1127 						<th>Test name</th>
   1128 						<th>Elements and styles</th>
   1129 						<th>Expected result</th>
   1130 					</tr>
   1131 					<tr>
   1132 						<td>Different blend modes applied between layers</td>
   1133 						<td>Element with
   1134 							<ul>
   1135 								<li><code>background-image</code> set to an <code>&lt;image-list&gt;</code> containing three images: (e.g. I1, I2 and I3 ) </li>
   1136 								<li><code>background-blend-mode</code> set to different <code>blendmode</code> for every image: (e.g. multiply, difference, screen) </li>
   1137 							</ul></td>
   1138 						<td>The content of the three images is correctly mixed <br>
   1139 						(multiply for I1, difference for I2 and screen for I3)
   1140 						</td>
   1141 					</tr>
   1142 				</table>
   1143 			</section>
   1144 			<section>
   1145 				<h4><code>background-blend-mode</code> list values are repeated if the list is shorter than the background layer list</h4>
   1146 				<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#background-blend-mode">spec</a>: <q>If a property doesn't have enough comma-separated values to match the number of layers, the UA must calculate its used value by repeating the list of values until there are enough.</q>
   1147 				</p>
   1148 				<table>
   1149 					<tr>
   1150 						<th>Test name</th>
   1151 						<th>Elements and styles</th>
   1152 						<th>Expected result</th>
   1153 					</tr>
   1154 					<tr>
   1155 						<td>Blend mode list repeat</td>
   1156 						<td>Element with
   1157 							<ul>
   1158 								<li><code>background-image</code> set to an <code>&lt;image-list&gt;</code> containing three images</li>
   1159 								<li><code>background-blend-mode</code> set to two different <code>blendmode</code> values</li>
   1160 							</ul></td>
   1161 						<td>The unspecified blend modes should be obtained by repeating the blend mode list from the beginning</td>
   1162 					</tr>
   1163 				</table>
   1164 			</section>
   1165 			<section>
   1166 				<h4>The default <code>background-blend-mode</code> value for the <code>background</code> shorthand is 'normal' </h4>
   1167 				<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#background-blend-mode">spec</a>: <q>If the ‘background’ [CSS3BG] shorthand is used, the ‘background-blend-mode’ property for that element must be reset to its initial value.</q>
   1168 				</p>
   1169 				<table>
   1170 					<tr>
   1171 						<th>Test name</th>
   1172 						<th>Elements and styles</th>
   1173 						<th>Expected result</th>
   1174 					</tr>
   1175 					<tr>
   1176 						<td>Default blend mode for 'background' shorthand</td>
   1177 						<td>Element with
   1178 							<ul>
   1179 								<li><code>background</code> property set to an image and a color</li>
   1180 								<li>No value explicitly set for <code>background-blend-mode</code> </li>
   1181 							</ul></td>
   1182 						<td> The computed value of <code>background-blend-mode</code> is 'normal'
   1183 						</td>
   1184 					</tr>
   1185 				</table>
   1186 			</section>
   1187 			<section>
   1188 				<h4><code>background-blend-mode</code> for an element with <code>background-position</code></h4>
   1189 				<table>
   1190 					<tr>
   1191 						<th>Test name</th>
   1192 						<th>Elements and styles</th>
   1193 						<th>Expected result</th>
   1194 					</tr>
   1195 					<tr>
   1196 						<td><code>background-position</code> percentage</td>
   1197 						<td>Element with
   1198 							<ul>
   1199 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1200 								<li><code>background-color</code> set to a fully opaque color</li>
   1201 								<li><code>background-position</code> specified in percentage, such as 50% 50%</li>
   1202 								<li><code>background-blend-mode</code> other than normal</li>
   1203 							</ul>
   1204 						</td>
   1205 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1206 						The <code>background-image</code> is correctly positioned
   1207 						</td>
   1208 					</tr>
   1209 				</table>
   1210 			</section>
   1211 			<section>
   1212 				<h4><code>background-blend-mode</code> for an element with <code>background-size</code></h4>
   1213 				<table>
   1214 					<tr>
   1215 						<th>Test name</th>
   1216 						<th>Elements and styles</th>
   1217 						<th>Expected result</th>
   1218 					</tr>
   1219 					<tr>
   1220 						<td>Background size defined in pixels</td>
   1221 						<td>Element with
   1222 							<ul>
   1223 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1224 								<li><code>background-color</code> set to a fully opaque color</li>
   1225 								<li><code>background-size</code> specified in pixels</li>
   1226 								<li><code>background-blend-mode</code> other than normal</li>
   1227 							</ul>
   1228 						</td>
   1229 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1230 						The <code>background-image</code> has the correct size
   1231 						</td>
   1232 					</tr>
   1233 					<tr>
   1234 						<td>Background size defined in percentage (second phase)</td>
   1235 						<td>Element with
   1236 							<ul>
   1237 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1238 								<li><code>background-color</code> set to a fully opaque color</li>
   1239 								<li><code>background-size</code> specified in percentage</li>
   1240 								<li><code>background-blend-mode</code> other than normal</li>
   1241 							</ul>
   1242 						</td>
   1243 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1244 						The <code>background-image</code> has the correct size
   1245 						</td>
   1246 					</tr>
   1247 					<tr>
   1248 						<td>Background size cover</td>
   1249 						<td>Element with
   1250 							<ul>
   1251 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1252 								<li><code>background-color</code> set to a fully opaque color</li>
   1253 								<li><code>background-size</code> set to <code>cover</code></li>
   1254 								<li><code>background-blend-mode</code> other than normal</li>
   1255 							</ul>
   1256 						</td>
   1257 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1258 						The <code>background-image</code> has the correct size
   1259 						</td>
   1260 					</tr>
   1261 					<tr>
   1262 						<td>Background size contain</td>
   1263 						<td>Element with
   1264 							<ul>
   1265 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1266 								<li><code>background-color</code> set to a fully opaque color</li>
   1267 								<li><code>background-size</code> set to <code>contain</code></li>
   1268 								<li><code>background-blend-mode</code> other than normal</li>
   1269 							</ul>
   1270 						</td>
   1271 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1272 						The <code>background-image</code> has the correct size
   1273 						</td>
   1274 					</tr>
   1275 				</table>
   1276 			</section>
   1277 			<section>
   1278 				<h4><code>background-blend-mode</code> for an element with <code>background-repeat</code></h4>
   1279 				<table>
   1280 					<tr>
   1281 						<th>Test name</th>
   1282 						<th>Elements and styles</th>
   1283 						<th>Expected result</th>
   1284 					</tr>
   1285 					<tr>
   1286 						<td><code>background-repeat</code> set to no-repeat</td>
   1287 						<td>Element with
   1288 							<ul>
   1289 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1290 								<li><code>background-color</code> set to a fully opaque color</li>
   1291 								<li><code>background-repeat</code> set to <code>no-repeat</code></li>
   1292 								<li><code>background-blend-mode</code> other than normal</li>
   1293 							</ul>
   1294 						</td>
   1295 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1296 						The <code>background-image</code> is not repeated
   1297 						</td>
   1298 					</tr>
   1299 					<tr>
   1300 						<td><code>background-repeat</code> set to space</td>
   1301 						<td>Element with
   1302 							<ul>
   1303 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1304 								<li><code>background-color</code> set to a fully opaque color</li>
   1305 								<li><code>background-repeat</code> set to <code>space</code></li>
   1306 								<li><code>background-blend-mode</code> other than normal</li>
   1307 							</ul>
   1308 						</td>
   1309 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1310 						</td>
   1311 					</tr>
   1312 					<tr>
   1313 						<td><code>background-repeat</code> set to round</td>
   1314 						<td>Element with
   1315 							<ul>
   1316 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1317 								<li><code>background-color</code> set to a fully opaque color</li>
   1318 								<li><code>background-repeat</code> set to <code>round</code></li>
   1319 								<li><code>background-blend-mode</code> other than normal</li>
   1320 							</ul>
   1321 						</td>
   1322 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1323 						</td>
   1324 					</tr>
   1325 				</table>
   1326 			</section>
   1327 			<section>
   1328 				<h4><code>background-blend-mode</code> for an element with <code>background-clip</code></h4>
   1329 				<table>
   1330 					<tr>
   1331 						<th>Test name</th>
   1332 						<th>Elements and styles</th>
   1333 						<th>Expected result</th>
   1334 					</tr>
   1335 					<tr>
   1336 						<td><code>background-clip</code> set to <code>padding-box</code></td>
   1337 						<td>Element with
   1338 							<ul>
   1339 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1340 								<li><code>background-color</code> set to a fully opaque color</li>
   1341 								<li><code>background-clip</code> set to <code>padding-box</code></li>
   1342 								<li><code>background-blend-mode</code> other than normal</li>
   1343 							</ul>
   1344 						</td>
   1345 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1346 						No background is drawn below the border (background extends to the outside edge of the padding)
   1347 						</td>
   1348 					</tr>
   1349 					<tr>
   1350 						<td><code>background-clip</code> set to <code>content-box</code></td>
   1351 						<td>Element with
   1352 							<ul>
   1353 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1354 								<li><code>background-color</code> set to a fully opaque color</li>
   1355 								<li><code>background-clip</code> set to <code>content-box</code></li>
   1356 								<li><code>background-blend-mode</code> other than normal</li>
   1357 							</ul>
   1358 						</td>
   1359 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1360 						The background is painted within (clipped to) the content box
   1361 						</td>
   1362 					</tr>
   1363 				</table>
   1364 			</section>
   1365 			<section>
   1366 				<h4><code>background-blend-mode</code> for an element with <code>background-origin</code></h4>
   1367 				<table>
   1368 					<tr>
   1369 						<th>Test name</th>
   1370 						<th>Elements and styles</th>
   1371 						<th>Expected result</th>
   1372 					</tr>
   1373 					<tr>
   1374 						<td><code>background-origin</code> set to <code>border-box</code></td>
   1375 						<td>Element with
   1376 							<ul>
   1377 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1378 								<li><code>background-color</code> set to a fully opaque color</li>
   1379 								<li><code>background-origin</code> set to <code>border-box</code></li>
   1380 								<li><code>background-blend-mode</code> other than normal</li>
   1381 							</ul>
   1382 						</td>
   1383 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1384 						The background extends to the outside edge of the border (but underneath the border in z-ordering)
   1385 						</td>
   1386 					</tr>
   1387 					<tr>
   1388 						<td><code>background-origin</code> set to <code>content-box</code></td>
   1389 						<td>Element with
   1390 							<ul>
   1391 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1392 								<li><code>background-color</code> set to a fully opaque color</li>
   1393 								<li><code>background-origin</code> set to <code>content-box</code></li>
   1394 								<li><code>background-blend-mode</code> other than normal</li>
   1395 							</ul>
   1396 						</td>
   1397 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1398 						The background is painted within (clipped to) the content box
   1399 						</td>
   1400 					</tr>
   1401 				</table>
   1402 			</section>
   1403 			<section>
   1404 				<h4><code>background-blend-mode</code> for an element with <code>background-attachement</code></h4>
   1405 				<table>
   1406 					<tr>
   1407 						<th>Test name</th>
   1408 						<th>Elements and styles</th>
   1409 						<th>Expected result</th>
   1410 					</tr>
   1411 					<tr>
   1412 						<td><code>background-attachment</code> set to <code>fixed</code></td>
   1413 						<td>Element with
   1414 							<ul>
   1415 								<li><code>background-image</code> set to an <code>&lt;image&gt;</code></li>
   1416 								<li><code>background-color</code> set to a fully opaque color</li>
   1417 								<li><code>background-attachment</code> set to <code>fixed</code></li>
   1418 								<li><code>background-blend-mode</code> other than normal</li>
   1419 							</ul>
   1420 						</td>
   1421 						<td>The content of the <code>background-image</code> is mixed with the color of the <code>background-color</code> <br>
   1422 						The background image will not scroll with its containing element, instead remaining stationary within the viewport
   1423 						</td>
   1424 					</tr>
   1425 					<tr>
   1426 						<td>2 background images with <code>background-attachment</code> set to <code>fixed, scroll</code></td>
   1427 						<td>Element with
   1428 							<ul>
   1429 								<li><code>background-image</code> set to 2 <code>&lt;image&gt;</code>(s)</li>
   1430 								<li><code>background-attachment</code> set to <code>fixed, scroll</code></li>
   1431 								<li><code>background-blend-mode</code> other than normal</li>
   1432 							</ul>
   1433 						</td>
   1434 						<td>The background images will be mixed when they overlap while scrolling
   1435 						</td>
   1436 					</tr>
   1437 				</table>
   1438 			</section>
   1439 	</section>
   1440 		<section>
   1441 			<h3>Test cases for <code>isolation</code></h3>
   1442 			<section>
   1443 				<h4>An element with <code>isolation:isolate</code> creates a stacking context</h4>
   1444 				<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#csscompositingrules_CSS">spec</a>: <q>For CSS, setting ‘isolation’ to ‘isolate’ will turn the element into a stacking context [CSS21].</q></p>
   1445 				<table>
   1446 					<tr>
   1447 						<th>Test name</th>
   1448 						<th>Elements and styles</th>
   1449 						<th>Expected result</th>
   1450 					</tr>
   1451 					<tr>
   1452 						<td>Isolation isolate</td>
   1453 						<td>Have an element with <code>isolation</code> set to <code>isolate</code></td>
   1454 						<td>The element creates a stacking context.</td>
   1455 					</tr>
   1456 				</table>
   1457 			</section>
   1458 			<section>
   1459 				<h4>An element with <code>isolation:isolate</code> creates an isolated group for blended children</h4>
   1460 				<table>
   1461 					<tr>
   1462 						<th>Test name</th>
   1463 						<th>Elements and styles</th>
   1464 						<th>Expected result</th>
   1465 					</tr>
   1466 					<tr>
   1467 						<td>Isolation of blended child which overflows</td>
   1468 						<td>3 elements required:
   1469 							<a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>,
   1470 							<a href="#test_outline" title="child of the element [P]">[IN-P]</a> and
   1471 							<a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
   1472 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>) <br>
   1473 							[IN-P] - Intermediate child element between the parent [P] and the child [B]<br>
   1474 							This element has <code>isolation:isolate</code> set.<br>
   1475 							[B] - element with <code>mix-blend-mode</code> other than <code>normal</code> <br>
   1476 							The blending element [B] has content that lies outside the parent element. <br>
   1477 						</td>
   1478 						<td>
   1479 							The color of the child element [B] mixes with the color of the intermediate element [IN-P], where they overlap.<br>
   1480 							The area of the child element outside of the intermediate parent element does not mix with the color of the parent element [P], or of the <code>body</code>.
   1481 						</td>
   1482 					</tr>
   1483 					<tr>
   1484 						<td>Isolation on intermediate element with transparent pixels</td>
   1485 						<td>3 elements required:
   1486 							<a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>,
   1487 							<a href="#test_outline" title="child of the element [P]">[IN-P]</a> and
   1488 							<a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
   1489 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>); the element <code>background-color</code> is other than <code>transparent</code><br>
   1490 							[IN-P] - Intermediate child element between the parent [P] and the child [B]<br>
   1491 							The intermediate element has text content, default value for <code>background-color</code> and <code>isolation:isolate</code> set<br>
   1492 							[B] - element with <code>mix-blend-mode</code> other than <code>normal</d <br>
   1493 						<td>
   1494 							The color of the child element [B] mixes with the color of the intermediate element [IN-P], where they overlap.<br>
   1495 							There is no blending between the color of the parent element [P] and the color of the blended element [B].
   1496 						</td>
   1497 					</tr>
   1498 					<tr>
   1499 						<td>Isolate inside a stacking context created by a 3d transform</td>
   1500 						<td>
   1501 							3 elements required:
   1502 							<a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a>,
   1503 							<a href="#test_outline" title="child of the element [P]">[IN-P]</a> and
   1504 							<a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
   1505 							[P] - parent element with a <code>3D transform</code> applied<br>
   1506 							[IN-P] - Intermediate child element between the parent [P] and the child [B]<br>
   1507 							The intermediate element has <code>isolation:isolate</code> set<br>
   1508 							[B] - element with <code>mix-blend-mode</code> other than <code>normal</code><br>
   1509 						</td>
   1510 						<td>
   1511 							The color of the child element [B] mixes with the color of the intermediate element [IN-P], where they overlap.<br>
   1512 							There is no blending between the color of the parent element [P] and the color of the blended element [B].
   1513 						 </td>
   1514 					</tr>
   1515 				</table>
   1516 			</section>
   1517 			<section>
   1518 				<h4>An element with <code>isolation:auto</code> set does not change the elements existing stacking context behavior</h4>
   1519 				<table>
   1520 					<tr>
   1521 						<th>Test name</th>
   1522 						<th>Elements and styles</th>
   1523 						<th>Expected result</th>
   1524 					</tr>
   1525 					<tr>
   1526 						<td>Isolation auto</td>
   1527 						<td>Have an element with <code>isolation</code> explicitly set to <code>auto</code>, and no other style that would create a stacking context</td>
   1528 						<td>The element does not create a stacking context - the computed value of its <code>z-index</code> is value <code>auto</code></td>
   1529 					</tr>
   1530 					<tr>
   1531 						<td>Stacking context not affected by isolation</td>
   1532 						<td>2 elements required:
   1533 							<a href="#test_outline" title="parent element with a property that creates stacking context">[P]</a> and
   1534 							<a href="#test_outline" title="Element with mix-blend-mode property other than normal">[B]</a> <br>
   1535 							[P] - parent element with a property that creates a stacking context (e.g. <code>position:fixed</code>); This element has <code>isolation</code> explicitly set to <code>auto</code> <br>
   1536 							[B] - element with <code>mix-blend-mode</code> other than <code>normal</code> <br>
   1537 							The blending element [B] has content that lies outside the parent element. <br>
   1538 							Set the <code>background-color</code> of the <code>body</code> to a value other than default
   1539 						</td>
   1540 						<td>The color of the parent element mixes with the color of the child element. <br>
   1541 							The area of the child element outside of the parent element doesn't mix with the color of the <code>body</code>.<br>
   1542 							In other words, setting the <code>isolation</code> to <code>auto</code> does not affect the creation of a stacking context by other properties.
   1543 						</td>
   1544 					</tr>
   1545 				</table>
   1546 			</section>
   1547 		</section>
   1548 		<section>
   1549 			<h4>Test cases for <code>isolation</code> in SVG</h4>
   1550 			<section>
   1551 				<h4>In SVG, an element with <code>isolation:isolate</code> creates an isolated group for blended children</h4>
   1552 				<p>Refers to the following assertion in the <a href="https://drafts.fxtf.org/compositing-1/#isolation">spec</a>: <q>In SVG, this defines whether an element is isolated or not.</q></p>
   1553 				<table>
   1554 					<tr>
   1555 						<th>Test name</th>
   1556 						<th>Elements and styles</th>
   1557 						<th>Expected result</th>
   1558 					</tr>
   1559 					<tr>
   1560 						<td>Blending in an isolated group</td>
   1561 						<td>Set a background color for the SVG.<br>
   1562 							Create a <code>group</code> element containing a <code>rect</code> element filled with a different solid color.<br>
   1563 							Apply <code>isolation:isolate</code> on the group and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
   1564 						<td>The <code>rect</code> will not mix with the content behind it.</td>
   1565 					</tr>
   1566 					<tr>
   1567 						<td>Blending two elements in an isolated group</td>
   1568 						<td>Set a background color for the SVG.<br>
   1569 							Create a <code>group</code> element containing two overlapping <code>rect</code> elements, each filled with a different solid color.<br>
   1570 							Apply <code>isolation:isolate</code> on the group and a <code>mix-blend-mode</code> other than <code>normal</code> on the second rect.</td>
   1571 						<td>Only the intersection of the <code>rect</code> elements should mix.</td>
   1572 					</tr>
   1573 					<tr>
   1574 						<td>Blending in an isolated group with 2D transform</td>
   1575 						<td>Set a background color for the SVG.<br>
   1576 							Create a <code>group</code> element containing a <code>rect</code> element filled with a different solid color.<br>
   1577 							Apply <code>isolation:isolate</code> and 2D transform on the group and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
   1578 						<td>The <code>rect</code> will not mix with the content behind it.</td>
   1579 					</tr>
   1580 					<tr>
   1581 						<td>Set isolation on an element from JavaScript</td>
   1582 						<td>Set a background color for the SVG.
   1583 							<br>Create a <code>rect</code> element and fill it with a solid color and a <code>mix-blend-mode</code> other than <code>normal</code>.
   1584 							<br>Apply <code>isolation:isolate</code> on it from JavaScript.</td>
   1585 						<td>The <code>rect</code> will not mix with the content behind it.</td>
   1586 					</tr>
   1587 				</table>
   1588 			</section>
   1589 			<section>
   1590 				<h4>In SVG, an element with <code>isolation:auto</code> set does not change the rendering behaviour</h4>
   1591 				<table>
   1592 					<tr>
   1593 						<th>Test name</th>
   1594 						<th>Elements and styles</th>
   1595 						<th>Expected result</th>
   1596 					</tr>
   1597 					<tr>
   1598 						<td>Blending a group with <code>isolation:auto</code></td>
   1599 						<td>Set a background color for the SVG.<br>
   1600 							Create a <code>group</code> element containing a <code>rect</code> element filled with a different solid color.<br>
   1601 							Apply <code>isolation:auto</code> on the group and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
   1602 						<td>The element will mix with the content behind it.</td>
   1603 					</tr>
   1604 					<tr>
   1605 						<td>Blending in a group with opacity</td>
   1606 						<td>Set a background color for the SVG.<br>
   1607 							Create a <code>group</code> element containing a <code>rect</code> element filled with a different solid color.<br>
   1608 							Apply <code>opacity</code> less than 1 and <code>isolation:auto</code> on the group and a <code>mix-blend-mode</code> other than <code>normal</code> on the <code>rect</code>.</td>
   1609 						<td>The <code>rect</code> will not mix with the content behind it.</td>
   1610 					</tr>
   1611 				</table>
   1612 			</section>
   1613 		</section>
   1614 </body>
   1615 </html>