OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 div { | 5 div { |
6 margin: 20px; | 6 margin: 20px; |
7 width: 60px; | 7 width: 60px; |
8 height: 60px; | 8 height: 60px; |
9 float: left; | 9 float: left; |
10 } | 10 } |
11 </style> | 11 </style> |
12 <script src="resources/text-based-repaint.js" type="text/javascript"></script> | 12 <script src="resources/text-based-repaint.js" type="text/javascript"></script> |
13 <!-- Repaint test to ensure that setting a blend mode dynamically triggers this
operation | 13 <!-- Repaint test to ensure that setting a blend mode dynamically triggers this
operation |
14 only with the contents of the nearest ancestor stacking context. --> | 14 only with the contents of the nearest ancestor stacking context. --> |
15 <body onload="runRepaintTest()"> | 15 <body onload="runRepaintAndPixelTest()"> |
16 <div style="background: green; position: relative; z-index: -1;"> | 16 <div style="background: green; position: relative; z-index: -1;"> |
17 <div id="first" style="mix-blend-mode: normal; background-color: blue;">
</div> | 17 <div id="first" style="mix-blend-mode: normal; background-color: blue;">
</div> |
18 </div> | 18 </div> |
19 <div style="background: green; position: relative; z-index: -1;"> | 19 <div style="background: green; position: relative; z-index: -1;"> |
20 <div id="second" style="mix-blend-mode: hue; background-color: blue;"></
div> | 20 <div id="second" style="mix-blend-mode: hue; background-color: blue;"></
div> |
21 </div> | 21 </div> |
22 <div style="background: green; position: relative; z-index: -1;"> | 22 <div style="background: green; position: relative; z-index: -1;"> |
23 <div id="third" style="mix-blend-mode: hue; background-color: blue;"></d
iv> | 23 <div id="third" style="mix-blend-mode: hue; background-color: blue;"></d
iv> |
24 </div> | 24 </div> |
25 <div id="fourth" style="background: green;"> | 25 <div id="fourth" style="background: green;"> |
26 <div style="mix-blend-mode: hue; background-color: blue;"></div> | 26 <div style="mix-blend-mode: hue; background-color: blue;"></div> |
27 </div> | 27 </div> |
28 | 28 |
29 <script> | 29 <script> |
30 function repaintTest() { | 30 function repaintTest() { |
31 document.getElementById('first').style.mixBlendMode = "multiply"; | 31 document.getElementById('first').style.mixBlendMode = "multiply"; |
32 document.getElementById('second').style.mixBlendMode = "normal"; | 32 document.getElementById('second').style.mixBlendMode = "normal"; |
33 document.getElementById('third').style.mixBlendMode = "multiply"; | 33 document.getElementById('third').style.mixBlendMode = "multiply"; |
34 document.getElementById('fourth').style.position = "relative"; | 34 document.getElementById('fourth').style.position = "relative"; |
35 document.getElementById('fourth').style.zIndex = -1; | 35 document.getElementById('fourth').style.zIndex = -1; |
36 } | 36 } |
37 </script> | 37 </script> |
38 </body> | 38 </body> |
OLD | NEW |