[Webkit-unassigned] [Bug 19158] Inspector should support console.group/console.groupEnd

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


aroben at apple.com changed:

           What    |Removed                     |Added
  Attachment #21986|review?                     |review-
               Flag|                            |

------- Comment #3 from aroben at apple.com  2008-06-28 09:14 PDT -------
(From update of attachment 21986)
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?

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list