Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(788)

Unified Diff: Source/devtools/front_end/UIUtils.js

Issue 207553010: DevTools: speed up network scrolling and layout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698