Index: Source/devtools/front_end/UIUtils.js |
diff --git a/Source/devtools/front_end/UIUtils.js b/Source/devtools/front_end/UIUtils.js |
index 4d4fa9a23e9f4d56ecd275e07467b014c2b5839e..e8d7b02fc2da2d18c8244e2a9c8d710ff7e3a7ea 100644 |
--- a/Source/devtools/front_end/UIUtils.js |
+++ b/Source/devtools/front_end/UIUtils.js |
@@ -790,13 +790,17 @@ WebInspector.endBatchUpdate = function() |
var handlers = WebInspector._postUpdateHandlers; |
delete WebInspector._postUpdateHandlers; |
- var keys = handlers.keys(); |
- for (var i = 0; i < keys.length; ++i) { |
- var object = keys[i]; |
- var methods = handlers.get(object).keys(); |
- for (var j = 0; j < methods.length; ++j) |
- methods[j].call(object); |
- } |
+ window.requestAnimationFrame(function() { |
+ if (WebInspector._coalescingLevel) |
+ return; |
+ var keys = handlers.keys(); |
+ for (var i = 0; i < keys.length; ++i) { |
+ var object = keys[i]; |
+ var methods = handlers.get(object).keys(); |
+ for (var j = 0; j < methods.length; ++j) |
+ methods[j].call(object); |
+ } |
+ }); |
} |
/** |
@@ -806,10 +810,13 @@ WebInspector.endBatchUpdate = function() |
WebInspector.invokeOnceAfterBatchUpdate = function(object, method) |
{ |
if (!WebInspector._coalescingLevel) { |
- method.call(object); |
+ window.requestAnimationFrame(function() { |
+ if (!WebInspector._coalescingLevel) |
+ method.call(object); |
+ }); |
return; |
} |
- |
+ |
var methods = WebInspector._postUpdateHandlers.get(object); |
if (!methods) { |
methods = new Map(); |