2011-06-16 Vsevolod Vlasov <vsevik@chromium.org>
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Jun 2011 16:53:03 +0000 (16:53 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Jun 2011 16:53:03 +0000 (16:53 +0000)
commit9790e22221eaa9e8048fda9e5a792e046fefab55
tree7ecc5ca3f1eb2fbf6152522a9e314d59da52ea72
parent84762d14f8f321778b129ef4c77139ca56c37aa4
2011-06-16  Vsevolod Vlasov  <vsevik@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs.
        https://bugs.webkit.org/show_bug.cgi?id=61205

        Added inspector backend cache for XHR content.

        * http/tests/inspector/network/network-xhr-async-expected.txt: Added.
        * http/tests/inspector/network/network-xhr-async.html: Added.
        * http/tests/inspector/network/network-xhr-sync-expected.txt: Added.
        * http/tests/inspector/network/network-xhr-sync.html: Added.
2011-06-16  Vsevolod Vlasov  <vsevik@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs.
        https://bugs.webkit.org/show_bug.cgi?id=61205

        Added inspector backend cache for XHR content.

        Tests: http/tests/inspector/network/network-xhr-async.html
               http/tests/inspector/network/network-xhr-sync.html

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * fileapi/FileReaderLoader.cpp:
        (WebCore::FileReaderLoader::didReceiveResponse):
        * fileapi/FileReaderLoader.h:
        * inspector/Inspector.json:
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl):
        (WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl):
        (WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl):
        (WebCore::InspectorInstrumentation::didCommitLoadImpl):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didReceiveXHRResponse):
        (WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
        (WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
        * inspector/InspectorResourceAgent.cpp:
        (WebCore::InspectorResourceAgent::willSendRequest):
        (WebCore::InspectorResourceAgent::didReceiveResponse):
        (WebCore::InspectorResourceAgent::setInitialXHRContent):
        (WebCore::InspectorResourceAgent::didReceiveXHRResponse):
        (WebCore::InspectorResourceAgent::willLoadXHRSynchronously):
        (WebCore::InspectorResourceAgent::didLoadXHRSynchronously):
        (WebCore::InspectorResourceAgent::getResourceContent):
        (WebCore::InspectorResourceAgent::mainFrameNavigated):
        (WebCore::InspectorResourceAgent::InspectorResourceAgent):
        * inspector/InspectorResourceAgent.h:
        * inspector/NetworkResourcesData.cpp: Added.
        (WebCore::NetworkResourcesData::ResourceData::ResourceData):
        (WebCore::NetworkResourcesData::ResourceData::content):
        (WebCore::NetworkResourcesData::ResourceData::appendContent):
        (WebCore::NetworkResourcesData::ResourceData::purgeContent):
        (WebCore::NetworkResourcesData::NetworkResourcesData):
        (WebCore::NetworkResourcesData::~NetworkResourcesData):
        (WebCore::NetworkResourcesData::resourceCreated):
        (WebCore::NetworkResourcesData::responseReceived):
        (WebCore::NetworkResourcesData::didReceiveXHRResponse):
        (WebCore::NetworkResourcesData::addResourceContent):
        (WebCore::NetworkResourcesData::isXHR):
        (WebCore::NetworkResourcesData::data):
        (WebCore::NetworkResourcesData::clear):
        (WebCore::NetworkResourcesData::ensureNoDataForIdentifier):
        (WebCore::NetworkResourcesData::ensureFreeSpace):
        * inspector/NetworkResourcesData.h: Added.
        (WebCore::NetworkResourcesData::ResourceData::identifier):
        (WebCore::NetworkResourcesData::ResourceData::loaderId):
        (WebCore::NetworkResourcesData::ResourceData::frameId):
        (WebCore::NetworkResourcesData::ResourceData::setFrameId):
        (WebCore::NetworkResourcesData::ResourceData::url):
        (WebCore::NetworkResourcesData::ResourceData::setUrl):
        (WebCore::NetworkResourcesData::ResourceData::isXHR):
        (WebCore::NetworkResourcesData::ResourceData::setIsXHR):
        (WebCore::NetworkResourcesData::ResourceData::hasContent):
        (WebCore::NetworkResourcesData::ResourceData::isContentPurged):
        (WebCore::NetworkResourcesData::ResourceData::setIsContentPurged):
        * inspector/front-end/NetworkManager.js:
        (WebInspector.NetworkManager.prototype.requestContent):
        (WebInspector.NetworkDispatcher.prototype._appendRedirect):
        * inspector/front-end/NetworkPanel.js:
        (WebInspector.NetworkPanel.prototype._appendResource):
        (WebInspector.NetworkPanel.prototype._frameNavigated):
        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::didReceiveResponse):
        (WebCore::DocumentThreadableLoader::receivedCancellation):
        (WebCore::DocumentThreadableLoader::loadRequest):
        * loader/DocumentThreadableLoader.h:
        * loader/ThreadableLoaderClient.h:
        (WebCore::ThreadableLoaderClient::didReceiveResponse):
        (WebCore::ThreadableLoaderClient::didReceiveAuthenticationCancellation):
        * loader/ThreadableLoaderClientWrapper.h:
        (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse):
        (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation):
        * loader/WorkerThreadableLoader.cpp:
        (WebCore::workerContextDidReceiveResponse):
        (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
        (WebCore::workerContextDidReceiveAuthenticationCancellation):
        (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation):
        * loader/WorkerThreadableLoader.h:
        * notifications/Notification.cpp:
        (WebCore::Notification::didReceiveResponse):
        (WebCore::Notification::didReceiveAuthenticationCancellation):
        * notifications/Notification.h:
        * page/EventSource.cpp:
        (WebCore::EventSource::didReceiveResponse):
        * page/EventSource.h:
        * workers/WorkerScriptLoader.cpp:
        (WebCore::WorkerScriptLoader::didReceiveResponse):
        (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation):
        * workers/WorkerScriptLoader.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::createRequest):
        (WebCore::XMLHttpRequest::didReceiveResponse):
        (WebCore::XMLHttpRequest::didReceiveAuthenticationCancellation):
        * xml/XMLHttpRequest.h:
2011-06-16  Vsevolod Vlasov  <vsevik@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs.
        https://bugs.webkit.org/show_bug.cgi?id=61205

        Added inspector backend cache for XHR content.

        * src/AssociatedURLLoader.cpp:
        (WebKit::AssociatedURLLoader::ClientAdapter::didReceiveResponse):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
39 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/network-xhr-async-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-xhr-async.html [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-xhr-sync-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-xhr-sync.html [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/fileapi/FileReaderLoader.cpp
Source/WebCore/fileapi/FileReaderLoader.h
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.h
Source/WebCore/inspector/NetworkResourcesData.cpp [new file with mode: 0644]
Source/WebCore/inspector/NetworkResourcesData.h [new file with mode: 0644]
Source/WebCore/inspector/front-end/NetworkManager.js
Source/WebCore/inspector/front-end/NetworkPanel.js
Source/WebCore/loader/DocumentThreadableLoader.cpp
Source/WebCore/loader/DocumentThreadableLoader.h
Source/WebCore/loader/ThreadableLoaderClient.h
Source/WebCore/loader/ThreadableLoaderClientWrapper.h
Source/WebCore/loader/WorkerThreadableLoader.cpp
Source/WebCore/loader/WorkerThreadableLoader.h
Source/WebCore/notifications/Notification.cpp
Source/WebCore/notifications/Notification.h
Source/WebCore/page/EventSource.cpp
Source/WebCore/page/EventSource.h
Source/WebCore/workers/WorkerScriptLoader.cpp
Source/WebCore/workers/WorkerScriptLoader.h
Source/WebCore/xml/XMLHttpRequest.cpp
Source/WebCore/xml/XMLHttpRequest.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/AssociatedURLLoader.cpp