2011-02-23 Pavel Feldman <pfeldman@chromium.org>
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Feb 2011 14:43:25 +0000 (14:43 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Feb 2011 14:43:25 +0000 (14:43 +0000)
commit7c837a905e7de1546f94a6925741d6f1044c6620
tree296c357c05c4f679f39c6d09ca084c9ef6efcb80
parent6d06d25c4a9af047764127a708287e992c6d7fd0
2011-02-23  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: refactor inspect() workflow so that it did not push dom nodes.
        https://bugs.webkit.org/show_bug.cgi?id=55057

        * http/tests/inspector/inspector-test.js:
        (initialize_InspectorTest.InspectorTest.runTestSuite.runner):
        (initialize_InspectorTest.InspectorTest.runTestSuite):
        * inspector/console/command-line-api-inspect-expected.txt: Added.
        * inspector/console/command-line-api-inspect.html: Added.
2011-02-23  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: refactor inspect() workflow so that it did not push dom nodes.
        https://bugs.webkit.org/show_bug.cgi?id=55057

        Test: inspector/console/command-line-api-inspect.html

        I am working on getting rid of DOM agent pushes - everything should happen upon
        front-end request. This patch changes the way we handle inspect() command line
        api: instead of pushing nodes, we are telling front-end that inspect(object) has
        been requested. It is then up to front-end to request dom nodes and focus them in
        the tree. I also made inspect() work in a generic manner, using same routines for
        nodes, databases, storages and potentially new elements.

        As a side-effect, we don't do console.log from within inspect() anymore, but dump
        inspected value as inspect's result.

        Also, I added individual object release method and made object groups optional.

        * bindings/js/JSInjectedScriptHostCustom.cpp:
        (WebCore::InjectedScriptHost::scriptValueAsNode):
        (WebCore::InjectedScriptHost::nodeAsScriptValue):
        (WebCore::JSInjectedScriptHost::inspect):
        (WebCore::JSInjectedScriptHost::databaseId):
        (WebCore::JSInjectedScriptHost::storageId):
        * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
        (WebCore::InjectedScriptHost::scriptValueAsNode):
        (WebCore::InjectedScriptHost::nodeAsScriptValue):
        (WebCore::V8InjectedScriptHost::inspectCallback):
        (WebCore::V8InjectedScriptHost::databaseIdCallback):
        (WebCore::V8InjectedScriptHost::storageIdCallback):
        * inspector/InjectedScript.cpp:
        (WebCore::InjectedScript::nodeForObjectId):
        (WebCore::InjectedScript::releaseObject):
        (WebCore::InjectedScript::wrapForConsole):
        (WebCore::InjectedScript::inspectNode):
        * inspector/InjectedScript.h:
        * inspector/InjectedScriptHost.cpp:
        (WebCore::InjectedScriptHost::inspectImpl):
        (WebCore::InjectedScriptHost::databaseIdImpl):
        (WebCore::InjectedScriptHost::storageIdImpl):
        * inspector/InjectedScriptHost.h:
        * inspector/InjectedScriptHost.idl:
        * inspector/InjectedScriptSource.js:
        * inspector/Inspector.idl:
        * inspector/InspectorAgent.cpp:
        (WebCore::InspectorAgent::focusNode):
        * inspector/InspectorDOMAgent.cpp:
        * inspector/InspectorDOMAgent.h:
        * inspector/InspectorDOMStorageAgent.cpp:
        (WebCore::InspectorDOMStorageAgent::storageId):
        (WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
        * inspector/InspectorDOMStorageAgent.h:
        * inspector/InspectorDOMStorageResource.cpp:
        * inspector/InspectorDOMStorageResource.h:
        * inspector/InspectorDatabaseAgent.cpp:
        (WebCore::InspectorDatabaseAgent::databaseId):
        * inspector/InspectorDatabaseAgent.h:
        * inspector/InspectorDatabaseResource.cpp:
        * inspector/InspectorDatabaseResource.h:
        * inspector/InspectorRuntimeAgent.cpp:
        (WebCore::InspectorRuntimeAgent::releaseObject):
        * inspector/InspectorRuntimeAgent.h:
        * inspector/front-end/AuditRules.js:
        (WebInspector.AuditRules.evaluateInTargetWindow):
        (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
        * inspector/front-end/DOMStorage.js:
        * inspector/front-end/Database.js:
        * inspector/front-end/ExtensionServer.js:
        (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
        * inspector/front-end/inspector.js:
        (WebInspector.inspect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/console/command-line-api-inspect-expected.txt [new file with mode: 0644]
LayoutTests/inspector/console/command-line-api-inspect.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp
Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
Source/WebCore/inspector/InjectedScript.cpp
Source/WebCore/inspector/InjectedScript.h
Source/WebCore/inspector/InjectedScriptHost.cpp
Source/WebCore/inspector/InjectedScriptHost.h
Source/WebCore/inspector/InjectedScriptHost.idl
Source/WebCore/inspector/InjectedScriptSource.js
Source/WebCore/inspector/Inspector.idl
Source/WebCore/inspector/InspectorAgent.cpp
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/inspector/InspectorDOMAgent.h
Source/WebCore/inspector/InspectorDOMStorageAgent.cpp
Source/WebCore/inspector/InspectorDOMStorageAgent.h
Source/WebCore/inspector/InspectorDOMStorageResource.cpp
Source/WebCore/inspector/InspectorDOMStorageResource.h
Source/WebCore/inspector/InspectorDatabaseAgent.cpp
Source/WebCore/inspector/InspectorDatabaseAgent.h
Source/WebCore/inspector/InspectorDatabaseResource.cpp
Source/WebCore/inspector/InspectorDatabaseResource.h
Source/WebCore/inspector/InspectorResourceAgent.h
Source/WebCore/inspector/InspectorRuntimeAgent.cpp
Source/WebCore/inspector/InspectorRuntimeAgent.h
Source/WebCore/inspector/front-end/AuditRules.js
Source/WebCore/inspector/front-end/DOMStorage.js
Source/WebCore/inspector/front-end/Database.js
Source/WebCore/inspector/front-end/ExtensionServer.js
Source/WebCore/inspector/front-end/inspector.js