2009-11-26 Yury Semikhatsky <yurys@chromium.org>
authoryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Nov 2009 21:22:37 +0000 (21:22 +0000)
committeryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Nov 2009 21:22:37 +0000 (21:22 +0000)
        Not reviewed. Build fix: revert r51421.

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::willSendRequest):
        (WebCore::InspectorController::didReceiveResponse):
        (WebCore::InspectorController::didReceiveContentLength):
        (WebCore::InspectorController::didFinishLoading):
        (WebCore::InspectorController::didFailLoading):
        * inspector/InspectorController.h:
        * inspector/InspectorResource.cpp:
        (WebCore::InspectorResource::addLength):
        * loader/ResourceLoadNotifier.cpp:
        (WebCore::ResourceLoadNotifier::didFailToLoad):
        (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
        (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
        (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
        (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):

2009-11-26  Yury Semikhatsky  <yurys@chromium.org>

        Not reviewed. Build fix: revert r51421.

        * public/WebDevToolsAgent.h:
        * public/WebView.h:
        * src/WebViewImpl.cpp:
        * src/WebViewImpl.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51422 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/inspector/InspectorController.cpp
WebCore/inspector/InspectorController.h
WebCore/inspector/InspectorResource.cpp
WebCore/loader/ResourceLoadNotifier.cpp
WebKit/chromium/ChangeLog
WebKit/chromium/public/WebDevToolsAgent.h
WebKit/chromium/public/WebView.h
WebKit/chromium/src/WebViewImpl.cpp
WebKit/chromium/src/WebViewImpl.h

index 727085c57d0e87f61e248786a9933f32e1b9046c..983170be5ab131d61e9be5d5f8fe23d7527d1d70 100644 (file)
@@ -1,3 +1,23 @@
+2009-11-26  Yury Semikhatsky  <yurys@chromium.org>
+
+        Not reviewed. Build fix: revert r51421.
+
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::willSendRequest):
+        (WebCore::InspectorController::didReceiveResponse):
+        (WebCore::InspectorController::didReceiveContentLength):
+        (WebCore::InspectorController::didFinishLoading):
+        (WebCore::InspectorController::didFailLoading):
+        * inspector/InspectorController.h:
+        * inspector/InspectorResource.cpp:
+        (WebCore::InspectorResource::addLength):
+        * loader/ResourceLoadNotifier.cpp:
+        (WebCore::ResourceLoadNotifier::didFailToLoad):
+        (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
+        (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
+        (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
+        (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
+
 2009-11-26  Yury Semikhatsky  <yurys@chromium.org>
 
         Reviewed by Pavel Feldman.
index 1c1653c947d7ec020593ce66e4d89f9b23f35ebc..ddb13d2f8654f908b58cf88214ac0bc84e4f83f3 100644 (file)
@@ -939,11 +939,10 @@ bool InspectorController::isMainResourceLoader(DocumentLoader* loader, const KUR
     return loader->frame() == m_inspectedPage->mainFrame() && requestUrl == loader->requestURL();
 }
 
-void InspectorController::willSendRequest(unsigned long identifier, const ResourceRequest& request, const ResourceResponse& redirectResponse)
+void InspectorController::willSendRequest(DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse)
 {
-    bool isMainResource = (m_mainResource && m_mainResource->identifier() == identifier);
     if (m_timelineAgent)
-        m_timelineAgent->willSendResourceRequest(identifier, isMainResource, request);
+        m_timelineAgent->willSendResourceRequest(identifier, isMainResourceLoader(loader, request.url()), request);
 
     RefPtr<InspectorResource> resource = getTrackedResource(identifier);
     if (!resource)
@@ -960,7 +959,7 @@ void InspectorController::willSendRequest(unsigned long identifier, const Resour
         resource->createScriptObject(m_frontend.get());
 }
 
-void InspectorController::didReceiveResponse(unsigned long identifier, const ResourceResponse& response)
+void InspectorController::didReceiveResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse& response)
 {
     if (m_timelineAgent)
         m_timelineAgent->didReceiveResourceResponse(identifier, response);
@@ -976,7 +975,7 @@ void InspectorController::didReceiveResponse(unsigned long identifier, const Res
         resource->updateScriptObject(m_frontend.get());
 }
 
-void InspectorController::didReceiveContentLength(unsigned long identifier, int lengthReceived)
+void InspectorController::didReceiveContentLength(DocumentLoader*, unsigned long identifier, int lengthReceived)
 {
     RefPtr<InspectorResource> resource = getTrackedResource(identifier);
     if (!resource)
@@ -988,7 +987,7 @@ void InspectorController::didReceiveContentLength(unsigned long identifier, int
         resource->updateScriptObject(m_frontend.get());
 }
 
-void InspectorController::didFinishLoading(unsigned long identifier)
+void InspectorController::didFinishLoading(DocumentLoader*, unsigned long identifier)
 {
     if (m_timelineAgent)
         m_timelineAgent->didFinishLoadingResource(identifier, false);
@@ -1007,7 +1006,7 @@ void InspectorController::didFinishLoading(unsigned long identifier)
         resource->updateScriptObject(m_frontend.get());
 }
 
-void InspectorController::didFailLoading(unsigned long identifier, const ResourceError& /*error*/)
+void InspectorController::didFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError& /*error*/)
 {
     if (m_timelineAgent)
         m_timelineAgent->didFinishLoadingResource(identifier, true);
index c44ec2230d082cef2f8c3fbd5b33ce257730c231..22bd0765bd4de5d42d273b47aa6e0e6ed37332f2 100644 (file)
@@ -216,11 +216,11 @@ public:
     void didLoadResourceFromMemoryCache(DocumentLoader*, const CachedResource*);
 
     void identifierForInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&);
-    void willSendRequest(unsigned long identifier, const ResourceRequest&, const ResourceResponse& redirectResponse);
-    void didReceiveResponse(unsigned long identifier, const ResourceResponse&);
-    void didReceiveContentLength(unsigned long identifier, int lengthReceived);
-    void didFinishLoading(unsigned long identifier);
-    void didFailLoading(unsigned long identifier, const ResourceError&);
+    void willSendRequest(DocumentLoader*, unsigned long identifier, ResourceRequest&, const ResourceResponse& redirectResponse);
+    void didReceiveResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&);
+    void didReceiveContentLength(DocumentLoader*, unsigned long identifier, int lengthReceived);
+    void didFinishLoading(DocumentLoader*, unsigned long identifier);
+    void didFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError&);
     void resourceRetrievedByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString);
     void scriptImported(unsigned long identifier, const String& sourceString);
 
index 5818627d37b38a9734023ed0e1f6b9a565386fc7..381dfd56d509f52e3b09ca6de63216517eb3ddf2 100644 (file)
@@ -381,12 +381,6 @@ void InspectorResource::addLength(int lengthReceived)
 {
     m_length += lengthReceived;
     m_changes.set(LengthChange);
-
-    // Update load time, otherwise the resource will
-    // have start time == end time and  0 load duration
-    // until its loading is completed.
-    m_endTime = currentTime();
-    m_changes.set(TimingChange);
 }
 
 } // namespace WebCore
index 92804345b3dbdce65e2692b52cfc8aa36c8d754a..4cddd01c39abe21890211f33b80e2bfef1e4acac 100644 (file)
@@ -96,11 +96,6 @@ void ResourceLoadNotifier::didFailToLoad(ResourceLoader* loader, const ResourceE
 
     if (!error.isNull())
         m_frame->loader()->client()->dispatchDidFailLoading(loader->documentLoader(), loader->identifier(), error);
-
-#if ENABLE(INSPECTOR)
-    if (Page* page = m_frame->page())
-        page->inspectorController()->didFailLoading(loader->identifier(), error);
-#endif
 }
 
 void ResourceLoadNotifier::didLoadResourceByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString)
@@ -131,7 +126,7 @@ void ResourceLoadNotifier::dispatchWillSendRequest(DocumentLoader* loader, unsig
 
 #if ENABLE(INSPECTOR)
     if (Page* page = m_frame->page())
-        page->inspectorController()->willSendRequest(identifier, request, redirectResponse);
+        page->inspectorController()->willSendRequest(loader, identifier, request, redirectResponse);
 #endif
 }
 
@@ -141,7 +136,7 @@ void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, un
 
 #if ENABLE(INSPECTOR)
     if (Page* page = m_frame->page())
-        page->inspectorController()->didReceiveResponse(identifier, r);
+        page->inspectorController()->didReceiveResponse(loader, identifier, r);
 #endif
 }
 
@@ -151,7 +146,7 @@ void ResourceLoadNotifier::dispatchDidReceiveContentLength(DocumentLoader* loade
 
 #if ENABLE(INSPECTOR)
     if (Page* page = m_frame->page())
-        page->inspectorController()->didReceiveContentLength(identifier, length);
+        page->inspectorController()->didReceiveContentLength(loader, identifier, length);
 #endif
 }
 
@@ -161,7 +156,7 @@ void ResourceLoadNotifier::dispatchDidFinishLoading(DocumentLoader* loader, unsi
 
 #if ENABLE(INSPECTOR)
     if (Page* page = m_frame->page())
-        page->inspectorController()->didFinishLoading(identifier);
+        page->inspectorController()->didFinishLoading(loader, identifier);
 #endif
 }
 
index 87a2f05ac7ad9dd52cedb5386e1550b88fc8b0b2..0e7a2bc5ac83453f4e6da494b8a8363d23c9171e 100644 (file)
@@ -1,20 +1,10 @@
 2009-11-26  Yury Semikhatsky  <yurys@chromium.org>
 
-        Reviewed by Pavel Feldman.
-
-        WebCore part of the fix that allows to view plugin
-        resources loaded by plugins. Methods that for resource
-        loading notifications are exposed through WebDevToolsAgent
-        interface to the glue code to allow Chromium's plugin
-        implementation to notify InspectorController about resource
-        loading in plugins.
-
-        https://bugs.webkit.org/show_bug.cgi?id=31832
+        Not reviewed. Build fix: revert r51421.
 
         * public/WebDevToolsAgent.h:
         * public/WebView.h:
         * src/WebViewImpl.cpp:
-        (WebKit::WebViewImpl::createUniqueIdentifierForRequest):
         * src/WebViewImpl.h:
 
 2009-11-25  Dimitri Glazkov  <dglazkov@chromium.org>
index 4a44cb0de8ae09a699ccff50bdef4d515f93fe3e..cf4d7eafeddbedab68f235bc531f3def653ed747 100644 (file)
 
 namespace WebKit {
 class WebDevToolsAgentClient;
-class WebFrame;
 class WebString;
-class WebURLRequest;
-class WebURLResponse;
 class WebView;
 struct WebPoint;
-struct WebURLError;
 
 class WebDevToolsAgent {
 public:
@@ -74,13 +70,6 @@ public:
     // Installs dispatch handle that is going to be called periodically
     // while on a breakpoint.
     WEBKIT_API static void setMessageLoopDispatchHandler(MessageLoopDispatchHandler);
-
-    virtual void identifierForInitialRequest(unsigned long resourceId, WebFrame*, const WebURLRequest&) = 0;
-    virtual void willSendRequest(unsigned long resourceId, const WebURLRequest&) = 0;
-    virtual void didReceiveData(unsigned long resourceId, int length) = 0;
-    virtual void didReceiveResponse(unsigned long resourceId, const WebURLResponse&) = 0;
-    virtual void didFinishLoading(unsigned long resourceId) = 0;
-    virtual void didFailLoading(unsigned long resourceId, const WebURLError&) = 0;
 };
 
 } // namespace WebKit
index 29a3f9e209dde32505ff514d75ce93e95878d1a9..8261afc5a95ac7f488bd6fe38aeeff55088b6e2b 100644 (file)
@@ -191,13 +191,6 @@ public:
     virtual bool setDropEffect(bool accept) = 0;
 
 
-    // Support for resource loading initiated by plugins -------------------
-
-    // Returns next unused request identifier which is unique within the
-    // parent Page.
-    virtual unsigned long createUniqueIdentifierForRequest() = 0;
-
-
     // Developer tools -----------------------------------------------------
 
     // Inspect a particular point in the WebView.  (x = -1 || y = -1) is a
index 7914a9ee8f1069ebdce64298a2c6d504f250ca94..aaf717472c4d6317094183fe068686c610e6c187 100644 (file)
@@ -70,7 +70,6 @@
 #include "PluginInfoStore.h"
 #include "PopupMenuChromium.h"
 #include "PopupMenuClient.h"
-#include "ProgressTracker.h"
 #include "RenderView.h"
 #include "ResourceHandle.h"
 #include "SecurityOrigin.h"
@@ -1476,12 +1475,6 @@ int WebViewImpl::dragIdentity()
     return 0;
 }
 
-unsigned long WebViewImpl::createUniqueIdentifierForRequest() {
-    if (m_page)
-        return m_page->progress()->createUniqueIdentifier();
-    return 0;
-}
-
 void WebViewImpl::inspectElementAt(const WebPoint& point)
 {
     if (!m_page.get())
index 96227e3cf9f0b40e781e6c4843a2fe93675212e6..2b83a8e84bfd9b2db039414942d2f69cbf6d90f8 100644 (file)
@@ -143,7 +143,6 @@ public:
         const WebPoint& screenPoint);
     virtual int dragIdentity();
     virtual bool setDropEffect(bool accept);
-    virtual unsigned long createUniqueIdentifierForRequest();
     virtual void inspectElementAt(const WebPoint& point);
     virtual WebString inspectorSettings() const;
     virtual void setInspectorSettings(const WebString& settings);