Changeset 142707 in webkit
- Timestamp:
- Feb 12, 2013 6:42:02 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142703 r142707 1 2013-02-12 Nate Chapin <japhet@chromium.org> 2 3 REGRESSION: Reloading a local file doesn't pick up changes 4 https://bugs.webkit.org/show_bug.cgi?id=109344 5 6 Reviewed by Alexey Proskuryakov. 7 8 * http/tests/cache/reload-main-resource-expected.txt: Added. 9 * http/tests/cache/reload-main-resource.php: Added. 10 * http/tests/cache/resources/reload-main-resource-iframe.php: Added. 11 * http/tests/misc/favicon-loads-with-images-disabled-expected.txt: This test 12 was being loaded from memory cache in spite of being loaded via reload. We 13 shouldn't do that. 14 * http/tests/misc/link-rel-icon-beforeload-expected.txt: This test 15 was being loaded from memory cache in spite of being loaded via reload. We 16 shouldn't do that. 17 1 18 2013-02-12 Dima Gorbik <dgorbik@apple.com> 2 19 -
trunk/LayoutTests/http/tests/misc/favicon-loads-with-images-disabled-expected.txt
r141136 r142707 2 2 http://127.0.0.1:8000/misc/favicon-loads-with-images-disabled.html - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/misc/favicon-loads-with-images-disabled.html, main document URL http://127.0.0.1:8000/misc/favicon-loads-with-images-disabled.html, http method GET> redirectResponse (null) 3 3 http://127.0.0.1:8000/misc/favicon-loads-with-images-disabled.html - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/misc/favicon-loads-with-images-disabled.html, http status code 200> 4 http://127.0.0.1:8000/misc/favicon-loads-with-images-disabled.html - didFinishLoading5 4 Radar 6973106 and https://bugs.webkit.org/show_bug.cgi?id=27896 - Favicons still load when automatic image loading is disabled. 6 5 This test uses DRT's resource load delegate callback mode to see if the favicon is loaded even when image loading is off. -
trunk/LayoutTests/http/tests/misc/link-rel-icon-beforeload-expected.txt
r141136 r142707 2 2 http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html, main document URL http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html, http method GET> redirectResponse (null) 3 3 http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html, http status code 200> 4 http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html - didFinishLoading5 4 http://127.0.0.1:8000/favicon.ico - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/favicon.ico, main document URL http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html, http method GET> redirectResponse (null) 6 5 This test should not show a request for the favicon dont-load-this.ico, since the beforeload handler on the favicon link returns false. Therefore, if the resource request list below shows a request for dont-load-this.ico, then this test has failed. -
trunk/Source/WebCore/ChangeLog
r142705 r142707 1 2013-02-12 Nate Chapin <japhet@chromium.org> 2 3 REGRESSION: Reloading a local file doesn't pick up changes 4 https://bugs.webkit.org/show_bug.cgi?id=109344 5 6 Reviewed by Alexey Proskuryakov. 7 8 Test: http/tests/cache/reload-main-resource.php 9 10 * loader/cache/CachedResource.cpp: 11 (WebCore::CachedResource::load): 12 * loader/cache/CachedResourceLoader.cpp: 13 (WebCore::CachedResourceLoader::determineRevalidationPolicy): 14 (WebCore::CachedResourceLoader::cachePolicy): Don't use subresourceCachePolicy() 15 for main resources. 16 * loader/cache/CachedResourceLoader.h: 17 (CachedResourceLoader): 18 1 19 2013-02-12 Ryosuke Niwa <rniwa@webkit.org> 2 20 -
trunk/Source/WebCore/loader/cache/CachedResource.cpp
r142068 r142707 326 326 const String& eTag = resourceToRevalidate->response().httpHeaderField("ETag"); 327 327 if (!lastModified.isEmpty() || !eTag.isEmpty()) { 328 ASSERT(cachedResourceLoader->cachePolicy( ) != CachePolicyReload);329 if (cachedResourceLoader->cachePolicy( ) == CachePolicyRevalidate)328 ASSERT(cachedResourceLoader->cachePolicy(type()) != CachePolicyReload); 329 if (cachedResourceLoader->cachePolicy(type()) == CachePolicyRevalidate) 330 330 m_resourceRequest.setHTTPHeaderField("Cache-Control", "max-age=0"); 331 331 if (!lastModified.isEmpty()) -
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
r142024 r142707 585 585 586 586 // CachePolicyHistoryBuffer uses the cache no matter what. 587 if (cachePolicy( ) == CachePolicyHistoryBuffer)587 if (cachePolicy(type) == CachePolicyHistoryBuffer) 588 588 return Use; 589 589 … … 610 610 611 611 // CachePolicyReload always reloads 612 if (cachePolicy( ) == CachePolicyReload) {612 if (cachePolicy(type) == CachePolicyReload) { 613 613 LOG(ResourceLoading, "CachedResourceLoader::determineRevalidationPolicy reloading due to CachePolicyReload."); 614 614 return Reload; … … 626 626 627 627 // Check if the cache headers requires us to revalidate (cache expiration for example). 628 if (existingResource->mustRevalidateDueToCacheHeaders(cachePolicy( ))) {628 if (existingResource->mustRevalidateDueToCacheHeaders(cachePolicy(type))) { 629 629 // See if the resource has usable ETag or Last-modified headers. 630 630 if (existingResource->canUseCacheValidator()) … … 702 702 } 703 703 704 CachePolicy CachedResourceLoader::cachePolicy() const 705 { 706 return frame() ? frame()->loader()->subresourceCachePolicy() : CachePolicyVerify; 704 CachePolicy CachedResourceLoader::cachePolicy(CachedResource::Type type) const 705 { 706 if (!frame()) 707 return CachePolicyVerify; 708 709 if (type != CachedResource::MainResource) 710 return frame()->loader()->subresourceCachePolicy(); 711 712 if (frame()->loader()->loadType() == FrameLoadTypeReloadFromOrigin || frame()->loader()->loadType() == FrameLoadTypeReload) 713 return CachePolicyReload; 714 return CachePolicyVerify; 707 715 } 708 716 -
trunk/Source/WebCore/loader/cache/CachedResourceLoader.h
r138658 r142707 113 113 bool shouldDeferImageLoad(const KURL&) const; 114 114 115 CachePolicy cachePolicy( ) const;115 CachePolicy cachePolicy(CachedResource::Type) const; 116 116 117 117 Frame* frame() const; // Can be null
Note: See TracChangeset
for help on using the changeset viewer.