Commit a6ca2db6 authored by michaeln@google.com's avatar michaeln@google.com

2011-03-15 Michael Nordman <michaeln@google.com>

        Reviewed by Alexey Proskuryakov.

        When initiating a main resource load, let the application cache
        know which frame the load is being conducted for. This patch doesn't
        resolve the following bug, but the additional WebFrame parameter
        should provide the chromium port with enough info to pick the
        "most appropiate" cached resource.
        https://bugs.webkit.org/show_bug.cgi?id=55505

        Also fixup a stale comment in stopLoadingInFrame.

        * public/WebApplicationCacheHost.h:
        (WebKit::WebApplicationCacheHost::willStartMainResourceRequest):
        * src/ApplicationCacheHost.cpp:
        (WebCore::ApplicationCacheHost::maybeLoadMainResource):
        (WebCore::ApplicationCacheHost::stopLoadingInFrame):

git-svn-id: svn://svn.chromium.org/blink/trunk@81183 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent dc4ce462
2011-03-15 Michael Nordman <michaeln@google.com>
Reviewed by Alexey Proskuryakov.
When initiating a main resource load, let the application cache
know which frame the load is being conducted for. This patch doesn't
resolve the following bug, but the additional WebFrame parameter
should provide the chromium port with enough info to pick the
"most appropiate" cached resource.
https://bugs.webkit.org/show_bug.cgi?id=55505
Also fixup a stale comment in stopLoadingInFrame.
* public/WebApplicationCacheHost.h:
(WebKit::WebApplicationCacheHost::willStartMainResourceRequest):
* src/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadMainResource):
(WebCore::ApplicationCacheHost::stopLoadingInFrame):
2011-03-15 Tony Chang <tony@chromium.org>
Reviewed by Adam Barth.
......
......@@ -38,6 +38,7 @@
namespace WebKit {
class WebApplicationCacheHostClient;
class WebFrame;
class WebURL;
class WebURLRequest;
class WebURLResponse;
......@@ -73,9 +74,11 @@ public:
virtual ~WebApplicationCacheHost() { }
// Called for every request made within the context.
virtual void willStartMainResourceRequest(WebURLRequest&) { }
virtual void willStartMainResourceRequest(WebURLRequest& r, const WebFrame*) { willStartMainResourceRequest(r); }
virtual void willStartSubResourceRequest(WebURLRequest&) { }
virtual void willStartMainResourceRequest(WebURLRequest&) { } // DEPRECATED, remove after derived classes have caught up.
// One or the other selectCache methods is called after having parsed the <html> tag.
// The latter returns false if the current document has been identified as a "foreign"
// entry, in which case the frame navigation will be restarted by webkit.
......
......@@ -42,6 +42,7 @@
#include "Page.h"
#include "ProgressEvent.h"
#include "Settings.h"
#include "WebFrameImpl.h"
#include "WebURL.h"
#include "WebURLError.h"
#include "WebURLResponse.h"
......@@ -81,7 +82,7 @@ void ApplicationCacheHost::maybeLoadMainResource(ResourceRequest& request, Subst
m_internal.set(new ApplicationCacheHostInternal(this));
if (m_internal->m_outerHost) {
WrappedResourceRequest wrapped(request);
m_internal->m_outerHost->willStartMainResourceRequest(wrapped);
m_internal->m_outerHost->willStartMainResourceRequest(wrapped, WebFrameImpl::fromFrame(m_documentLoader->frame()));
} else
m_internal.clear();
......@@ -259,7 +260,7 @@ void ApplicationCacheHost::stopDeferringEvents()
void ApplicationCacheHost::stopLoadingInFrame(Frame* frame)
{
// FIXME: Implement this method.
// N/A to the chromium port
}
void ApplicationCacheHost::dispatchDOMEvent(EventID id, int total, int done)
......
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