| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 .container { | 5 .container { |
| 6 position: absolute; | 6 position: absolute; |
| 7 height: 200px; | 7 height: 200px; |
| 8 width:200px; | 8 width:200px; |
| 9 background-color: gray; | 9 background-color: gray; |
| 10 } | 10 } |
| 11 | 11 |
| 12 .nopreserve { | 12 .nopreserve { |
| 13 top: 0; | 13 top: 0; |
| 14 left: 0; | 14 left: 0; |
| 15 } | 15 } |
| 16 | 16 |
| 17 .preserve { | 17 .preserve { |
| 18 top: 250px; | 18 top: 250px; |
| 19 left: 0; | 19 left: 0; |
| 20 -webkit-transform-style: preserve-3d; | |
| 21 -moz-transform-style: preserve-3d; | |
| 22 transform-style: preserve-3d; | 20 transform-style: preserve-3d; |
| 23 } | 21 } |
| 24 | 22 |
| 25 .box { | 23 .box { |
| 26 width: 100%; | 24 width: 100%; |
| 27 position: absolute; | 25 position: absolute; |
| 28 height: 100%; | 26 height: 100%; |
| 29 top: 0; | 27 top: 0; |
| 30 } | 28 } |
| 31 | 29 |
| 32 .red { | 30 .red { |
| 33 background-color: red; | 31 background-color: red; |
| 34 -webkit-transform: perspective( 600px ) rotateY( 45deg ); | |
| 35 -moz-transform: perspective( 600px ) rotateY( 45deg ); | |
| 36 transform: perspective( 600px ) rotateY( 45deg ); | 32 transform: perspective( 600px ) rotateY( 45deg ); |
| 37 } | 33 } |
| 38 | 34 |
| 39 .blue { | 35 .blue { |
| 40 background-color: blue; | 36 background-color: blue; |
| 41 -webkit-transform: perspective( 600px ) rotateY( -45deg ); | |
| 42 -moz-transform: perspective( 600px ) rotateY( -45deg ); | |
| 43 transform: perspective( 600px ) rotateY( -45deg ); | 37 transform: perspective( 600px ) rotateY( -45deg ); |
| 44 } | 38 } |
| 45 | 39 |
| 46 /* target1 contain points with negative z-offsets */ | 40 /* target1 contain points with negative z-offsets */ |
| 47 #target { | 41 #target { |
| 48 position: relative; | 42 position: relative; |
| 49 height: 160px; | 43 height: 160px; |
| 50 width: 160px; | 44 width: 160px; |
| 51 margin: 20px; | 45 margin: 20px; |
| 52 background-color: #DDD; | 46 background-color: #DDD; |
| 53 -webkit-transform: rotate3d(0, 1, 0, -45deg); | |
| 54 -webkit-transform-origin: right; | |
| 55 -moz-transform: rotate3d(0, 1, 0, -45deg); | |
| 56 -moz-transform-origin: right; | |
| 57 transform: rotate3d(0, 1, 0, -45deg); | 47 transform: rotate3d(0, 1, 0, -45deg); |
| 58 transform-origin: right; | 48 transform-origin: right; |
| 59 } | 49 } |
| 60 | 50 |
| 61 #description { | 51 #description { |
| 62 margin-top: 460px; | 52 margin-top: 460px; |
| 63 } | 53 } |
| 64 </style> | 54 </style> |
| 65 <script src="resources/hit-test-utils.js"></script> | 55 <script src="resources/hit-test-utils.js"></script> |
| 66 <script> | 56 <script> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 <div id="target4" class="box red"> | 91 <div id="target4" class="box red"> |
| 102 </div> | 92 </div> |
| 103 </div> | 93 </div> |
| 104 | 94 |
| 105 <p id="description">Checks that hit testing is correct when two layers with ne
gative z-offset overlap</p> | 95 <p id="description">Checks that hit testing is correct when two layers with ne
gative z-offset overlap</p> |
| 106 | 96 |
| 107 <div id="results"></div> | 97 <div id="results"></div> |
| 108 | 98 |
| 109 </body> | 99 </body> |
| 110 </html> | 100 </html> |
| OLD | NEW |