Commit 8ac9b855 authored by dglazkov@chromium.org's avatar dglazkov@chromium.org

WebCore:

2009-05-01  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.
        This is the only resource-related information that is available in InspectorController
        and is missing in the FrameLoaderClient.

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

        * WebCore.xcodeproj/project.pbxproj: Made ScriptSource private.
        * dom/Document.cpp: Made a call to a client along with the call to the InspectorController.
        (WebCore::Document::resourceRetrievedByXMLHttpRequest):
        * loader/EmptyClients.h: Added stub implementation.
        (WebCore::EmptyFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest):
        * loader/FrameLoader.cpp: Call initiating dispatches.
        (WebCore::FrameLoader::resourceRetrievedByXMLHttpRequest):
        * loader/FrameLoader.h:
        * loader/FrameLoaderClient.h:

WebKit/gtk:

2009-05-01  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.

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

        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        (WebKit::FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest):
        * WebCoreSupport/FrameLoaderClientGtk.h:

WebKit/mac:

2009-05-01  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.

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

        * WebCoreSupport/WebFrameLoaderClient.h:
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest):

WebKit/qt:

2009-05-01  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.

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

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::dispatchDidLoadResourceByXMLHttpRequest):
        * WebCoreSupport/FrameLoaderClientQt.h:

WebKit/win:

2009-05-01  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.

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

        * WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest):
        * WebCoreSupport/WebFrameLoaderClient.h:

WebKit/wx:

2009-05-01  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.

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

        * WebKitSupport/FrameLoaderClientWx.cpp:
        (WebCore::FrameLoaderClientWx::dispatchDidLoadResourceByXMLHttpRequest):
        * WebKitSupport/FrameLoaderClientWx.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 411c3fb6
