| OLD | NEW |
| 1 function runAfterDisplay(callback) { | 1 function runAfterDisplay(callback) { |
| 2 window.requestAnimationFrame(function() { | 2 window.requestAnimationFrame(function() { |
| 3 // At this point, only the animate has happened, but no compositing | 3 // At this point, only the animate has happened, but no compositing |
| 4 // or layout. Use a timeout for the callback so that notifyDone | 4 // or layout. Use a timeout for the callback so that notifyDone |
| 5 // can be called inside of it. | 5 // can be called inside of it. |
| 6 window.setTimeout(callback, 0); | 6 // FIXME: we need a better way of waiting for chromium events to happen |
| 7 window.setTimeout(callback, 1); |
| 7 }); | 8 }); |
| 8 } | 9 } |
| OLD | NEW |