| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <html> | 3 <html> |
| 4 <head> | 4 <head> |
| 5 <style> | 5 <style> |
| 6 .container { | 6 .container { |
| 7 width: 200px; | 7 width: 200px; |
| 8 height: 200px; | 8 height: 200px; |
| 9 overflow: scroll; | 9 overflow: scroll; |
| 10 margin: 20px; | 10 margin: 20px; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 var predecessor = document.getElementById('predecessor'); | 58 var predecessor = document.getElementById('predecessor'); |
| 59 var ancestor = document.getElementById('ancestor'); | 59 var ancestor = document.getElementById('ancestor'); |
| 60 var container = document.getElementById('container'); | 60 var container = document.getElementById('container'); |
| 61 var firstChild = document.getElementById('firstChild'); | 61 var firstChild = document.getElementById('firstChild'); |
| 62 var secondChild = document.getElementById('secondChild'); | 62 var secondChild = document.getElementById('secondChild'); |
| 63 | 63 |
| 64 // Force a synchronous style recalc and layout. | 64 // Force a synchronous style recalc and layout. |
| 65 document.body.offsetTop; | 65 document.body.offsetTop; |
| 66 | 66 |
| 67 if (window.internals) { | 67 if (window.internals) { |
| 68 window.internals.forceCompositingUpdate(document); | |
| 69 | |
| 70 if (didOptIn(container)) | 68 if (didOptIn(container)) |
| 71 write('Passed - correctly opted into composited scrolling with a posit
ioned ancestor.') | 69 write('Passed - correctly opted into composited scrolling with a posit
ioned ancestor.') |
| 72 else | 70 else |
| 73 write('FAILED - did not opt into composited scrolling with a positione
d ancestor when it would safe.') | 71 write('FAILED - did not opt into composited scrolling with a positione
d ancestor when it would safe.') |
| 74 } | 72 } |
| 75 } // function doTest | 73 } // function doTest |
| 76 | 74 |
| 77 window.addEventListener('load', doTest, false); | 75 window.addEventListener('load', doTest, false); |
| 78 </script> | 76 </script> |
| 79 </head> | 77 </head> |
| 80 | 78 |
| 81 <body> | 79 <body> |
| 82 <div class="positioned" id="predecessor"></div> | 80 <div class="positioned" id="predecessor"></div> |
| 83 <div class="positioned" id="ancestor"> | 81 <div class="positioned" id="ancestor"> |
| 84 <div class="container" id="container"> | 82 <div class="container" id="container"> |
| 85 <div class="scrolled" id="firstChild"></div> | 83 <div class="scrolled" id="firstChild"></div> |
| 86 <div class="scrolled" id="secondChild"></div> | 84 <div class="scrolled" id="secondChild"></div> |
| 87 </div> | 85 </div> |
| 88 </div> | 86 </div> |
| 89 <pre id="console"></pre> | 87 <pre id="console"></pre> |
| 90 </body> | 88 </body> |
| 91 </html> | 89 </html> |
| OLD | NEW |