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

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

Issue 1172643002: DevTools: migrate sidebar pane's titleElement to use Toolbar. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: only using latin1 in css Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 WebInspector.ScopeChainSidebarPane._pathSymbol = Symbol("path"); 41 WebInspector.ScopeChainSidebarPane._pathSymbol = Symbol("path");
42 42
43 WebInspector.ScopeChainSidebarPane.prototype = { 43 WebInspector.ScopeChainSidebarPane.prototype = {
44 /** 44 /**
45 * @param {?WebInspector.DebuggerModel.CallFrame} callFrame 45 * @param {?WebInspector.DebuggerModel.CallFrame} callFrame
46 */ 46 */
47 update: function(callFrame) 47 update: function(callFrame)
48 { 48 {
49 this.bodyElement.removeChildren(); 49 this.element.removeChildren();
50 50
51 if (!callFrame) { 51 if (!callFrame) {
52 var infoElement = createElement("div"); 52 var infoElement = createElement("div");
53 infoElement.className = "info"; 53 infoElement.className = "info";
54 infoElement.textContent = WebInspector.UIString("Not Paused"); 54 infoElement.textContent = WebInspector.UIString("Not Paused");
55 this.bodyElement.appendChild(infoElement); 55 this.element.appendChild(infoElement);
56 return; 56 return;
57 } 57 }
58 58
59 for (var i = 0; i < this._sections.length; ++i) { 59 for (var i = 0; i < this._sections.length; ++i) {
60 var section = this._sections[i]; 60 var section = this._sections[i];
61 if (!section.title) 61 if (!section.title)
62 continue; 62 continue;
63 if (section.expanded) 63 if (section.expanded)
64 this._expandedSections.add(section.title); 64 this._expandedSections.add(section.title);
65 else 65 else
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 section.addEventListener(TreeOutline.Events.ElementExpanded, this._e lementExpanded, this); 131 section.addEventListener(TreeOutline.Events.ElementExpanded, this._e lementExpanded, this);
132 section.addEventListener(TreeOutline.Events.ElementCollapsed, this._ elementCollapsed, this); 132 section.addEventListener(TreeOutline.Events.ElementCollapsed, this._ elementCollapsed, this);
133 133
134 if (scope.type() === DebuggerAgent.ScopeType.Global) 134 if (scope.type() === DebuggerAgent.ScopeType.Global)
135 section.objectTreeElement().collapse(); 135 section.objectTreeElement().collapse();
136 else if (!foundLocalScope || scope.type() === DebuggerAgent.ScopeTyp e.Local || this._expandedSections.has(title)) 136 else if (!foundLocalScope || scope.type() === DebuggerAgent.ScopeTyp e.Local || this._expandedSections.has(title))
137 section.objectTreeElement().expand(); 137 section.objectTreeElement().expand();
138 138
139 section.element.classList.add("scope-chain-sidebar-pane-section"); 139 section.element.classList.add("scope-chain-sidebar-pane-section");
140 this._sections.push(section); 140 this._sections.push(section);
141 this.bodyElement.appendChild(section.element); 141 this.element.appendChild(section.element);
142 } 142 }
143 }, 143 },
144 144
145 /** 145 /**
146 * @param {!WebInspector.Event} event 146 * @param {!WebInspector.Event} event
147 */ 147 */
148 _elementAttached: function(event) 148 _elementAttached: function(event)
149 { 149 {
150 var element = /** @type {!WebInspector.ObjectPropertyTreeElement} */ (ev ent.data); 150 var element = /** @type {!WebInspector.ObjectPropertyTreeElement} */ (ev ent.data);
151 if (element.isExpandable() && this._expandedProperties.has(this._propert yPath(element))) 151 if (element.isExpandable() && this._expandedProperties.has(this._propert yPath(element)))
(...skipping 22 matching lines...) Expand all
174 * @param {!WebInspector.ObjectPropertyTreeElement} treeElement 174 * @param {!WebInspector.ObjectPropertyTreeElement} treeElement
175 * @return {string} 175 * @return {string}
176 */ 176 */
177 _propertyPath: function(treeElement) 177 _propertyPath: function(treeElement)
178 { 178 {
179 return treeElement.treeOutline[WebInspector.ScopeChainSidebarPane._pathS ymbol] + WebInspector.ObjectPropertyTreeElement.prototype.propertyPath.call(tree Element); 179 return treeElement.treeOutline[WebInspector.ScopeChainSidebarPane._pathS ymbol] + WebInspector.ObjectPropertyTreeElement.prototype.propertyPath.call(tree Element);
180 }, 180 },
181 181
182 __proto__: WebInspector.SidebarPane.prototype 182 __proto__: WebInspector.SidebarPane.prototype
183 } 183 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698