Changeset 71297 in webkit


Ignore:
Timestamp:
Nov 3, 2010 7:13:28 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-11-03 Jenn Braithwaite <jennb@chromium.org>

Reviewed by Dmitry Titov.

Chromium: Update resource tracking when moving a frame between documents
https://bugs.webkit.org/show_bug.cgi?id=48363

  • public/WebFrameClient.h: (WebKit::WebFrameClient::removeIdentifierForRequest): Added
  • src/FrameLoaderClientImpl.cpp: (WebKit::FrameLoaderClientImpl::transferLoadingResourceFromPage): Notify current WebFrameClient of the resource and remove from former WebFrameClient.

2010-11-03 Jenn Braithwaite <jennb@chromium.org>

Reviewed by Dmitry Titov.

Chromium: Update resource tracking when moving a frame between documents
https://bugs.webkit.org/show_bug.cgi?id=48363

  • DumpRenderTree/chromium/WebViewHost.cpp: (WebViewHost::assignIdentifierToRequest): Always put resource id in map so we can make assumptions about its presence. (WebViewHost::removeIdentifierForRequest): Added. (WebViewHost::didFinishResourceLoad): (WebViewHost::didFailResourceLoad): Check existence of resource id before removing from map.
  • DumpRenderTree/chromium/WebViewHost.h:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/chromium/ChangeLog

    r71279 r71297  
     12010-11-03  Jenn Braithwaite  <jennb@chromium.org>
     2
     3        Reviewed by Dmitry Titov.
     4
     5        Chromium: Update resource tracking when moving a frame between documents
     6        https://bugs.webkit.org/show_bug.cgi?id=48363
     7
     8        * public/WebFrameClient.h:
     9        (WebKit::WebFrameClient::removeIdentifierForRequest):
     10        Added
     11        * src/FrameLoaderClientImpl.cpp:
     12        (WebKit::FrameLoaderClientImpl::transferLoadingResourceFromPage):
     13        Notify current WebFrameClient of the resource and remove from
     14        former WebFrameClient.
     15
    1162010-11-03  Adam Barth  <abarth@webkit.org>
    217
  • trunk/WebKit/chromium/public/WebFrameClient.h

    r70796 r71297  
    241241        WebFrame*, unsigned identifier, const WebURLRequest&) { }
    242242
     243     // Remove the association between an identifier assigned to a request if
     244     // the client keeps such an association.
     245     virtual void removeIdentifierForRequest(unsigned identifier) { }
     246
    243247    // A request is about to be sent out, and the client may modify it.  Request
    244248    // is writable, and changes to the URL, for example, will change the request
  • trunk/WebKit/chromium/src/FrameLoaderClientImpl.cpp

    r70894 r71297  
    13901390}
    13911391
    1392 void FrameLoaderClientImpl::transferLoadingResourceFromPage(unsigned long, DocumentLoader*, const ResourceRequest&, Page*)
    1393 {
    1394     notImplemented();
     1392void FrameLoaderClientImpl::transferLoadingResourceFromPage(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request, Page* oldPage)
     1393{
     1394    assignIdentifierToInitialRequest(identifier, loader, request);
     1395
     1396    WebFrameImpl* oldWebFrame = WebFrameImpl::fromFrame(oldPage->mainFrame());
     1397    if (oldWebFrame && oldWebFrame->client())
     1398        oldWebFrame->client()->removeIdentifierForRequest(identifier);
    13951399}
    13961400
  • trunk/WebKitTools/ChangeLog

    r71283 r71297  
     12010-11-03  Jenn Braithwaite  <jennb@chromium.org>
     2
     3        Reviewed by Dmitry Titov.
     4
     5        Chromium: Update resource tracking when moving a frame between documents
     6        https://bugs.webkit.org/show_bug.cgi?id=48363
     7
     8        * DumpRenderTree/chromium/WebViewHost.cpp:
     9        (WebViewHost::assignIdentifierToRequest):
     10        Always put resource id in map so we can make assumptions about its
     11        presence.
     12        (WebViewHost::removeIdentifierForRequest):
     13        Added.
     14        (WebViewHost::didFinishResourceLoad):
     15        (WebViewHost::didFailResourceLoad):
     16        Check existence of resource id before removing from map.
     17        * DumpRenderTree/chromium/WebViewHost.h:
     18
    1192010-11-03  Victor Wang  <victorw@chromium.org>
    220
  • trunk/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp

    r70796 r71297  
    941941void WebViewHost::assignIdentifierToRequest(WebFrame*, unsigned identifier, const WebURLRequest& request)
    942942{
    943     if (!m_shell->shouldDumpResourceLoadCallbacks())
    944         return;
     943    ASSERT(!m_resourceIdentifierMap.contains(identifier));
    945944    m_resourceIdentifierMap.set(identifier, descriptionSuitableForTestResult(request.url().spec()));
     945}
     946
     947void WebViewHost::removeIdentifierForRequest(unsigned identifier)
     948{
     949    ASSERT(m_resourceIdentifierMap.contains(identifier));
     950    m_resourceIdentifierMap.remove(identifier);
    946951}
    947952
     
    10231028        fputs(" - didFinishLoading\n", stdout);
    10241029    }
    1025     m_resourceIdentifierMap.remove(identifier);
     1030    removeIdentifierForRequest(identifier);
    10261031}
    10271032
     
    10341039        fputs("\n", stdout);
    10351040    }
    1036     m_resourceIdentifierMap.remove(identifier);
     1041    removeIdentifierForRequest(identifier);
    10371042}
    10381043
  • trunk/WebKitTools/DumpRenderTree/chromium/WebViewHost.h

    r70796 r71297  
    186186    virtual void didChangeLocationWithinPage(WebKit::WebFrame*);
    187187    virtual void assignIdentifierToRequest(WebKit::WebFrame*, unsigned identifier, const WebKit::WebURLRequest&);
     188    virtual void removeIdentifierForRequest(unsigned identifier);
    188189    virtual void willSendRequest(WebKit::WebFrame*, unsigned identifier, WebKit::WebURLRequest&, const WebKit::WebURLResponse&);
    189190    virtual void didReceiveResponse(WebKit::WebFrame*, unsigned identifier, const WebKit::WebURLResponse&);
Note: See TracChangeset for help on using the changeset viewer.