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 width: 10px; | 6 width: 10px; |
7 height: 10px; | 7 height: 10px; |
8 background: green; | 8 background: green; |
9 isolation:isolate; | 9 isolation:isolate; |
10 } | 10 } |
11 </style> | 11 </style> |
12 <!-- Isolation should create a stacking context. Test if "isolation:isolate" set
s the zIndex to 0, instead of the default "auto" value. --> | 12 <!-- Isolation should create a stacking context. Test if "isolation:isolate" set
s the zIndex to 0, instead of the default "auto" value. --> |
13 <body> | 13 <body> |
14 <div id="isolator"></div> | 14 <div id="isolator"></div> |
15 <div id="isolator_accelerated" style="-webkit-transform: translateZ(0)"></di
v> | 15 <div id="isolator_accelerated" style="transform: translateZ(0)"></div> |
16 | 16 |
17 <script src="../../resources/js-test.js"></script> | 17 <script src="../../resources/js-test.js"></script> |
18 <script> | 18 <script> |
19 // Software path. | 19 // Software path. |
20 var zIndex = getComputedStyle(document.getElementById("isolator")).zInde
x; | 20 var zIndex = getComputedStyle(document.getElementById("isolator")).zInde
x; |
21 shouldBeZero(zIndex); | 21 shouldBeZero(zIndex); |
22 | 22 |
23 // Hardware path. | 23 // Hardware path. |
24 zIndex = getComputedStyle(document.getElementById("isolator_accelerated"
)).zIndex; | 24 zIndex = getComputedStyle(document.getElementById("isolator_accelerated"
)).zIndex; |
25 shouldBeZero(zIndex); | 25 shouldBeZero(zIndex); |
26 </script> | 26 </script> |
27 </body> | 27 </body> |
28 </html> | 28 </html> |
OLD | NEW |