blob: 75d3e279a4cd6916f769a68f2c7f246e8ad354dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// This is inspired in runAfterLayoutAndPaint() from
// third_party/blink/web_tests/resources/run-after-layout-and-paint.js.
function runAfterLayoutAndPaint(callback) {
// See http://crrev.com/c/1395193/10/third_party/blink/web_tests/http/tests/resources/run-after-layout-and-paint.js
// for more discussions.
requestAnimationFrame(function() {
requestAnimationFrame(function() {
callback();
});
});
}
|