[webkit-reviews] review denied: [Bug 19158] Inspector should support console.group/console.groupEnd : [Attachment 21986] prototype

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jun 28 09:14:08 PDT 2008


Adam Roben (aroben) <aroben at apple.com> has denied Keishi Hattori
<casey.hattori at gmail.com>'s request for review:
Bug 19158: Inspector should support console.group/console.groupEnd
https://bugs.webkit.org/show_bug.cgi?id=19158

Attachment 21986: prototype
https://bugs.webkit.org/attachment.cgi?id=21986&action=edit

------- Additional Comments from Adam Roben (aroben) <aroben at apple.com>
I think we need a slightly different approach here. Here's the Firebug
documentation for console.group:

> console.group(object[, object, ...])
> Writes a message to the console and opens a nested
> block to indent all future messages sent to the console.
> Call console.groupEnd() to close the block.

So it looks like console.group essentially does a console.log, then increases
the indent level for all future console messages. console.groupEnd just
decreases the indent level for all future console messages.

So I think somewhere we're going to have to keep track of the current indent
level. console.group will increment it, and console.groupEnd will decrement it.
Every time a message is added to the console, we'll indent it according to the
current indent level.

We should probably store the indent level in the ConsoleMessage struct in
InspectorController.cpp. Then we can pass the indent level down to the
Inspector's JS with the rest of the message. This will let us get rid of the
messy "startGroup"/"endGroup" special messages.

Make sense?


More information about the webkit-reviews mailing list