[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
eric at webkit.org
eric at webkit.org
Tue Jan 5 23:46:55 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 42772865d62993a34740b51d80849d0462d1de5b
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 10 23:33:23 2009 +0000
2009-12-10 Mike Belshe <mike at belshe.com>
Reviewed by Darin Fisher.
Fix FrameLoader to use the new ResourceTypes properly.
https://bugs.webkit.org/show_bug.cgi?id=32336
* public/WebURLRequest.h:
(WebKit::WebURLRequest::):
* src/FrameLoaderClientImpl.cpp:
(WebKit::setTargetTypeFromLoader):
(WebKit::FrameLoaderClientImpl::dispatchWillSendRequest):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index d95d06c..5c22d6f 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,17 @@
+2009-12-10 Mike Belshe <mike at belshe.com>
+
+ Reviewed by Darin Fisher.
+
+ Fix FrameLoader to use the new ResourceTypes properly.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32336
+
+ * public/WebURLRequest.h:
+ (WebKit::WebURLRequest::):
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::setTargetTypeFromLoader):
+ (WebKit::FrameLoaderClientImpl::dispatchWillSendRequest):
+
2009-12-10 Ilya Tikhonovsky <loislo at google.com>
Reviewed by Pavel Feldman.
diff --git a/WebKit/chromium/public/WebURLRequest.h b/WebKit/chromium/public/WebURLRequest.h
index de3d329..41443b4 100644
--- a/WebKit/chromium/public/WebURLRequest.h
+++ b/WebKit/chromium/public/WebURLRequest.h
@@ -57,11 +57,17 @@ public:
};
enum TargetType {
- TargetIsMainFrame,
- TargetIsSubFrame,
- TargetIsSubResource,
- TargetIsObject,
- TargetIsMedia
+ TargetIsMainFrame = 0,
+ TargetIsSubFrame = 1, // Temporary for backward compatibility.
+ TargetIsSubframe = 1,
+ TargetIsSubResource = 2, // Temporary for backward comptibility.
+ TargetIsSubresource = 2,
+ TargetIsStyleSheet = 3,
+ TargetIsScript = 4,
+ TargetIsFontResource = 5,
+ TargetIsImage = 6,
+ TargetIsObject = 7,
+ TargetIsMedia = 8
};
~WebURLRequest() { reset(); }
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 2943bd7..c5f85be 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -237,8 +237,8 @@ void FrameLoaderClientImpl::assignIdentifierToInitialRequest(
}
}
-// Determines whether the request being loaded by |loader| is a frame or a
-// subresource. A subresource in this context is anything other than a frame --
+// If the request being loaded by |loader| is a frame, update the ResourceType.
+// A subresource in this context is anything other than a frame --
// this includes images and xmlhttp requests. It is important to note that a
// subresource is NOT limited to stuff loaded through the frame's subresource
// loader. Synchronous xmlhttp requests for example, do not go through the
@@ -246,14 +246,16 @@ void FrameLoaderClientImpl::assignIdentifierToInitialRequest(
//
// The important edge cases to consider when modifying this function are
// how synchronous resource loads are treated during load/unload threshold.
-static ResourceRequest::TargetType determineTargetTypeFromLoader(DocumentLoader* loader)
+static void setTargetTypeFromLoader(ResourceRequest& request, DocumentLoader* loader)
{
if (loader == loader->frameLoader()->provisionalDocumentLoader()) {
+ ResourceRequest::TargetType type;
if (loader->frameLoader()->isLoadingMainFrame())
- return ResourceRequest::TargetIsMainFrame;
- return ResourceRequest::TargetIsSubframe;
+ type = ResourceRequest::TargetIsMainFrame;
+ else
+ type = ResourceRequest::TargetIsSubframe;
+ request.setTargetType(type);
}
- return ResourceRequest::TargetIsSubresource;
}
void FrameLoaderClientImpl::dispatchWillSendRequest(
@@ -263,7 +265,7 @@ void FrameLoaderClientImpl::dispatchWillSendRequest(
if (loader) {
// We want to distinguish between a request for a document to be loaded into
// the main frame, a sub-frame, or the sub-objects in that document.
- request.setTargetType(determineTargetTypeFromLoader(loader));
+ setTargetTypeFromLoader(request, loader));
// Avoid repeating a form submission when navigating back or forward.
if (loader == loader->frameLoader()->provisionalDocumentLoader()
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list