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