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

Issue 99184: DevTools: Implement styles toggle:... (Closed)

Created:
11 years, 7 months ago by pfeldman
Modified:
9 years, 7 months ago
Reviewers:
yurys
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=14839

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 20

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+472 lines, -241 lines) Patch
M webkit/glue/devtools/debugger_agent_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M webkit/glue/devtools/debugger_agent_impl.cc View 2 chunks +20 lines, -7 lines 0 comments Download
M webkit/glue/devtools/js/devtools.js View 2 chunks +16 lines, -1 line 0 comments Download
M webkit/glue/devtools/js/devtools_host_stub.js View 2 chunks +12 lines, -10 lines 0 comments Download
M webkit/glue/devtools/js/dom_agent.js View 1 2 11 chunks +98 lines, -63 lines 0 comments Download
M webkit/glue/devtools/js/inject.js View 1 2 1 chunk +285 lines, -155 lines 0 comments Download
A webkit/glue/devtools/js/inject_dispatch.js View 1 2 1 chunk +33 lines, -0 lines 0 comments Download
M webkit/glue/devtools/tools_agent.h View 1 chunk +2 lines, -1 line 0 comments Download
M webkit/glue/webdevtoolsagent_impl.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M webkit/glue/webkit_resources.grd View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
pfeldman
11 years, 7 months ago (2009-04-29 11:50:22 UTC) #1
yurys
http://codereview.chromium.org/99184/diff/24/27 File webkit/glue/devtools/js/dom_agent.js (right): http://codereview.chromium.org/99184/diff/24/27#newcode270 Line 270: this.computedStyle_ = this.makeStyle_(computedStyle); init this property in the ...
11 years, 7 months ago (2009-04-29 12:29:05 UTC) #2
yurys
LGTM
11 years, 7 months ago (2009-04-29 12:29:21 UTC) #3
pfeldman
11 years, 7 months ago (2009-04-29 12:39:26 UTC) #4
http://codereview.chromium.org/99184/diff/24/27
File webkit/glue/devtools/js/dom_agent.js (right):

http://codereview.chromium.org/99184/diff/24/27#newcode270
Line 270: this.computedStyle_ = this.makeStyle_(computedStyle);
On 2009/04/29 12:29:06, Yury Semikhatsky wrote:
> init this property in the constructor?

Done.

http://codereview.chromium.org/99184/diff/24/27#newcode271
Line 271: this.style = this.makeStyle_(inlineStyle);
On 2009/04/29 12:29:06, Yury Semikhatsky wrote:
> ditto

Done.

http://codereview.chromium.org/99184/diff/24/27#newcode873
Line 873: * @param {boolean} enabled True if style should be enabled.
On 2009/04/29 12:29:06, Yury Semikhatsky wrote:
> too many @params

Done.

http://codereview.chromium.org/99184/diff/24/27#newcode890
Line 890: name]));
On 2009/04/29 12:29:06, Yury Semikhatsky wrote:
> wrong alignment

Done.

http://codereview.chromium.org/99184/diff/24/26
File webkit/glue/devtools/js/inject.js (right):

http://codereview.chromium.org/99184/diff/24/26#newcode221
Line 221: devtools.Injected.prototype.toggleNodeStyle = function(node, styleId,
enabled, name) {
On 2009/04/29 12:29:06, Yury Semikhatsky wrote:
> long line

Done.

http://codereview.chromium.org/99184/diff/24/26#newcode228
Line 228: if (!style.__disabledPropertyValues ||
!style.__disabledPropertyPriorities) {
On 2009/04/29 12:29:06, Yury Semikhatsky wrote:
> long line

Done.

http://codereview.chromium.org/99184/diff/24/26#newcode229
Line 229: style.__disabledProperties = {};
On 2009/04/29 12:29:06, Yury Semikhatsky wrote:
> why not use mapping name->property data?

Taken from webkit - will ease merging...

http://codereview.chromium.org/99184/diff/24/26#newcode244
Line 244: style.__disabledProperties[name] = true;
On 2009/04/29 12:29:06, Yury Semikhatsky wrote:
> it seems that this line should go in both branches

Nope. Taken from webkit.

http://codereview.chromium.org/99184/diff/24/34
File webkit/glue/devtools/js/inject_dispatch.js (right):

http://codereview.chromium.org/99184/diff/24/34#newcode4
Line 4: 
On 2009/04/29 12:29:06, Yury Semikhatsky wrote:
> @fileoverview is missing

Done.

http://codereview.chromium.org/99184/diff/24/34#newcode29
Line 29: }
On 2009/04/29 12:29:06, Yury Semikhatsky wrote:
> shouldn't we return here?

Done.

Powered by Google App Engine
This is Rietveld 408576698