| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 #searchbar { | 3 #searchbar { |
| 4 bottom: 0; /* Useful for seeing the issue visually. */ | 4 bottom: 0; /* Useful for seeing the issue visually. */ |
| 5 position: fixed; | 5 position: fixed; |
| 6 } | 6 } |
| 7 #recentlink { | 7 #recentlink { |
| 8 background: purple; | 8 background: purple; |
| 9 width: 150px; | 9 width: 150px; |
| 10 height: 150px; | 10 height: 150px; |
| 11 } | 11 } |
| 12 header { | 12 header { |
| 13 padding: 10px; | 13 padding: 10px; |
| 14 position: relative; | 14 position: relative; |
| 15 z-index: 50; | 15 z-index: 50; |
| 16 -webkit-backface-visibility: hidden; | 16 -webkit-backface-visibility: hidden; |
| 17 } | 17 } |
| 18 </style> | 18 </style> |
| 19 To manually test, just scroll down, there should be no purple trace. | 19 To manually test, just scroll down, there should be no purple trace. |
| 20 <header> | 20 <header> |
| 21 <div id="searchbar"> | 21 <div id="searchbar"> |
| 22 <div id="recentlink"></div> | 22 <div id="recentlink"></div> |
| 23 </div> | 23 </div> |
| 24 </header> | 24 </header> |
| 25 | 25 |
| 26 <!-- Used to have some overflowing content to scroll --> | 26 <!-- Used to have some overflowing content to scroll --> |
| 27 <div style="height: 5000px"></div> | 27 <div style="height: 5000px"></div> |
| 28 | 28 |
| 29 <script src="resources/text-based-repaint.js" type="text/javascript"></script> | 29 <script src="resources/repaint.js" type="text/javascript"></script> |
| 30 <script> | 30 <script> |
| 31 window.scrollTo(0, 1000); | 31 window.scrollTo(0, 1000); |
| 32 | 32 |
| 33 window.testIsAsync = true; | 33 window.testIsAsync = true; |
| 34 if (window.testRunner) | 34 if (window.testRunner) |
| 35 testRunner.waitUntilDone(); | 35 testRunner.waitUntilDone(); |
| 36 | 36 |
| 37 function repaintTest() | 37 function repaintTest() |
| 38 { | 38 { |
| 39 window.scrollBy(0, 400); | 39 window.scrollBy(0, 400); |
| 40 finishRepaintTest(); | 40 finishRepaintTest(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 // We need to skip 2 frames for the bug to show under DRT. | 43 // We need to skip 2 frames for the bug to show under DRT. |
| 44 window.requestAnimationFrame(function() { | 44 window.requestAnimationFrame(function() { |
| 45 window.requestAnimationFrame(function() { | 45 window.requestAnimationFrame(function() { |
| 46 runRepaintTest(); | 46 runRepaintTest(); |
| 47 }); | 47 }); |
| 48 }); | 48 }); |
| 49 </script> | 49 </script> |
| 50 | 50 |
| OLD | NEW |