[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 15:27:51 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b1de55aac102b8fa7981d54d33d536506a3305dc
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 4 02:13:28 2010 +0000

    2010-11-03  Jenn Braithwaite  <jennb at 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 at 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:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71297 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index cf3ded4..5e8e4c9 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,18 @@
+2010-11-03  Jenn Braithwaite  <jennb at 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  Adam Barth  <abarth at webkit.org>
 
         Roll Chromium DEPs
diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h
index c5cfc21..9063350 100644
--- a/WebKit/chromium/public/WebFrameClient.h
+++ b/WebKit/chromium/public/WebFrameClient.h
@@ -240,6 +240,10 @@ public:
     virtual void assignIdentifierToRequest(
         WebFrame*, unsigned identifier, const WebURLRequest&) { }
 
+     // Remove the association between an identifier assigned to a request if
+     // the client keeps such an association.
+     virtual void removeIdentifierForRequest(unsigned identifier) { }
+
     // A request is about to be sent out, and the client may modify it.  Request
     // is writable, and changes to the URL, for example, will change the request
     // made.  If this request is the result of a redirect, then redirectResponse
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 29141ac..af5b684 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -1389,9 +1389,13 @@ void FrameLoaderClientImpl::didTransferChildFrameToNewDocument(Page*)
     m_webFrame->setClient(newParent->client());
 }
 
-void FrameLoaderClientImpl::transferLoadingResourceFromPage(unsigned long, DocumentLoader*, const ResourceRequest&, Page*)
+void FrameLoaderClientImpl::transferLoadingResourceFromPage(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request, Page* oldPage)
 {
-    notImplemented();
+    assignIdentifierToInitialRequest(identifier, loader, request);
+
+    WebFrameImpl* oldWebFrame = WebFrameImpl::fromFrame(oldPage->mainFrame());
+    if (oldWebFrame && oldWebFrame->client())
+        oldWebFrame->client()->removeIdentifierForRequest(identifier);
 }
 
 PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 86d2770..de917e4 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2010-11-03  Jenn Braithwaite  <jennb at 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:
+
 2010-11-03  Victor Wang  <victorw at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
index 847e7dc..2f9bdfb 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -940,11 +940,16 @@ void WebViewHost::didChangeLocationWithinPage(WebFrame* frame)
 
 void WebViewHost::assignIdentifierToRequest(WebFrame*, unsigned identifier, const WebURLRequest& request)
 {
-    if (!m_shell->shouldDumpResourceLoadCallbacks())
-        return;
+    ASSERT(!m_resourceIdentifierMap.contains(identifier));
     m_resourceIdentifierMap.set(identifier, descriptionSuitableForTestResult(request.url().spec()));
 }
 
+void WebViewHost::removeIdentifierForRequest(unsigned identifier)
+{
+    ASSERT(m_resourceIdentifierMap.contains(identifier));
+    m_resourceIdentifierMap.remove(identifier);
+}
+
 void WebViewHost::willSendRequest(WebFrame*, unsigned identifier, WebURLRequest& request, const WebURLResponse& redirectResponse)
 {
     // Need to use GURL for host() and SchemeIs()
@@ -1022,7 +1027,7 @@ void WebViewHost::didFinishResourceLoad(WebFrame*, unsigned identifier)
         printResourceDescription(identifier);
         fputs(" - didFinishLoading\n", stdout);
     }
-    m_resourceIdentifierMap.remove(identifier);
+    removeIdentifierForRequest(identifier);
 }
 
 void WebViewHost::didFailResourceLoad(WebFrame*, unsigned identifier, const WebURLError& error)
@@ -1033,7 +1038,7 @@ void WebViewHost::didFailResourceLoad(WebFrame*, unsigned identifier, const WebU
         fputs(webkit_support::MakeURLErrorDescription(error).c_str(), stdout);
         fputs("\n", stdout);
     }
-    m_resourceIdentifierMap.remove(identifier);
+    removeIdentifierForRequest(identifier);
 }
 
 void WebViewHost::didDisplayInsecureContent(WebFrame*)
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
index 1380ebd..f21e663 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
@@ -185,6 +185,7 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
     virtual void didNavigateWithinPage(WebKit::WebFrame*, bool isNewNavigation);
     virtual void didChangeLocationWithinPage(WebKit::WebFrame*);
     virtual void assignIdentifierToRequest(WebKit::WebFrame*, unsigned identifier, const WebKit::WebURLRequest&);
+    virtual void removeIdentifierForRequest(unsigned identifier);
     virtual void willSendRequest(WebKit::WebFrame*, unsigned identifier, WebKit::WebURLRequest&, const WebKit::WebURLResponse&);
     virtual void didReceiveResponse(WebKit::WebFrame*, unsigned identifier, const WebKit::WebURLResponse&);
     virtual void didFinishResourceLoad(WebKit::WebFrame*, unsigned identifier);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list