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

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

Issue 201363002: DevTools: defer styles delta calculation to until the end of the task. (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/CSSStyleModel.js
diff --git a/Source/devtools/front_end/CSSStyleModel.js b/Source/devtools/front_end/CSSStyleModel.js
index 3d54bf465c4fafdb90d2f6f36fefc29dae0a33dc..8300f2d56369516856ea4dc3f64e51f827eaba65 100644
--- a/Source/devtools/front_end/CSSStyleModel.js
+++ b/Source/devtools/front_end/CSSStyleModel.js
@@ -345,7 +345,6 @@ WebInspector.CSSStyleModel.prototype = {
mediaQueryResultChanged: function()
{
- this._styleLoader.reset();
this.dispatchEventToListeners(WebInspector.CSSStyleModel.Events.MediaQueryResultChanged);
},
@@ -383,7 +382,6 @@ WebInspector.CSSStyleModel.prototype = {
*/
_fireStyleSheetChanged: function(styleSheetId)
{
- this._styleLoader.reset();
if (!this._pendingCommandsMajorState.length)
return;
@@ -413,7 +411,6 @@ WebInspector.CSSStyleModel.prototype = {
frameIdToStyleSheetIds[styleSheetHeader.frameId] = styleSheetIds;
}
styleSheetIds.push(styleSheetHeader.id);
- this._styleLoader.reset();
this.dispatchEventToListeners(WebInspector.CSSStyleModel.Events.StyleSheetAdded, styleSheetHeader);
},
@@ -433,7 +430,6 @@ WebInspector.CSSStyleModel.prototype = {
if (!Object.keys(this._styleSheetIdsForURL[url]).length)
delete this._styleSheetIdsForURL[url];
}
- this._styleLoader.reset();
this.dispatchEventToListeners(WebInspector.CSSStyleModel.Events.StyleSheetRemoved, header);
},
@@ -1523,16 +1519,6 @@ WebInspector.CSSStyleModel.ComputedStyleLoader = function(cssModel)
}
WebInspector.CSSStyleModel.ComputedStyleLoader.prototype = {
- reset: function()
- {
- for (var nodeId in this._nodeIdToCallbackData) {
- var callbacks = this._nodeIdToCallbackData[nodeId];
- for (var i = 0; i < callbacks.length; ++i)
- callbacks[i](null);
- }
- this._nodeIdToCallbackData = {};
- },
-
/**
* @param {!DOMAgent.NodeId} nodeId
* @param {function(?WebInspector.CSSStyleDeclaration)} userCallback

Powered by Google App Engine
This is Rietveld 408576698