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

Side by Side Diff: Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js

Issue 826713005: DevTools: Highlight changed scope variables as they change (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) IBM Corp. 2009 All rights reserved. 2 * Copyright (C) IBM Corp. 2009 All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 /** 31 /**
32 * @constructor 32 * @constructor
33 * @extends {WebInspector.SidebarPane} 33 * @extends {WebInspector.SidebarPane}
34 */ 34 */
35 WebInspector.WatchExpressionsSidebarPane = function() 35 WebInspector.WatchExpressionsSidebarPane = function()
36 { 36 {
37 WebInspector.SidebarPane.call(this, WebInspector.UIString("Watch Expressions ")); 37 WebInspector.SidebarPane.call(this, WebInspector.UIString("Watch Expressions "));
38 38
39 this.section = new WebInspector.WatchExpressionsSection(); 39 this.section = new WebInspector.WatchExpressionsSection();
40 this.section.pane = this;
41
42 this._expandedExpressions = new Set();
43 this._expandedProperties = new Set();
44
40 this.bodyElement.appendChild(this.section.element); 45 this.bodyElement.appendChild(this.section.element);
41 46
42 var refreshButton = this.titleElement.createChild("button", "pane-title-butt on refresh"); 47 var refreshButton = this.titleElement.createChild("button", "pane-title-butt on refresh");
43 refreshButton.addEventListener("click", this._refreshButtonClicked.bind(this ), false); 48 refreshButton.addEventListener("click", this._refreshButtonClicked.bind(this ), false);
44 refreshButton.title = WebInspector.UIString("Refresh"); 49 refreshButton.title = WebInspector.UIString("Refresh");
45 50
46 var addButton = this.titleElement.createChild("button", "pane-title-button a dd"); 51 var addButton = this.titleElement.createChild("button", "pane-title-button a dd");
47 addButton.addEventListener("click", this._addButtonClicked.bind(this), false ); 52 addButton.addEventListener("click", this._addButtonClicked.bind(this), false );
48 addButton.title = WebInspector.UIString("Add watch expression"); 53 addButton.title = WebInspector.UIString("Add watch expression");
49 54
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 continue; 209 continue;
205 210
206 currentExecutionContext.evaluate(expression, this._watchObjectGr oupId, false, true, false, false, appendResult.bind(this, expression, i)); 211 currentExecutionContext.evaluate(expression, this._watchObjectGr oupId, false, true, false, false, appendResult.bind(this, expression, i));
207 } 212 }
208 } 213 }
209 214
210 if (!propertyCount) { 215 if (!propertyCount) {
211 this.element.appendChild(this.emptyElement); 216 this.element.appendChild(this.emptyElement);
212 this.propertiesElement.remove(); 217 this.propertiesElement.remove();
213 this.propertiesTreeOutline.removeChildren(); 218 this.propertiesTreeOutline.removeChildren();
219 this.pane._expandedExpressions.clear();
220 this.pane._expandedProperties.clear();
214 } else { 221 } else {
215 this.element.appendChild(this.propertiesElement); 222 this.element.appendChild(this.propertiesElement);
216 this.emptyElement.remove(); 223 this.emptyElement.remove();
217 } 224 }
218 }, 225 },
219 226
220 /** 227 /**
221 * @param {!Array.<!WebInspector.RemoteObjectProperty>} properties 228 * @param {!Array.<!WebInspector.RemoteObjectProperty>} properties
222 */ 229 */
223 updateProperties: function(properties) 230 updateProperties: function(properties)
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 */ 487 */
481 applyExpression: function(expression) 488 applyExpression: function(expression)
482 { 489 {
483 expression = expression.trim(); 490 expression = expression.trim();
484 this.property.name = expression || null; 491 this.property.name = expression || null;
485 this.treeOutline.section.updateExpression(this, expression); 492 this.treeOutline.section.updateExpression(this, expression);
486 }, 493 },
487 494
488 __proto__: WebInspector.ObjectPropertyTreeElement.prototype 495 __proto__: WebInspector.ObjectPropertyTreeElement.prototype
489 } 496 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698