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

Side by Side Diff: webkit/glue/devtools/js/devtools.js

Issue 57007: Styles pane is made work with IPC. Still not work and will be fixed later:... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 8 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
« no previous file with comments | « webkit/glue/devtools/dom_agent_impl.cc ('k') | webkit/glue/devtools/js/devtools_host_stub.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Tools is a main class that wires all components of the 6 * @fileoverview Tools is a main class that wires all components of the
7 * DevTools frontend together. It is also responsible for overriding existing 7 * DevTools frontend together. It is also responsible for overriding existing
8 * WebInspector functionality while it is getting upstreamed into WebCore. 8 * WebInspector functionality while it is getting upstreamed into WebCore.
9 */ 9 */
10 goog.provide('devtools.Tools'); 10 goog.provide('devtools.Tools');
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult = function() { 218 WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult = function() {
219 }; 219 };
220 220
221 221
222 WebInspector.Console.prototype._evalInInspectedWindow = function(expr) { 222 WebInspector.Console.prototype._evalInInspectedWindow = function(expr) {
223 return devtools.tools.evaluate(expr); 223 return devtools.tools.evaluate(expr);
224 }; 224 };
225 225
226 226
227 WebInspector.ElementsPanel.prototype.updateStyles = function(forceUpdate) {
228 var stylesSidebarPane = this.sidebarPanes.styles;
229 if (!stylesSidebarPane.expanded || !stylesSidebarPane.needsUpdate)
230 return;
231
232 var node = this.focusedDOMNode;
233 if (node && node.nodeType === Node.TEXT_NODE && node.parentNode)
234 node = node.parentNode;
235
236 if (node && node.nodeType == Node.ELEMENT_NODE) {
237 var callback = function() {
238 stylesSidebarPane.update(node, null, forceUpdate);
239 stylesSidebarPane.needsUpdate = false;
240 };
241
242 devtools.tools.getDomAgent().getNodeStylesAsync(node,
243 !Preferences.showUserAgentStyles, callback);
244 } else {
245 stylesSidebarPane.update(null, null, forceUpdate);
246 stylesSidebarPane.needsUpdate = false;
247 }
248 };
249
250
227 WebInspector.PropertiesSidebarPane.prototype.update = function(object) { 251 WebInspector.PropertiesSidebarPane.prototype.update = function(object) {
228 var body = this.bodyElement; 252 var body = this.bodyElement;
229 body.removeChildren(); 253 body.removeChildren();
230 254
231 this.sections = []; 255 this.sections = [];
232 256
233 if (!object) { 257 if (!object) {
234 return; 258 return;
235 } 259 }
236 260
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 341 }
318 properties.sort(); 342 properties.sort();
319 343
320 treeOutline.removeChildren(); 344 treeOutline.removeChildren();
321 345
322 for (var i = 0; i < properties.length; ++i) { 346 for (var i = 0; i < properties.length; ++i) {
323 var propertyName = properties[i]; 347 var propertyName = properties[i];
324 treeOutline.appendChild(new constructor(obj, propertyName)); 348 treeOutline.appendChild(new constructor(obj, propertyName));
325 } 349 }
326 }; 350 };
OLDNEW
« no previous file with comments | « webkit/glue/devtools/dom_agent_impl.cc ('k') | webkit/glue/devtools/js/devtools_host_stub.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698