Changeset 81183 in webkit


Ignore:
Timestamp:
Mar 15, 2011 3:31:33 PM (13 years ago)
Author:
Michael Nordman
Message:

2011-03-15 Michael Nordman <Michael Nordman>

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):
Location:
trunk/Source/WebKit/chromium
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r81175 r81183  
     12011-03-15  Michael Nordman  <michaeln@google.com>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        When initiating a main resource load, let the application cache
     6        know which frame the load is being conducted for. This patch doesn't
     7        resolve the following bug, but the additional WebFrame parameter
     8        should provide the chromium port with enough info to pick the
     9        "most appropiate" cached resource.
     10        https://bugs.webkit.org/show_bug.cgi?id=55505
     11
     12        Also fixup a stale comment in stopLoadingInFrame.
     13
     14        * public/WebApplicationCacheHost.h:
     15        (WebKit::WebApplicationCacheHost::willStartMainResourceRequest):
     16        * src/ApplicationCacheHost.cpp:
     17        (WebCore::ApplicationCacheHost::maybeLoadMainResource):
     18        (WebCore::ApplicationCacheHost::stopLoadingInFrame):
     19
    1202011-03-15  Tony Chang  <tony@chromium.org>
    221
  • trunk/Source/WebKit/chromium/public/WebApplicationCacheHost.h

    r63440 r81183  
    3939
    4040class WebApplicationCacheHostClient;
     41class WebFrame;
    4142class WebURL;
    4243class WebURLRequest;
     
    7475
    7576    // Called for every request made within the context.
    76     virtual void willStartMainResourceRequest(WebURLRequest&) { }
     77    virtual void willStartMainResourceRequest(WebURLRequest& r, const WebFrame*) { willStartMainResourceRequest(r); }
    7778    virtual void willStartSubResourceRequest(WebURLRequest&) { }
     79
     80    virtual void willStartMainResourceRequest(WebURLRequest&) { } // DEPRECATED, remove after derived classes have caught up.
    7881
    7982    // One or the other selectCache methods is called after having parsed the <html> tag.
  • trunk/Source/WebKit/chromium/src/ApplicationCacheHost.cpp

    r75604 r81183  
    4343#include "ProgressEvent.h"
    4444#include "Settings.h"
     45#include "WebFrameImpl.h"
    4546#include "WebURL.h"
    4647#include "WebURLError.h"
     
    8283    if (m_internal->m_outerHost) {
    8384        WrappedResourceRequest wrapped(request);
    84         m_internal->m_outerHost->willStartMainResourceRequest(wrapped);
     85        m_internal->m_outerHost->willStartMainResourceRequest(wrapped, WebFrameImpl::fromFrame(m_documentLoader->frame()));
    8586    } else
    8687        m_internal.clear();
     
    260261void ApplicationCacheHost::stopLoadingInFrame(Frame* frame)
    261262{
    262     // FIXME: Implement this method.
     263    // N/A to the chromium port
    263264}
    264265
Note: See TracChangeset for help on using the changeset viewer.