Fixed Bug 19158: Inspector should support console.group/console.groupEnd
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jul 2008 18:04:29 +0000 (18:04 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jul 2008 18:04:29 +0000 (18:04 +0000)
commitc5ad3ce4f8352c68d1c775e681a6e5f2c8400df2
treea98952d71537bac7147069e0e163a0cc01f0e524
parent8778c0f88a509c8ac587656a43947370eb6b20cc
    Fixed Bug 19158: Inspector should support console.group/console.groupEnd

        <https://bugs.webkit.org/show_bug.cgi?id=19158>

        Reviewed by Tim Hatcher and Adam Roben.

        * bindings/js/JSConsoleCustom.cpp:
        (WebCore::JSConsole::group): Added.
        * page/Console.cpp:
        (WebCore::Console::group): Added.
        (WebCore::Console::groupEnd): Added.
        * page/Console.h:
        (WebCore::):
        * page/Console.idl: Added group/groupEnd.
        * page/InspectorController.cpp:
        (WebCore::ConsoleMessage::ConsoleMessage):
        (WebCore::InspectorController::InspectorController): Added m_groupLevel.
        (WebCore::InspectorController::addMessageToConsole): Added groupLevel argument.
        (WebCore::InspectorController::startGroup): Increments m_groupLevel by one and calls js function if needed.
        (WebCore::InspectorController::endGroup): Decrements m_groupLevel by one and calls js function if needed.
        (WebCore::InspectorController::addScriptConsoleMessage): Added groupLevel argument.
        (WebCore::InspectorController::didCommitLoad): Resets m_groupLevel.
        * page/InspectorController.h:
        * page/inspector/Console.js:
        (WebInspector.Console): Added groupLevel and currentGroup topGroup.
        (WebInspector.Console.addMessage): Calls addMessage method in the currentGroup.
        (WebInspector.Console.startGroup): Added.
        (WebInspector.Console.endGroup): Added.
        (WebInspector.Console.clearMessages): Resets groupLevel and currentGroup.
        (WebInspector.ConsoleMessage): Added groupLevel property.
        (WebInspector.ConsoleMessage.MessageLevel.GroupTitle): Added.
        (WebInspector.ConsoleGroup): Added.
        (WebInspector.ConsoleGroup.addMessage): Adds console message to group.
        (WebInspector.ConsoleGroup._titleClicked): Adds "collapsed" style class.
        * page/inspector/inspector.css:
        * page/inspector/inspector.js:
        (WebInspector.startGroupInConsole): Calls console.startGroup
        (WebInspector.endGroupInConsole): Calls console.endGroup

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/bindings/js/JSConsoleCustom.cpp
WebCore/page/Console.cpp
WebCore/page/Console.h
WebCore/page/Console.idl
WebCore/page/InspectorController.cpp
WebCore/page/InspectorController.h
WebCore/page/inspector/Console.js
WebCore/page/inspector/inspector.css
WebCore/page/inspector/inspector.js