[webkit-reviews] review requested: [Bug 31538] Web Inspector: Wrong console output for Regexp escape sequence : [Attachment 43826] [PATCH] Desired Behavior
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 24 21:32:44 PST 2009
Joseph Pecoraro <joepeck at webkit.org> has asked for review:
Bug 31538: Web Inspector: Wrong console output for Regexp escape sequence
https://bugs.webkit.org/show_bug.cgi?id=31538
Attachment 43826: [PATCH] Desired Behavior
https://bugs.webkit.org/attachment.cgi?id=43826&action=review
------- Additional Comments from Joseph Pecoraro <joepeck at webkit.org>
I spent some time trying to diagnose the issues with formatting. And write them
down so I remember
Output of Single Values:
- strings => "quoted"
- number => number
- regex => /form/
- date => date string
- function => string
- node => html tree
- error => red error message, no quotes
- array + object = special behavior
Limitations Depending on how they are Output:
- typing a literal/variable in the console
- functions should output fully (multiline)
- string should output fully
- a value containing in an array
- functions should output abbreviated (one line)
- strings should output abbreviated (100 chars)
- a value of an object property
- functions should output abbreviated (one line)
- strings should output abbreviated (100 chars)
- output from console.log() and family (except dir)
- strings should NOT be quoted
- output from the background should NOT be quoted
- XHR Responses
- Profile Finished
What should Probably be Linkified:
- strings, function strings, node contents
- regexs?
All in all, I think my patch brings us to this behavior, however testing it
turned out to be harder then I thought. At some point the test results had
quotes which my manual tests did not show. My tests try three things:
1. straight console.log
2. console.log in an array
3. variable execution in the console
If someone can find the time to refactor, areas to consider:
- InjectedScript side
- Object.describe takes an "abbreviate" flag
- Object.type determines the type used later in _format(s)
- Inspector side
- entry point for console.log messages?
- entry point for profile finished messages?
- other generic messages like tips etc?
- WebInspector.ConsoleView.prototype._format can be simplified
- WebInspector.ConsoleMessage._format is complex, calls the above
- Other
- (new RegExp(...)).toString() doesn't handle "/" well.
More information about the webkit-reviews
mailing list