Changeset 89027 in webkit
- Timestamp:
- Jun 16, 2011 8:27:59 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 deleted
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r89025 r89027 1 2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r89025. 4 http://trac.webkit.org/changeset/89025 5 https://bugs.webkit.org/show_bug.cgi?id=62799 6 7 "Some layout tests fail" (Requested by yurys on #webkit). 8 9 * http/tests/inspector/network/network-xhr-async-expected.txt: Removed. 10 * http/tests/inspector/network/network-xhr-async.html: Removed. 11 * http/tests/inspector/network/network-xhr-sync-expected.txt: Removed. 12 * http/tests/inspector/network/network-xhr-sync.html: Removed. 13 1 14 2011-06-16 Vsevolod Vlasov <vsevik@chromium.org> 2 15 -
trunk/Source/WebCore/CMakeLists.txt
r89025 r89027 886 886 inspector/InspectorValues.cpp 887 887 inspector/InspectorWorkerAgent.cpp 888 inspector/NetworkResourcesData.cpp889 888 inspector/PageDebuggerAgent.cpp 890 889 inspector/ScriptArguments.cpp -
trunk/Source/WebCore/ChangeLog
r89026 r89027 1 2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r89025. 4 http://trac.webkit.org/changeset/89025 5 https://bugs.webkit.org/show_bug.cgi?id=62799 6 7 "Some layout tests fail" (Requested by yurys on #webkit). 8 9 * CMakeLists.txt: 10 * GNUmakefile.list.am: 11 * WebCore.gypi: 12 * WebCore.pro: 13 * WebCore.vcproj/WebCore.vcproj: 14 * WebCore.xcodeproj/project.pbxproj: 15 * fileapi/FileReaderLoader.cpp: 16 (WebCore::FileReaderLoader::didReceiveResponse): 17 * fileapi/FileReaderLoader.h: 18 * inspector/Inspector.json: 19 * inspector/InspectorInstrumentation.cpp: 20 (WebCore::InspectorInstrumentation::didCommitLoadImpl): 21 * inspector/InspectorInstrumentation.h: 22 * inspector/InspectorResourceAgent.cpp: 23 (WebCore::InspectorResourceAgent::willSendRequest): 24 (WebCore::InspectorResourceAgent::didReceiveResponse): 25 (WebCore::InspectorResourceAgent::setInitialXHRContent): 26 (WebCore::InspectorResourceAgent::InspectorResourceAgent): 27 * inspector/InspectorResourceAgent.h: 28 * inspector/NetworkResourcesData.cpp: Removed. 29 * inspector/NetworkResourcesData.h: Removed. 30 * inspector/front-end/NetworkManager.js: 31 (WebInspector.NetworkManager.prototype.requestContent): 32 (WebInspector.NetworkDispatcher.prototype._appendRedirect): 33 * inspector/front-end/NetworkPanel.js: 34 (WebInspector.NetworkPanel.prototype._appendResource): 35 (WebInspector.NetworkPanel.prototype._frameNavigated): 36 * loader/DocumentThreadableLoader.cpp: 37 (WebCore::DocumentThreadableLoader::didReceiveResponse): 38 (WebCore::DocumentThreadableLoader::receivedCancellation): 39 (WebCore::DocumentThreadableLoader::loadRequest): 40 * loader/DocumentThreadableLoader.h: 41 * loader/ThreadableLoaderClient.h: 42 (WebCore::ThreadableLoaderClient::didReceiveResponse): 43 (WebCore::ThreadableLoaderClient::didReceiveAuthenticationCancellation): 44 * loader/ThreadableLoaderClientWrapper.h: 45 (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse): 46 (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation): 47 * loader/WorkerThreadableLoader.cpp: 48 (WebCore::workerContextDidReceiveResponse): 49 (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse): 50 (WebCore::workerContextDidReceiveAuthenticationCancellation): 51 (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation): 52 * loader/WorkerThreadableLoader.h: 53 * notifications/Notification.cpp: 54 (WebCore::Notification::didReceiveResponse): 55 (WebCore::Notification::didReceiveAuthenticationCancellation): 56 * notifications/Notification.h: 57 * page/EventSource.cpp: 58 (WebCore::EventSource::didReceiveResponse): 59 * page/EventSource.h: 60 * workers/WorkerScriptLoader.cpp: 61 (WebCore::WorkerScriptLoader::didReceiveResponse): 62 (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation): 63 * workers/WorkerScriptLoader.h: 64 * xml/XMLHttpRequest.cpp: 65 (WebCore::XMLHttpRequest::createRequest): 66 (WebCore::XMLHttpRequest::didReceiveResponse): 67 (WebCore::XMLHttpRequest::didReceiveAuthenticationCancellation): 68 * xml/XMLHttpRequest.h: 69 1 70 2011-06-16 Vitaly Repeshko <vitalyr@chromium.org> 2 71 -
trunk/Source/WebCore/GNUmakefile.list.am
r89025 r89027 2010 2010 Source/WebCore/inspector/InspectorWorkerResource.h \ 2011 2011 Source/WebCore/inspector/InstrumentingAgents.h \ 2012 Source/WebCore/inspector/NetworkResourcesData.cpp \2013 Source/WebCore/inspector/NetworkResourcesData.h \2014 2012 Source/WebCore/inspector/PageDebuggerAgent.cpp \ 2015 2013 Source/WebCore/inspector/PageDebuggerAgent.h \ -
trunk/Source/WebCore/WebCore.gypi
r89025 r89027 3316 3316 'inspector/InspectorWorkerAgent.h', 3317 3317 'inspector/InstrumentingAgents.h', 3318 'inspector/NetworkResourcesData.cpp',3319 'inspector/NetworkResourcesData.h',3320 3318 'inspector/PageDebuggerAgent.cpp', 3321 3319 'inspector/PageDebuggerAgent.h', -
trunk/Source/WebCore/WebCore.pro
r89025 r89027 840 840 inspector/InspectorValues.cpp \ 841 841 inspector/InspectorWorkerAgent.cpp \ 842 inspector/NetworkResourcesData.cpp \843 842 inspector/PageDebuggerAgent.cpp \ 844 843 inspector/ScriptArguments.cpp \ … … 1790 1789 inspector/InspectorWorkerAgent.h \ 1791 1790 inspector/InstrumentingAgents.h \ 1792 inspector/NetworkResourcesData.h \1793 1791 inspector/PageDebuggerAgent.h \ 1794 1792 inspector/ScriptGCEventListener.h \ -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r89025 r89027 67715 67715 </File> 67716 67716 <File 67717 RelativePath="..\inspector\NetworkResourcesData.cpp"67718 >67719 </File>67720 <File67721 RelativePath="..\inspector\NetworkResourcesData.h"67722 >67723 </File>67724 <File67725 67717 RelativePath="..\inspector\PageDebuggerAgent.cpp" 67726 67718 > -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r89025 r89027 1450 1450 59B5977511086579007159E8 /* BridgeJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59B5977411086579007159E8 /* BridgeJSC.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1451 1451 59BC393F11054A1300FD85DB /* JavaStringJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59BC393E11054A1300FD85DB /* JavaStringJSC.h */; }; 1452 59C27F05138D28C10079B7E2 /* NetworkResourcesData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59C27F04138D28C10079B7E2 /* NetworkResourcesData.cpp */; };1453 59C27F07138D28CF0079B7E2 /* NetworkResourcesData.h in Headers */ = {isa = PBXBuildFile; fileRef = 59C27F06138D28CF0079B7E2 /* NetworkResourcesData.h */; };1454 1452 59D1C10411EB5DCF00B638C8 /* DeviceOrientation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59D1C10311EB5DCF00B638C8 /* DeviceOrientation.cpp */; }; 1455 1453 59E560A71105336600AA1258 /* JavaClassJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59E560A61105336600AA1258 /* JavaClassJSC.h */; }; … … 7935 7933 59B5977411086579007159E8 /* BridgeJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BridgeJSC.h; path = bridge/jsc/BridgeJSC.h; sourceTree = "<group>"; }; 7936 7934 59BC393E11054A1300FD85DB /* JavaStringJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaStringJSC.h; path = jsc/JavaStringJSC.h; sourceTree = "<group>"; }; 7937 59C27F04138D28C10079B7E2 /* NetworkResourcesData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkResourcesData.cpp; sourceTree = "<group>"; };7938 59C27F06138D28CF0079B7E2 /* NetworkResourcesData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkResourcesData.h; sourceTree = "<group>"; };7939 7935 59D1C10311EB5DCF00B638C8 /* DeviceOrientation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeviceOrientation.cpp; sourceTree = "<group>"; }; 7940 7936 59E560A61105336600AA1258 /* JavaClassJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaClassJSC.h; path = jsc/JavaClassJSC.h; sourceTree = "<group>"; }; … … 13306 13302 1C81BA050E97348300266E07 /* JavaScriptCallFrame.idl */, 13307 13303 BCC64F5F0DCFB84E0081EF3B /* localizedStrings.js */, 13308 59C27F04138D28C10079B7E2 /* NetworkResourcesData.cpp */,13309 59C27F06138D28CF0079B7E2 /* NetworkResourcesData.h */,13310 13304 F34742DA134362F000531BC2 /* PageDebuggerAgent.cpp */, 13311 13305 F34742DB134362F000531BC2 /* PageDebuggerAgent.h */, … … 21955 21949 656D37430ADBA5DE00A4554D /* NetscapePlugInStreamLoader.h in Headers */, 21956 21950 628D214C12131ED10055DCFC /* NetworkingContext.h in Headers */, 21957 59C27F07138D28CF0079B7E2 /* NetworkResourcesData.h in Headers */,21958 21951 1A7FA6190DDA3B3A0028F8A5 /* NetworkStateNotifier.h in Headers */, 21959 21952 BCEF43DD0E674012001C1287 /* NinePieceImage.h in Headers */, … … 24909 24902 E12719CA0EEEC21300F61213 /* NavigatorBase.cpp in Sources */, 24910 24903 5D874F130D161D3200796C3B /* NetscapePlugInStreamLoader.cpp in Sources */, 24911 59C27F05138D28C10079B7E2 /* NetworkResourcesData.cpp in Sources */,24912 24904 1A7FA61B0DDA3BBE0028F8A5 /* NetworkStateNotifier.cpp in Sources */, 24913 24905 1A7FA6490DDA3CBA0028F8A5 /* NetworkStateNotifierMac.cpp in Sources */, -
trunk/Source/WebCore/fileapi/FileReaderLoader.cpp
r89025 r89027 124 124 } 125 125 126 void FileReaderLoader::didReceiveResponse( unsigned long,const ResourceResponse& response)126 void FileReaderLoader::didReceiveResponse(const ResourceResponse& response) 127 127 { 128 128 if (response.httpStatusCode() != 200) { -
trunk/Source/WebCore/fileapi/FileReaderLoader.h
r89025 r89027 67 67 68 68 // ThreadableLoaderClient 69 virtual void didReceiveResponse( unsigned long,const ResourceResponse&);69 virtual void didReceiveResponse(const ResourceResponse&); 70 70 virtual void didReceiveData(const char*, int); 71 71 virtual void didFinishLoading(unsigned long, double); -
trunk/Source/WebCore/inspector/Inspector.json
r89025 r89027 486 486 { "name": "enabled", "type": "boolean" } 487 487 ] 488 },489 {490 "name": "getResourceContent",491 "description": "Returns content of the given resource.",492 "parameters": [493 { "name": "identifier", "type": "integer", "description": "Identifier of the resource to get content for." },494 { "name": "base64Encode", "type": "boolean", "optional": true, "description": "Requests that resource content is served as base64." }495 ],496 "returns": [497 { "name": "content", "type": "string", "description": "Resource content." }498 ]499 488 } 500 489 ], … … 572 561 { 573 562 "name": "initialContentSet", 574 "description": "Fired for worker scripts when their content becomes available.",563 "description": "Fired for XMLHttpRequests when their content becomes available.", 575 564 "parameters": [ 576 565 { "name": "identifier", "type": "integer", "description": "Request identifier." }, -
trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp
r89025 r89027 517 517 } 518 518 519 void InspectorInstrumentation::didReceiveXHRResponseImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier)520 {521 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())522 resourceAgent->didReceiveXHRResponse(identifier);523 }524 525 void InspectorInstrumentation::willLoadXHRSynchronouslyImpl(InstrumentingAgents* instrumentingAgents)526 {527 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())528 resourceAgent->willLoadXHRSynchronously();529 }530 531 void InspectorInstrumentation::didLoadXHRSynchronouslyImpl(InstrumentingAgents* instrumentingAgents)532 {533 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())534 resourceAgent->didLoadXHRSynchronously();535 }536 537 519 void InspectorInstrumentation::scriptImportedImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const String& sourceString) 538 520 { … … 596 578 if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent()) 597 579 consoleAgent->reset(); 598 599 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())600 resourceAgent->mainFrameNavigated(loader);601 602 580 #if ENABLE(JAVASCRIPT_DEBUGGER) 603 581 if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent()) { -
trunk/Source/WebCore/inspector/InspectorInstrumentation.h
r89025 r89027 129 129 static void didFailLoading(Frame*, unsigned long identifier, const ResourceError&); 130 130 static void resourceRetrievedByXMLHttpRequest(ScriptExecutionContext*, unsigned long identifier, const String& sourceString, const String& url, const String& sendURL, unsigned sendLineNumber); 131 static void didReceiveXHRResponse(ScriptExecutionContext*, unsigned long identifier);132 static void willLoadXHRSynchronously(ScriptExecutionContext*);133 static void didLoadXHRSynchronously(ScriptExecutionContext*);134 131 static void scriptImported(ScriptExecutionContext*, unsigned long identifier, const String& sourceString); 135 132 static void domContentLoadedEventFired(Frame*, const KURL&); … … 257 254 static void didFailLoadingImpl(InstrumentingAgents*, unsigned long identifier, const ResourceError&); 258 255 static void resourceRetrievedByXMLHttpRequestImpl(InstrumentingAgents*, unsigned long identifier, const String& sourceString, const String& url, const String& sendURL, unsigned sendLineNumber); 259 static void didReceiveXHRResponseImpl(InstrumentingAgents*, unsigned long identifier);260 static void willLoadXHRSynchronouslyImpl(InstrumentingAgents*);261 static void didLoadXHRSynchronouslyImpl(InstrumentingAgents*);262 256 static void scriptImportedImpl(InstrumentingAgents*, unsigned long identifier, const String& sourceString); 263 257 static void domContentLoadedEventFiredImpl(InstrumentingAgents*, Frame*, const KURL&); … … 784 778 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context)) 785 779 resourceRetrievedByXMLHttpRequestImpl(instrumentingAgents, identifier, sourceString, url, sendURL, sendLineNumber); 786 #endif787 }788 789 inline void InspectorInstrumentation::didReceiveXHRResponse(ScriptExecutionContext* context, unsigned long identifier)790 {791 #if ENABLE(INSPECTOR)792 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))793 didReceiveXHRResponseImpl(instrumentingAgents, identifier);794 #endif795 }796 797 inline void InspectorInstrumentation::willLoadXHRSynchronously(ScriptExecutionContext* context)798 {799 #if ENABLE(INSPECTOR)800 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))801 willLoadXHRSynchronouslyImpl(instrumentingAgents);802 #endif803 }804 805 inline void InspectorInstrumentation::didLoadXHRSynchronously(ScriptExecutionContext* context)806 {807 #if ENABLE(INSPECTOR)808 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))809 didLoadXHRSynchronouslyImpl(instrumentingAgents);810 780 #endif 811 781 } -
trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp
r89025 r89027 49 49 #include "InstrumentingAgents.h" 50 50 #include "KURL.h" 51 #include "NetworkResourcesData.h"52 51 #include "ProgressTracker.h" 53 52 #include "ResourceError.h" … … 196 195 void InspectorResourceAgent::willSendRequest(unsigned long identifier, DocumentLoader* loader, ResourceRequest& request, const ResourceResponse& redirectResponse) 197 196 { 198 m_resourcesData->resourceCreated(identifier, m_pageAgent->loaderId(loader));199 200 197 RefPtr<InspectorObject> headers = m_state->getObject(ResourceAgentState::extraRequestHeaders); 201 198 … … 245 242 else if (equalIgnoringFragmentIdentifier(response.url(), loader->url()) && type == InspectorPageAgent::OtherResource) 246 243 type = InspectorPageAgent::DocumentResource; 247 else if (m_loadingXHRSynchronously || m_resourcesData->isXHR(identifier)) 248 type = InspectorPageAgent::XHRResource; 249 250 m_resourcesData->responseReceived(identifier, m_pageAgent->frameId(loader->frame()), response.url()); 251 } 252 244 } 253 245 m_frontend->responseReceived(static_cast<int>(identifier), currentTime(), InspectorPageAgent::resourceTypeString(type), resourceResponse); 254 246 // If we revalidated the resource and got Not modified, send content length following didReceiveResponse … … 288 280 void InspectorResourceAgent::setInitialXHRContent(unsigned long identifier, const String& sourceString) 289 281 { 290 m_resourcesData->addResourceContent(identifier, sourceString); 291 } 292 293 void InspectorResourceAgent::didReceiveXHRResponse(unsigned long identifier) 294 { 295 m_resourcesData->didReceiveXHRResponse(identifier); 296 } 297 298 void InspectorResourceAgent::willLoadXHRSynchronously() 299 { 300 m_loadingXHRSynchronously = true; 301 } 302 303 void InspectorResourceAgent::didLoadXHRSynchronously() 304 { 305 m_loadingXHRSynchronously = false; 282 m_frontend->initialContentSet(static_cast<int>(identifier), sourceString, InspectorPageAgent::resourceTypeString(InspectorPageAgent::XHRResource)); 306 283 } 307 284 … … 426 403 } 427 404 428 void InspectorResourceAgent::getResourceContent(ErrorString* errorString, unsigned long identifier, const bool* const optionalBase64Encode, String* content)429 {430 NetworkResourcesData::ResourceData* resourceData = m_resourcesData->data(identifier);431 if (!resourceData) {432 *errorString = "No resource with given identifier found";433 return;434 }435 436 if (resourceData->hasContent())437 *content = resourceData->content();438 else if (!resourceData->frameId().isNull() && !resourceData->url().isNull())439 m_pageAgent->getResourceContent(errorString, resourceData->frameId(), resourceData->url(), optionalBase64Encode, content);440 else441 *errorString = "No data found for resource with given identifier";442 }443 444 void InspectorResourceAgent::mainFrameNavigated(DocumentLoader* loader)445 {446 m_resourcesData->clear(m_pageAgent->loaderId(loader));447 }448 449 405 InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorState* state) 450 406 : m_instrumentingAgents(instrumentingAgents) 451 407 , m_pageAgent(pageAgent) 452 408 , m_state(state) 453 , m_resourcesData(adoptPtr(new NetworkResourcesData()))454 , m_loadingXHRSynchronously(false)455 409 { 456 410 if (isBackgroundEventsCollectionEnabled()) { -
trunk/Source/WebCore/inspector/InspectorResourceAgent.h
r89025 r89027 35 35 #include "PlatformString.h" 36 36 37 #include <wtf/OwnPtr.h> 37 38 #include <wtf/PassRefPtr.h> 38 39 #include <wtf/Vector.h> … … 49 50 class Document; 50 51 class DocumentLoader; 51 class EventsCollector;52 52 class Frame; 53 53 class InspectorArray; … … 59 59 class InstrumentingAgents; 60 60 class KURL; 61 class NetworkResourcesData;61 class EventsCollector; 62 62 class Page; 63 63 class ResourceError; … … 95 95 void didFailLoading(unsigned long identifier, const ResourceError&); 96 96 void didLoadResourceFromMemoryCache(DocumentLoader*, const CachedResource*); 97 void mainFrameNavigated(DocumentLoader*);98 97 void setInitialScriptContent(unsigned long identifier, const String& sourceString); 99 98 void setInitialXHRContent(unsigned long identifier, const String& sourceString); 100 void didReceiveXHRResponse(unsigned long identifier);101 void willLoadXHRSynchronously();102 void didLoadXHRSynchronously();103 104 99 void applyUserAgentOverride(String* userAgent); 105 100 … … 119 114 void setUserAgentOverride(ErrorString*, const String& userAgent); 120 115 void setExtraHeaders(ErrorString*, PassRefPtr<InspectorObject>); 121 void getResourceContent(ErrorString*, unsigned long identifier, const bool* const base64Encode, String* content); 122 void clearCache(ErrorString*, const String* const optionalPreservedLoaderId); 116 123 117 124 118 private: … … 137 131 OwnPtr<InspectorFrontend::Network> m_mockFrontend; 138 132 String m_userAgentOverride; 139 OwnPtr<NetworkResourcesData> m_resourcesData;140 bool m_loadingXHRSynchronously;141 133 }; 142 134 -
trunk/Source/WebCore/inspector/front-end/NetworkManager.js
r89025 r89027 49 49 callback(!error ? content : null); 50 50 } 51 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=61363 We should separate NetworkResource (NetworkPanel resource) 52 // from ResourceRevision (ResourcesPanel/ScriptsPanel resource) and request content accordingly. 53 if (resource.identifier) 54 NetworkAgent.getResourceContent(resource.identifier, base64Encode, callbackWrapper); 55 else 56 PageAgent.getResourceContent(resource.frameId, resource.url, base64Encode, callbackWrapper); 51 PageAgent.getResourceContent(resource.frameId, resource.url, base64Encode, callbackWrapper); 57 52 }, 58 53 … … 269 264 var originalResource = this._inflightResourcesById[identifier]; 270 265 var previousRedirects = originalResource.redirects || []; 271 delete originalResource.identifier;266 originalResource.identifier = "redirected:" + identifier + "." + previousRedirects.length; 272 267 delete originalResource.redirects; 273 268 this._finishResource(originalResource, time); -
trunk/Source/WebCore/inspector/front-end/NetworkPanel.js
r89025 r89027 742 742 { 743 743 this._resources.push(resource); 744 if (resource.identifier) 745 this._resourcesById[resource.identifier] = resource; 744 this._resourcesById[resource.identifier] = resource; 746 745 this._resourcesByURL[resource.url] = resource; 747 746 … … 780 779 var loaderId = event.data.loaderId; 781 780 // Main frame committed load. 782 if (this._preserveLogToggle.toggled) { 783 for (var i = 0; i < this._resources.length; ++i) { 784 var resource = this._resources[i]; 785 if (resource.loaderId !== loaderId) 786 resource.identifier = null; 787 } 781 if (this._preserveLogToggle.toggled) 788 782 return; 789 }790 783 791 784 // Preserve provisional load resources. -
trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp
r89025 r89027 172 172 void DocumentThreadableLoader::didReceiveResponse(SubresourceLoader* loader, const ResourceResponse& response) 173 173 { 174 ASSERT(loader == m_loader); 175 didReceiveResponse(loader->identifier(), response); 176 } 177 178 void DocumentThreadableLoader::didReceiveResponse(unsigned long identifier, const ResourceResponse& response) 179 { 180 ASSERT(m_client); 174 ASSERT(m_client); 175 ASSERT_UNUSED(loader, loader == m_loader); 181 176 182 177 String accessControlErrorDescription; … … 204 199 } 205 200 206 m_client->didReceiveResponse( identifier,response);201 m_client->didReceiveResponse(response); 207 202 } 208 203 } … … 291 286 ASSERT(m_client); 292 287 ASSERT_UNUSED(loader, loader == m_loader); 293 m_client->didReceiveAuthenticationCancellation( loader->identifier(),challenge.failureResponse());288 m_client->didReceiveAuthenticationCancellation(challenge.failureResponse()); 294 289 } 295 290 … … 357 352 } 358 353 359 didReceiveResponse( identifier, response);354 didReceiveResponse(0, response); 360 355 361 356 const char* bytes = static_cast<const char*>(data.data()); -
trunk/Source/WebCore/loader/DocumentThreadableLoader.h
r89025 r89027 87 87 virtual void receivedCancellation(SubresourceLoader*, const AuthenticationChallenge&); 88 88 89 void didReceiveResponse(unsigned long identifier, const ResourceResponse&);90 89 void didFinishLoading(unsigned long identifier, double finishTime); 91 90 void makeSimpleCrossOriginAccessRequest(const ResourceRequest& request); -
trunk/Source/WebCore/loader/ThreadableLoaderClient.h
r89025 r89027 43 43 virtual void didSendData(unsigned long long /*bytesSent*/, unsigned long long /*totalBytesToBeSent*/) { } 44 44 45 virtual void didReceiveResponse( unsigned long /*identifier*/,const ResourceResponse&) { }45 virtual void didReceiveResponse(const ResourceResponse&) { } 46 46 virtual void didReceiveData(const char*, int /*dataLength*/) { } 47 47 virtual void didReceiveCachedMetadata(const char*, int /*dataLength*/) { } … … 50 50 virtual void didFailRedirectCheck() { } 51 51 52 virtual void didReceiveAuthenticationCancellation( unsigned long /*identifier*/,const ResourceResponse&) { }52 virtual void didReceiveAuthenticationCancellation(const ResourceResponse&) { } 53 53 54 54 virtual bool isDocumentThreadableLoaderClient() { return false; } -
trunk/Source/WebCore/loader/ThreadableLoaderClientWrapper.h
r89025 r89027 63 63 } 64 64 65 void didReceiveResponse( unsigned long identifier,const ResourceResponse& response)65 void didReceiveResponse(const ResourceResponse& response) 66 66 { 67 67 if (m_client) 68 m_client->didReceiveResponse( identifier,response);68 m_client->didReceiveResponse(response); 69 69 } 70 70 … … 102 102 } 103 103 104 void didReceiveAuthenticationCancellation( unsigned long identifier,const ResourceResponse& response)104 void didReceiveAuthenticationCancellation(const ResourceResponse& response) 105 105 { 106 106 if (m_client) 107 m_client->didReceiveResponse( identifier,response);107 m_client->didReceiveResponse(response); 108 108 } 109 109 -
trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp
r89025 r89027 178 178 } 179 179 180 static void workerContextDidReceiveResponse(ScriptExecutionContext* context, RefPtr<ThreadableLoaderClientWrapper> workerClientWrapper, unsigned long identifier,PassOwnPtr<CrossThreadResourceResponseData> responseData)180 static void workerContextDidReceiveResponse(ScriptExecutionContext* context, RefPtr<ThreadableLoaderClientWrapper> workerClientWrapper, PassOwnPtr<CrossThreadResourceResponseData> responseData) 181 181 { 182 182 ASSERT_UNUSED(context, context->isWorkerContext()); 183 183 OwnPtr<ResourceResponse> response(ResourceResponse::adopt(responseData)); 184 workerClientWrapper->didReceiveResponse( identifier,*response);185 } 186 187 void WorkerThreadableLoader::MainThreadBridge::didReceiveResponse( unsigned long identifier,const ResourceResponse& response)188 { 189 m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidReceiveResponse, m_workerClientWrapper, identifier,response), m_taskMode);184 workerClientWrapper->didReceiveResponse(*response); 185 } 186 187 void WorkerThreadableLoader::MainThreadBridge::didReceiveResponse(const ResourceResponse& response) 188 { 189 m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidReceiveResponse, m_workerClientWrapper, response), m_taskMode); 190 190 } 191 191 … … 249 249 } 250 250 251 static void workerContextDidReceiveAuthenticationCancellation(ScriptExecutionContext* context, RefPtr<ThreadableLoaderClientWrapper> workerClientWrapper, unsigned long identifier,PassOwnPtr<CrossThreadResourceResponseData> responseData)251 static void workerContextDidReceiveAuthenticationCancellation(ScriptExecutionContext* context, RefPtr<ThreadableLoaderClientWrapper> workerClientWrapper, PassOwnPtr<CrossThreadResourceResponseData> responseData) 252 252 { 253 253 ASSERT_UNUSED(context, context->isWorkerContext()); 254 254 OwnPtr<ResourceResponse> response(ResourceResponse::adopt(responseData)); 255 workerClientWrapper->didReceiveAuthenticationCancellation( identifier,*response);256 } 257 258 void WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation( unsigned long identifier,const ResourceResponse& response)259 { 260 m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidReceiveAuthenticationCancellation, m_workerClientWrapper, identifier,response), m_taskMode);255 workerClientWrapper->didReceiveAuthenticationCancellation(*response); 256 } 257 258 void WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation(const ResourceResponse& response) 259 { 260 m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidReceiveAuthenticationCancellation, m_workerClientWrapper, response), m_taskMode); 261 261 } 262 262 -
trunk/Source/WebCore/loader/WorkerThreadableLoader.h
r89025 r89027 114 114 static void mainThreadCancel(ScriptExecutionContext*, MainThreadBridge*); 115 115 virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent); 116 virtual void didReceiveResponse( unsigned long identifier,const ResourceResponse&);116 virtual void didReceiveResponse(const ResourceResponse&); 117 117 virtual void didReceiveData(const char*, int dataLength); 118 118 virtual void didReceiveCachedMetadata(const char*, int dataLength); … … 120 120 virtual void didFail(const ResourceError&); 121 121 virtual void didFailRedirectCheck(); 122 virtual void didReceiveAuthenticationCancellation( unsigned long identifier,const ResourceResponse&);122 virtual void didReceiveAuthenticationCancellation(const ResourceResponse&); 123 123 124 124 // Only to be used on the main thread. -
trunk/Source/WebCore/notifications/Notification.cpp
r89025 r89027 182 182 } 183 183 184 void Notification::didReceiveResponse( unsigned long,const ResourceResponse& response)184 void Notification::didReceiveResponse(const ResourceResponse& response) 185 185 { 186 186 int status = response.httpStatusCode(); … … 212 212 } 213 213 214 void Notification::didReceiveAuthenticationCancellation( unsigned long,const ResourceResponse&)214 void Notification::didReceiveAuthenticationCancellation(const ResourceResponse&) 215 215 { 216 216 finishLoading(); -
trunk/Source/WebCore/notifications/Notification.h
r89025 r89027 103 103 void detachPresenter() { } 104 104 105 virtual void didReceiveResponse( unsigned long,const ResourceResponse&);105 virtual void didReceiveResponse(const ResourceResponse&); 106 106 virtual void didReceiveData(const char* data, int dataLength); 107 107 virtual void didFinishLoading(unsigned long identifier, double finishTime); 108 108 virtual void didFail(const ResourceError&); 109 109 virtual void didFailRedirectCheck(); 110 virtual void didReceiveAuthenticationCancellation( unsigned long,const ResourceResponse&);110 virtual void didReceiveAuthenticationCancellation(const ResourceResponse&); 111 111 112 112 private: -
trunk/Source/WebCore/page/EventSource.cpp
r89025 r89027 182 182 } 183 183 184 void EventSource::didReceiveResponse( unsigned long,const ResourceResponse& response)184 void EventSource::didReceiveResponse(const ResourceResponse& response) 185 185 { 186 186 int statusCode = response.httpStatusCode(); -
trunk/Source/WebCore/page/EventSource.h
r89025 r89027 91 91 virtual EventTargetData* ensureEventTargetData(); 92 92 93 virtual void didReceiveResponse( unsigned long,const ResourceResponse&);93 virtual void didReceiveResponse(const ResourceResponse&); 94 94 virtual void didReceiveData(const char*, int); 95 95 virtual void didFinishLoading(unsigned long, double); -
trunk/Source/WebCore/workers/WorkerScriptLoader.cpp
r89025 r89027 112 112 } 113 113 114 void WorkerScriptLoader::didReceiveResponse( unsigned long /*identifier*/,const ResourceResponse& response)114 void WorkerScriptLoader::didReceiveResponse(const ResourceResponse& response) 115 115 { 116 116 if (response.httpStatusCode() / 100 != 2 && response.httpStatusCode()) { … … 169 169 } 170 170 171 void WorkerScriptLoader::didReceiveAuthenticationCancellation( unsigned long /*identifier*/,const ResourceResponse&)171 void WorkerScriptLoader::didReceiveAuthenticationCancellation(const ResourceResponse&) 172 172 { 173 173 notifyError(); -
trunk/Source/WebCore/workers/WorkerScriptLoader.h
r89025 r89027 67 67 unsigned long identifier() const { return m_identifier; } 68 68 69 virtual void didReceiveResponse( unsigned long /*identifier*/,const ResourceResponse&);69 virtual void didReceiveResponse(const ResourceResponse&); 70 70 virtual void didReceiveData(const char* data, int dataLength); 71 71 virtual void didFinishLoading(unsigned long identifier, double); 72 72 virtual void didFail(const ResourceError&); 73 73 virtual void didFailRedirectCheck(); 74 virtual void didReceiveAuthenticationCancellation( unsigned long /*identifier*/,const ResourceResponse&);74 virtual void didReceiveAuthenticationCancellation(const ResourceResponse&); 75 75 76 76 private: -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r89025 r89027 673 673 setPendingActivity(this); 674 674 } 675 } else { 676 InspectorInstrumentation::willLoadXHRSynchronously(scriptExecutionContext()); 675 } else 677 676 ThreadableLoader::loadResourceSynchronously(scriptExecutionContext(), request, *this, options); 678 InspectorInstrumentation::didLoadXHRSynchronously(scriptExecutionContext());679 }680 677 681 678 if (!m_exceptionCode && m_error) … … 1036 1033 } 1037 1034 1038 void XMLHttpRequest::didReceiveResponse(unsigned long identifier, const ResourceResponse& response) 1039 { 1040 InspectorInstrumentation::didReceiveXHRResponse(scriptExecutionContext(), identifier); 1041 1035 void XMLHttpRequest::didReceiveResponse(const ResourceResponse& response) 1036 { 1042 1037 m_response = response; 1043 1038 m_responseEncoding = extractCharsetFromMediaType(m_mimeTypeOverride); … … 1046 1041 } 1047 1042 1048 void XMLHttpRequest::didReceiveAuthenticationCancellation( unsigned long,const ResourceResponse& failureResponse)1043 void XMLHttpRequest::didReceiveAuthenticationCancellation(const ResourceResponse& failureResponse) 1049 1044 { 1050 1045 m_response = failureResponse; -
trunk/Source/WebCore/xml/XMLHttpRequest.h
r89025 r89027 151 151 152 152 virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent); 153 virtual void didReceiveResponse( unsigned long identifier,const ResourceResponse&);153 virtual void didReceiveResponse(const ResourceResponse&); 154 154 virtual void didReceiveData(const char* data, int dataLength); 155 155 virtual void didFinishLoading(unsigned long identifier, double finishTime); 156 156 virtual void didFail(const ResourceError&); 157 157 virtual void didFailRedirectCheck(); 158 virtual void didReceiveAuthenticationCancellation( unsigned long identifier,const ResourceResponse&);158 virtual void didReceiveAuthenticationCancellation(const ResourceResponse&); 159 159 160 160 String responseMIMEType() const; -
trunk/Source/WebKit/chromium/ChangeLog
r89026 r89027 1 2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r89025. 4 http://trac.webkit.org/changeset/89025 5 https://bugs.webkit.org/show_bug.cgi?id=62799 6 7 "Some layout tests fail" (Requested by yurys on #webkit). 8 9 * src/AssociatedURLLoader.cpp: 10 (WebKit::AssociatedURLLoader::ClientAdapter::didReceiveResponse): 11 1 12 2011-06-16 Vitaly Repeshko <vitalyr@chromium.org> 2 13 -
trunk/Source/WebKit/chromium/src/AssociatedURLLoader.cpp
r89025 r89027 61 61 virtual void willSendRequest(ResourceRequest& /*newRequest*/, const ResourceResponse& /*redirectResponse*/); 62 62 63 virtual void didReceiveResponse( unsigned long,const ResourceResponse&);63 virtual void didReceiveResponse(const ResourceResponse&); 64 64 virtual void didReceiveData(const char*, int /*dataLength*/); 65 65 virtual void didReceiveCachedMetadata(const char*, int /*dataLength*/); … … 114 114 } 115 115 116 void AssociatedURLLoader::ClientAdapter::didReceiveResponse( unsigned long,const ResourceResponse& response)116 void AssociatedURLLoader::ClientAdapter::didReceiveResponse(const ResourceResponse& response) 117 117 { 118 118 WrappedResourceResponse wrappedResponse(response);
Note: See TracChangeset
for help on using the changeset viewer.