2010-01-20 Yury Semikhatsky <yurys@chromium.org>
authoryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jan 2010 17:44:10 +0000 (17:44 +0000)
committeryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jan 2010 17:44:10 +0000 (17:44 +0000)
commite535e40efce15090dd96d3d793af85c9da8430f0
treefb2386884a32fe25587d3104ac72aee7f43307e7
parentc5be39a43484d737aadca5c12e1b3747c655bfe0
2010-01-20  Yury Semikhatsky  <yurys@chromium.org>

        Reviewed by Pavel Feldman.

        Inject inspector script directly into the inspected context. All the
        communication between the script and the frontend is serialized into
        JSON strings. It allows to get rid of object quarantines in Web Inspector.

        https://bugs.webkit.org/show_bug.cgi?id=32554

        Test: inspector/console-log-before-inspector-open.html

        * bindings/js/JSInjectedScriptHostCustom.cpp:
        (WebCore::JSInjectedScriptHost::databaseForId):
        (WebCore::JSInjectedScriptHost::currentCallFrame):
        (WebCore::JSInjectedScriptHost::nodeForId):
        (WebCore::JSInjectedScriptHost::pushNodePathToFrontend):
        (WebCore::JSInjectedScriptHost::selectDatabase):
        (WebCore::JSInjectedScriptHost::selectDOMStorage):
        * bindings/js/ScriptCallStack.h:
        (WebCore::ScriptCallStack::state):
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::mainWorldScriptState):
        * bindings/js/ScriptController.h:
        * bindings/js/ScriptObject.h:
        (WebCore::ScriptObject::scriptState):
        * bindings/js/ScriptValue.cpp:
        * bindings/js/ScriptValue.h:
        * bindings/v8/ScriptObject.h:
        (WebCore::ScriptObject::scriptState):
        * bindings/v8/ScriptValue.h:
        * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
        * inspector/ConsoleMessage.cpp:
        (WebCore::ConsoleMessage::ConsoleMessage):
        (WebCore::ConsoleMessage::addToConsole):
        (WebCore::ConsoleMessage::isEqual):
        * inspector/ConsoleMessage.h:
        * inspector/InjectedScriptHost.cpp:
        (WebCore::InjectedScriptHost::releaseWrapperObjectGroup):
        * inspector/InjectedScriptHost.h:
        * inspector/InjectedScriptHost.idl:
        * inspector/InspectorBackend.cpp:
        (WebCore::InspectorBackend::setInjectedScriptSource):
        (WebCore::InspectorBackend::dispatchOnInjectedScript):
        (WebCore::InspectorBackend::releaseWrapperObjectGroup):
        * inspector/InspectorBackend.h:
        * inspector/InspectorBackend.idl:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::InspectorController):
        (WebCore::InspectorController::clearConsoleMessages):
        (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
        (WebCore::InspectorController::windowScriptObjectAvailable):
        (WebCore::InspectorController::scriptObjectReady):
        (WebCore::InspectorController::setFrontendProxyObject):
        (WebCore::InspectorController::close):
        (WebCore::InspectorController::resetScriptObjects):
        (WebCore::InspectorController::didPause):
        (WebCore::InspectorController::injectedScriptForNodeId):
        * inspector/InspectorController.h:
        * inspector/InspectorFrontend.cpp:
        (WebCore::InspectorFrontend::addConsoleMessage):
        (WebCore::InspectorFrontend::pausedScript):
        * inspector/InspectorFrontend.h:
        * inspector/front-end/AuditsPanel.js:
        (WebInspector.AuditsPanel.prototype._reloadResources):
        * inspector/front-end/ConsoleView.js:
        (WebInspector.ConsoleView.prototype.requestClearMessages):
        (WebInspector.ConsoleView.prototype.doEvalInWindow):
        * inspector/front-end/DOMAgent.js:
        (WebInspector.DOMNode):
        (WebInspector.CSSStyleDeclaration):
        (WebInspector.CSSStyleDeclaration.parseRule):
        * inspector/front-end/Database.js:
        (WebInspector.Database.prototype.executeSql):
        * inspector/front-end/ElementsPanel.js:
        (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged.InjectedScriptAccess.get addInspectedNode):
        (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
        (WebInspector.ElementsPanel.prototype.setDocument):
        (WebInspector.ElementsPanel.prototype.searchCanceled):
        (WebInspector.ElementsPanel.prototype.performSearch):
        * inspector/front-end/ElementsTreeOutline.js:
        (WebInspector.ElementsTreeElement.prototype.createTooltipForImageNode):
        * inspector/front-end/EventListenersSidebarPane.js:
        ():
        * inspector/front-end/InjectedScript.js:
        (injectedScriptConstructor):
        (injectedScriptConstructor.):
        * inspector/front-end/InjectedScriptAccess.js:
        (InjectedScriptAccess):
        (InjectedScriptAccess.getDefault):
        (get InjectedScriptAccess):
        (InjectedScriptAccess._installHandler.InjectedScriptAccess.prototype.methodName):
        (InjectedScriptAccess._installHandler):
        * inspector/front-end/MetricsSidebarPane.js:
        (WebInspector.MetricsSidebarPane):
        (WebInspector.MetricsSidebarPane.prototype.update.inlineStyleCallback):
        * inspector/front-end/ObjectPropertiesSection.js:
        * inspector/front-end/ObjectProxy.js:
        (WebInspector.ObjectProxy):
        * inspector/front-end/PropertiesSidebarPane.js:
        (WebInspector.PropertiesSidebarPane.prototype.update.callback):
        * inspector/front-end/ResourcesPanel.js:
        (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
        * inspector/front-end/ScriptsPanel.js:
        * inspector/front-end/StylesSidebarPane.js:
        (WebInspector.StylePropertyTreeElement.prototype):
        * inspector/front-end/WatchExpressionsSidebarPane.js:
        (WebInspector.WatchExpressionsSection.prototype.update):
        * inspector/front-end/inspector.js:
        (WebInspector.loaded):
        (WebInspector.pausedScript):
        (WebInspector.addConsoleMessage):
        (WebInspector.log.logMessage):
        (WebInspector.log):

2010-01-20  Yury Semikhatsky  <yurys@chromium.org>

        Reviewed by Pavel Feldman.

        Inject inspector script directly into the inspected context. All the
        communication between the script and the frontend is serialized into
        JSON strings. It allows to get rid of object quarantines in Web Inspector.

        Test that web inspector doesn't crash when opening if there are messages in
        the console. Refactor test case due to InjectedScriptAccess changes.

        https://bugs.webkit.org/show_bug.cgi?id=32554

        * inspector/console-log-before-inspector-open-expected.txt: Added.
        * inspector/console-log-before-inspector-open.html: Added.
        * inspector/styles-iframe.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@53552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
45 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/console-log-before-inspector-open-expected.txt [new file with mode: 0644]
LayoutTests/inspector/console-log-before-inspector-open.html [new file with mode: 0755]
LayoutTests/inspector/styles-iframe.html
WebCore/ChangeLog
WebCore/bindings/js/JSInjectedScriptHostCustom.cpp
WebCore/bindings/js/ScriptCallStack.h
WebCore/bindings/js/ScriptController.cpp
WebCore/bindings/js/ScriptController.h
WebCore/bindings/js/ScriptObject.h
WebCore/bindings/js/ScriptValue.cpp
WebCore/bindings/js/ScriptValue.h
WebCore/bindings/v8/ScriptObject.h
WebCore/bindings/v8/ScriptValue.h
WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
WebCore/inspector/ConsoleMessage.cpp
WebCore/inspector/ConsoleMessage.h
WebCore/inspector/InjectedScriptHost.cpp
WebCore/inspector/InjectedScriptHost.h
WebCore/inspector/InjectedScriptHost.idl
WebCore/inspector/InspectorBackend.cpp
WebCore/inspector/InspectorBackend.h
WebCore/inspector/InspectorBackend.idl
WebCore/inspector/InspectorController.cpp
WebCore/inspector/InspectorController.h
WebCore/inspector/InspectorFrontend.cpp
WebCore/inspector/InspectorFrontend.h
WebCore/inspector/front-end/AuditsPanel.js
WebCore/inspector/front-end/ConsoleView.js
WebCore/inspector/front-end/DOMAgent.js
WebCore/inspector/front-end/Database.js
WebCore/inspector/front-end/ElementsPanel.js
WebCore/inspector/front-end/ElementsTreeOutline.js
WebCore/inspector/front-end/EventListenersSidebarPane.js
WebCore/inspector/front-end/InjectedScript.js
WebCore/inspector/front-end/InjectedScriptAccess.js
WebCore/inspector/front-end/MetricsSidebarPane.js
WebCore/inspector/front-end/ObjectPropertiesSection.js
WebCore/inspector/front-end/ObjectProxy.js
WebCore/inspector/front-end/PropertiesSidebarPane.js
WebCore/inspector/front-end/ResourcesPanel.js
WebCore/inspector/front-end/ScriptsPanel.js
WebCore/inspector/front-end/StylesSidebarPane.js
WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
WebCore/inspector/front-end/inspector.js