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

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

Issue 940373004: [DevTools] Teach MediaQueryInspector about disabling models while profiling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more cleanup Created 5 years, 10 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/sdk/CSSStyleModel.js
diff --git a/Source/devtools/front_end/sdk/CSSStyleModel.js b/Source/devtools/front_end/sdk/CSSStyleModel.js
index 17b98e0a12bb579918d84025ee94473c8e9d1a6b..8b8475d82082847cd61cea67c861054efaf813ab 100644
--- a/Source/devtools/front_end/sdk/CSSStyleModel.js
+++ b/Source/devtools/front_end/sdk/CSSStyleModel.js
@@ -70,6 +70,7 @@ WebInspector.CSSStyleModel.parseRuleMatchArrayPayload = function(cssModel, match
}
WebInspector.CSSStyleModel.Events = {
+ ModelWasDisabled: "ModelWasDisabled",
ModelWasEnabled: "ModelWasEnabled",
StyleSheetAdded: "StyleSheetAdded",
StyleSheetChanged: "StyleSheetChanged",
@@ -84,11 +85,12 @@ WebInspector.CSSStyleModel.prototype = {
{
this._agent.disable();
this._isEnabled = false;
- this._resetStyleSheets();
+ this.dispatchEventToListeners(WebInspector.CSSStyleModel.Events.ModelWasDisabled);
},
resumeModel: function()
{
+ this._resetStyleSheets();
lushnikov 2015/02/25 15:23:55 why this change?
dgozman 2015/02/25 15:51:55 So we don't immediately clear UI because of disapp
this._agent.enable(this._wasEnabled.bind(this));
},

Powered by Google App Engine
This is Rietveld 408576698