2009-05-01 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.
This is the only resource-related information that is available in InspectorController
and is missing in the FrameLoaderClient.
https://bugs.webkit.org/show_bug.cgi?id=25347
* WebCore.xcodeproj/project.pbxproj: Made ScriptSource private.
* dom/Document.cpp: Made a call to a client along with the call to the InspectorController.
(WebCore::Document::resourceRetrievedByXMLHttpRequest):
* loader/EmptyClients.h: Added stub implementation.
(WebCore::EmptyFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest):
* loader/FrameLoader.cpp: Call initiating dispatches.
(WebCore::FrameLoader::resourceRetrievedByXMLHttpRequest):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
2009-04-30 Beth Dakin <bdakin@apple.com>
Reviewed by Oliver Hunt.
......@@ -629,7 +629,7 @@
416E75BF0EDF8FD700360E1D /* ScriptCallStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 416E75BD0EDF8FD700360E1D /* ScriptCallStack.cpp */; };
416E75CB0EDF90C700360E1D /* ScriptCallFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 416E75C90EDF90C700360E1D /* ScriptCallFrame.h */; };
416E75CC0EDF90C700360E1D /* ScriptCallFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 416E75CA0EDF90C700360E1D /* ScriptCallFrame.cpp */; };
416F45F00ED7B311008215B6 /* ScriptString.h in Headers */ = {isa = PBXBuildFile; fileRef = 416F45EF0ED7B311008215B6 /* ScriptString.h */; };
416F45F00ED7B311008215B6 /* ScriptString.h in Headers */ = {isa = PBXBuildFile; fileRef = 416F45EF0ED7B311008215B6 /* ScriptString.h */; settings = {ATTRIBUTES = (Private, ); }; };
419536510F68222400D0C679 /* ScriptObjectQuarantine.h in Headers */ = {isa = PBXBuildFile; fileRef = 419536500F68222400D0C679 /* ScriptObjectQuarantine.h */; };
41C760B10EDE03D300C1655F /* ScriptState.h in Headers */ = {isa = PBXBuildFile; fileRef = 41C760B00EDE03D300C1655F /* ScriptState.h */; settings = {ATTRIBUTES = (Private, ); }; };
41D015CA0F4B5C71004A662F /* ContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 41D015C80F4B5C71004A662F /* ContentType.h */; };
......@@ -4304,6 +4304,11 @@ void Document::resourceRetrievedByXMLHttpRequest(unsigned long identifier, const
{
if (page())
page()->inspectorController()->resourceRetrievedByXMLHttpRequest(identifier, sourceString);
Frame* frame = this->frame();
if (frame) {
FrameLoader* frameLoader = frame->loader();
frameLoader->didLoadResourceByXMLHttpRequest(identifier, sourceString);
}
}
void Document::scriptImported(unsigned long identifier, const String& sourceString)
......
......@@ -166,6 +166,7 @@ public:
virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long) { }
virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long, const ResourceError&) { }
virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int) { return false; }
virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&) { }
virtual void dispatchDidHandleOnloadEvents() { }
virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() { }
......
......@@ -81,6 +81,7 @@
#include "ResourceRequest.h"
#include "ScriptController.h"
#include "ScriptSourceCode.h"
#include "ScriptString.h"
#include "ScriptValue.h"
#include "SecurityOrigin.h"
#include "SegmentedString.h"
......@@ -3760,6 +3761,11 @@ void FrameLoader::didFailToLoad(ResourceLoader* loader, const ResourceError& err
m_client->dispatchDidFailLoading(loader->documentLoader(), loader->identifier(), error);
}
void FrameLoader::didLoadResourceByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString)
{
m_client->dispatchDidLoadResourceByXMLHttpRequest(identifier, sourceString);
}
const ResourceRequest& FrameLoader::originalRequest() const
{
return activeDocumentLoader()->originalRequestCopy();
......
......@@ -62,6 +62,7 @@ namespace WebCore {
class ResourceLoader;
class ResourceResponse;
class ScriptSourceCode;
class ScriptString;
class ScriptValue;
class SecurityOrigin;
class SharedBuffer;
......@@ -182,6 +183,7 @@ namespace WebCore {
void didReceiveData(ResourceLoader*, const char*, int, int lengthReceived);
void didFinishLoad(ResourceLoader*);
void didFailToLoad(ResourceLoader*, const ResourceError&);
void didLoadResourceByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString);
const ResourceRequest& originalRequest() const;
const ResourceRequest& initialRequest() const;
void receivedMainResourceError(const ResourceError&, bool isComplete);
......
......@@ -64,6 +64,7 @@ namespace WebCore {
class ResourceLoader;
struct ResourceRequest;
class ResourceResponse;
class ScriptString;
class SharedBuffer;
class SubstituteData;
class String;
......@@ -105,6 +106,7 @@ namespace WebCore {
virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier) = 0;
virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError&) = 0;
virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length) = 0;
virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const ScriptString&) = 0;
virtual void dispatchDidHandleOnloadEvents() = 0;
virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() = 0;
......
2009-05-01 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.
https://bugs.webkit.org/show_bug.cgi?id=25347
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest):
* WebCoreSupport/FrameLoaderClientGtk.h:
2009-04-30 David Kilzer <ddkilzer@apple.com>
Provide a mechanism to create a quirks delegate for HTMLParser
......
......@@ -822,6 +822,11 @@ void FrameLoaderClient::dispatchDidFailLoading(DocumentLoader*, unsigned long id
}
bool FrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length)
void FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&)
{
notImplemented();
}
{
notImplemented();
return false;
......
......@@ -69,6 +69,7 @@ namespace WebKit {
virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier);
virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&);
virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int length);
virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const WebCore::ScriptString&);
virtual void dispatchDidHandleOnloadEvents();
virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
......
2009-05-01 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.
https://bugs.webkit.org/show_bug.cgi?id=25347
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest):
2009-04-30 David Kilzer <ddkilzer@apple.com>
Provide a mechanism to create a quirks delegate for HTMLParser
......
......@@ -122,6 +122,7 @@ private:
virtual void revertToProvisionalState(WebCore::DocumentLoader*);
virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int length);
virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString&);
virtual void willChangeEstimatedProgress();
virtual void didChangeEstimatedProgress();
......
......@@ -104,6 +104,7 @@
#import <WebCore/ResourceLoader.h>
#import <WebCore/ResourceRequest.h>
#import <WebCore/ScriptController.h>
#import <WebCore/ScriptString.h>
#import <WebCore/SharedBuffer.h>
#import <WebCore/WebCoreObjCExtras.h>
#import <WebCore/Widget.h>
......@@ -335,6 +336,10 @@ bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader
return true;
}
void WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString)
{
}
void WebFrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request)
{
WebView *webView = getWebView(m_webFrame.get());
......
2009-05-01 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.
https://bugs.webkit.org/show_bug.cgi?id=25347
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::dispatchDidLoadResourceByXMLHttpRequest):
* WebCoreSupport/FrameLoaderClientQt.h:
2009-04-30 David Kilzer <ddkilzer@apple.com>
Provide a mechanism to create a quirks delegate for HTMLParser
......
......@@ -54,6 +54,7 @@
#include "ResourceHandleInternal.h"
#include "ResourceHandle.h"
#include "Settings.h"
#include "ScriptString.h"
#include "qwebpage.h"
#include "qwebframe.h"
......@@ -851,6 +852,11 @@ bool FrameLoaderClientQt::dispatchDidLoadResourceFromMemoryCache(WebCore::Docume
return false;
}
void FrameLoaderClientQt::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const WebCore::ScriptString&)
{
notImplemented();
}
void FrameLoaderClientQt::dispatchDidFailProvisionalLoad(const WebCore::ResourceError&)
{
if (dumpFrameLoaderCallbacks)
......
......@@ -98,6 +98,7 @@ namespace WebCore {
virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long);
virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long, const WebCore::ResourceError&);
virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int);
virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString& sourceString);
virtual void dispatchDidHandleOnloadEvents();
virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
......
2009-05-01 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.
https://bugs.webkit.org/show_bug.cgi?id=25347
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest):
* WebCoreSupport/WebFrameLoaderClient.h:
2009-04-30 David Kilzer <ddkilzer@apple.com>
Provide a mechanism to create a quirks delegate for HTMLParser
......
......@@ -64,6 +64,7 @@
#include <WebCore/PluginView.h>
#include <WebCore/RenderPart.h>
#include <WebCore/ResourceHandle.h>
#include <WebCore/ScriptString.h>
#pragma warning(pop)
using namespace WebCore;
......@@ -225,6 +226,10 @@ void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader* loader, unsign
resourceLoadDelegate->didFailLoadingWithError(webView, identifier, webError.get(), getWebDataSource(loader));
}
void WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&)
{
}
bool WebFrameLoaderClient::shouldCacheResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& response, const unsigned char* data, const unsigned long long length)
{
WebView* webView = m_webFrame->webView();
......
......@@ -56,6 +56,7 @@ public:
virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived);
virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier);
virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&);
virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString&);
virtual bool shouldCacheResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&, const unsigned char* data, unsigned long long length);
virtual void dispatchDidHandleOnloadEvents();
......
2009-05-01 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.
https://bugs.webkit.org/show_bug.cgi?id=25347
* WebKitSupport/FrameLoaderClientWx.cpp:
(WebCore::FrameLoaderClientWx::dispatchDidLoadResourceByXMLHttpRequest):
* WebKitSupport/FrameLoaderClientWx.h:
2009-04-30 Kevin Ollivier <kevino@theolliviers.com>
wx build fix, remove references to JSCore shared library.
......
......@@ -47,6 +47,7 @@
#include "ResourceError.h"
#include "ResourceResponse.h"
#include "ScriptController.h"
#include "ScriptString.h"
#include <stdio.h>
......@@ -665,6 +666,11 @@ bool FrameLoaderClientWx::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*
return false;
}
void FrameLoaderClientWx::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&)
{
notImplemented();
}
void FrameLoaderClientWx::dispatchDidFailProvisionalLoad(const ResourceError&)
{
notImplemented();
......
......@@ -172,8 +172,9 @@ namespace WebCore {
virtual void dispatchDidReceiveContentLength(DocumentLoader*, unsigned long, int);
virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long);
virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long, const ResourceError&);
virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int);
virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&);
virtual void dispatchDidFailProvisionalLoad(const ResourceError&);
virtual void dispatchDidFailLoad(const ResourceError&);
virtual Frame* dispatchCreatePage();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment