Changeset 51967 in webkit
- Timestamp:
- Dec 10, 2009 3:33:23 PM (14 years ago)
- Location:
- trunk/WebKit/chromium
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/chromium/ChangeLog
r51949 r51967 1 2009-12-10 Mike Belshe <mike@belshe.com> 2 3 Reviewed by Darin Fisher. 4 5 Fix FrameLoader to use the new ResourceTypes properly. 6 7 https://bugs.webkit.org/show_bug.cgi?id=32336 8 9 * public/WebURLRequest.h: 10 (WebKit::WebURLRequest::): 11 * src/FrameLoaderClientImpl.cpp: 12 (WebKit::setTargetTypeFromLoader): 13 (WebKit::FrameLoaderClientImpl::dispatchWillSendRequest): 14 1 15 2009-12-10 Ilya Tikhonovsky <loislo@google.com> 2 16 -
trunk/WebKit/chromium/public/WebURLRequest.h
r50697 r51967 58 58 59 59 enum TargetType { 60 TargetIsMainFrame, 61 TargetIsSubFrame, 62 TargetIsSubResource, 63 TargetIsObject, 64 TargetIsMedia 60 TargetIsMainFrame = 0, 61 TargetIsSubFrame = 1, // Temporary for backward compatibility. 62 TargetIsSubframe = 1, 63 TargetIsSubResource = 2, // Temporary for backward comptibility. 64 TargetIsSubresource = 2, 65 TargetIsStyleSheet = 3, 66 TargetIsScript = 4, 67 TargetIsFontResource = 5, 68 TargetIsImage = 6, 69 TargetIsObject = 7, 70 TargetIsMedia = 8 65 71 }; 66 72 -
trunk/WebKit/chromium/src/FrameLoaderClientImpl.cpp
r51917 r51967 238 238 } 239 239 240 // Determines whether the request being loaded by |loader| is a frame or a241 // subresource.A subresource in this context is anything other than a frame --240 // If the request being loaded by |loader| is a frame, update the ResourceType. 241 // A subresource in this context is anything other than a frame -- 242 242 // this includes images and xmlhttp requests. It is important to note that a 243 243 // subresource is NOT limited to stuff loaded through the frame's subresource … … 247 247 // The important edge cases to consider when modifying this function are 248 248 // how synchronous resource loads are treated during load/unload threshold. 249 static ResourceRequest::TargetType determineTargetTypeFromLoader(DocumentLoader* loader)249 static void setTargetTypeFromLoader(ResourceRequest& request, DocumentLoader* loader) 250 250 { 251 251 if (loader == loader->frameLoader()->provisionalDocumentLoader()) { 252 ResourceRequest::TargetType type; 252 253 if (loader->frameLoader()->isLoadingMainFrame()) 253 return ResourceRequest::TargetIsMainFrame; 254 return ResourceRequest::TargetIsSubframe; 255 } 256 return ResourceRequest::TargetIsSubresource; 254 type = ResourceRequest::TargetIsMainFrame; 255 else 256 type = ResourceRequest::TargetIsSubframe; 257 request.setTargetType(type); 258 } 257 259 } 258 260 … … 264 266 // We want to distinguish between a request for a document to be loaded into 265 267 // the main frame, a sub-frame, or the sub-objects in that document. 266 request.setTargetType(determineTargetTypeFromLoader(loader));268 setTargetTypeFromLoader(request, loader)); 267 269 268 270 // Avoid repeating a form submission when navigating back or forward.
Note: See TracChangeset
for help on using the changeset viewer.