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

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

Issue 100199: DevTools: Implement styles editing. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 // 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 this.appendChild(new constructor(object, name)); 557 this.appendChild(new constructor(object, name));
558 } 558 }
559 }; 559 };
560 560
561 561
562 /** 562 /**
563 * @override 563 * @override
564 */ 564 */
565 WebInspector.StylePropertyTreeElement.prototype.toggleEnabled = 565 WebInspector.StylePropertyTreeElement.prototype.toggleEnabled =
566 function(event) { 566 function(event) {
567 var disabled = !event.target.checked; 567 var enabled = event.target.checked;
568 var self = this; 568 devtools.tools.getDomAgent().toggleNodeStyleAsync(this.style, enabled,
569 devtools.tools.getDomAgent().toggleNodeStyleAsync(this.style, !disabled,
570 this.name, 569 this.name,
571 function() { 570 function() {
572 WebInspector.panels.elements.sidebarPanes.styles.needsUpdate = true; 571 WebInspector.panels.elements.sidebarPanes.styles.needsUpdate = true;
573 WebInspector.panels.elements.updateStyles(true); 572 WebInspector.panels.elements.updateStyles(true);
574 }); 573 });
575 }; 574 };
575
576
577 /**
578 * @override
579 */
580 WebInspector.StylePropertyTreeElement.prototype.applyStyleText = function(
581 styleText, updateInterface) {
582 devtools.tools.getDomAgent().applyStyleTextAsync(this.style, this.name,
yurys 2009/04/30 09:55:40 style: each param on its own line
pfeldman 2009/04/30 10:00:16 Done.
583 styleText,
584 function() {
585 if (updateInterface) {
586 WebInspector.panels.elements.sidebarPanes.styles.needsUpdate = true;
587 WebInspector.panels.elements.updateStyles(true);
588 }
589 });
590 };
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/devtools/js/devtools_host_stub.js » ('j') | webkit/glue/devtools/js/dom_agent.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698