| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | |
| 3 <head> | |
| 4 <style> | 2 <style> |
| 5 div { | 3 div { |
| 6 border: black solid 1px; | 4 border: black solid 1px; |
| 7 } | 5 } |
| 8 | 6 |
| 9 .composited { | 7 .composited { |
| 10 transform: translateZ(0); | 8 transform: translateZ(0); |
| 11 } | 9 } |
| 12 | 10 |
| 13 .fixed { | 11 .fixed { |
| 14 position: fixed; | 12 position: fixed; |
| 15 background-color: red; | 13 background-color: red; |
| 16 width: 500px; | 14 width: 500px; |
| 17 height: 500px; | 15 height: 500px; |
| 18 } | 16 } |
| 19 | 17 |
| 20 .container { | 18 .container { |
| 21 overflow: scroll; | 19 overflow: scroll; |
| 22 height: 200px; | 20 height: 200px; |
| 23 background-color: gray; | 21 background-color: gray; |
| 24 } | 22 } |
| 25 | 23 |
| 26 .filler { | 24 .filler { |
| 27 height: 800px; | 25 height: 800px; |
| 28 width: 800px; | 26 width: 800px; |
| 29 background-color: orange; | 27 background-color: orange; |
| 30 } | 28 } |
| 31 | 29 |
| 30 .squash-spacer { |
| 31 position: relative; |
| 32 top: 40px; |
| 33 } |
| 34 |
| 32 .target { | 35 .target { |
| 33 position: relative; | 36 position: relative; |
| 34 top: 80px; | 37 top: 80px; |
| 38 height: 10px; width: 100%; |
| 35 } | 39 } |
| 36 </style> | 40 </style> |
| 37 | 41 |
| 38 <script> | 42 <script> |
| 39 if (window.testRunner) { | 43 if (window.testRunner) { |
| 40 testRunner.dumpAsText(); | 44 testRunner.dumpAsTextWithPixelResults(); |
| 41 testRunner.waitUntilDone(); | 45 testRunner.waitUntilDone(); |
| 42 } | 46 } |
| 43 | 47 |
| 44 if (window.internals) { | 48 if (window.internals) { |
| 45 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); | 49 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); |
| 46 window.internals.settings.setLayerSquashingEnabled(true); | 50 window.internals.settings.setLayerSquashingEnabled(true); |
| 47 } | 51 } |
| 48 | 52 |
| 49 function runTest() { | 53 function runTest() { |
| 50 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); | 54 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); |
| 51 x = (clientRect.left + clientRect.right) / 2; | 55 x = (clientRect.left + clientRect.right) / 2; |
| 52 y = (clientRect.top + clientRect.bottom) / 2; | 56 y = (clientRect.top + clientRect.bottom) / 2; |
| 53 | 57 |
| 54 if (window.eventSender) { | 58 if (window.eventSender) { |
| 55 eventSender.gestureShowPress(x, y); | 59 eventSender.gestureShowPress(x, y); |
| 56 window.testRunner.notifyDone(); | 60 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); |
| 57 } | 61 } |
| 58 } | 62 } |
| 59 | 63 |
| 60 window.onload = runTest; | 64 window.onload = runTest; |
| 61 </script> | 65 </script> |
| 62 </head> | 66 <div class='fixed composited'></div> |
| 63 <body> | 67 <div class='container'> |
| 64 <div class='fixed composited'></div> | 68 <div class='composited'></div> |
| 65 <div class='container'> | 69 <div class='squash-spacer'></div> |
| 66 <div class='composited'></div> | 70 <div class='target'> |
| 67 <div class='target'> | 71 <a href='#' id='targetLink'>Target Link.</a> |
| 68 <a href='#' id='targetLink'>Target Link.</a> | |
| 69 </div> | |
| 70 <div class='filler'></div> | |
| 71 </div> | 72 </div> |
| 72 | 73 <div class='filler'></div> |
| 73 This test is successful if it doesn't crash. | 74 </div> |
| 74 </body> | |
| 75 </html> | |
| OLD | NEW |