diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-29 13:07:14 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-29 13:07:14 +0000 |
commit | f6a2f61481761768352fafff68faca28c9a73bd1 (patch) | |
tree | e3f2f3aaf7d0b37203215d23de8248cb42416ab8 /webkit/glue/devtools/js/devtools.js | |
parent | 251d1dbb34d1e365c78f81bac17ed71ec32cd6c5 (diff) | |
download | chromium_src-f6a2f61481761768352fafff68faca28c9a73bd1.zip chromium_src-f6a2f61481761768352fafff68faca28c9a73bd1.tar.gz chromium_src-f6a2f61481761768352fafff68faca28c9a73bd1.tar.bz2 |
DevTools: Implement styles toggle:
1. Split inject.js into injected object and the dispatch.
2. Surround utility function call with try/catch, pass potential exception all way to the client.
3. Fix user and user agent scripts detection
4. Introduce toggleStyle
5. Remove __defineGetter__ from the styles code: make things simple
6. Beautify code.
Review URL: http://codereview.chromium.org/99184
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14839 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/devtools/js/devtools.js')
-rw-r--r-- | webkit/glue/devtools/js/devtools.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/webkit/glue/devtools/js/devtools.js b/webkit/glue/devtools/js/devtools.js index f263962..53581d1 100644 --- a/webkit/glue/devtools/js/devtools.js +++ b/webkit/glue/devtools/js/devtools.js @@ -549,7 +549,7 @@ WebInspector.ScopeChainSidebarPane.TreeElement.prototype.onpopulate = /** * Callback function used with the resolveChildren. */ - WebInspector.ScopeChainSidebarPane.TreeElement.prototype.didResolveChildren_ = +WebInspector.ScopeChainSidebarPane.TreeElement.prototype.didResolveChildren_ = function(object) { this.removeChildren(); @@ -558,3 +558,18 @@ WebInspector.ScopeChainSidebarPane.TreeElement.prototype.onpopulate = this.appendChild(new constructor(object, name)); } }; + + +/** + * @override + */ +WebInspector.StylePropertyTreeElement.prototype.toggleEnabled = + function(event) { + var disabled = !event.target.checked; + var self = this; + devtools.tools.getDomAgent().toggleNodeStyleAsync(this.style, !disabled, + this.name, + function() { + WebInspector.panels.elements.updateStyles(true); + }); +}; |