Changeset 247806 in webkit
- Timestamp:
- Jul 24, 2019 5:55:16 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r247802 r247806 1 2019-07-24 Youenn Fablet <youenn@apple.com> 2 3 Disable speculative loading if cache is not to be used for the load 4 https://bugs.webkit.org/show_bug.cgi?id=199644 5 6 Reviewed by Alex Christensen. 7 8 * http/wpt/fetch/disable-speculative-for-reload-expected.txt: Added. 9 * http/wpt/fetch/disable-speculative-for-reload.html: Added. 10 * http/wpt/fetch/resources/iframe-with-image.py: Added. 11 (main): 12 * http/wpt/fetch/resources/image-load-count.py: Added. 13 (main): 14 * http/wpt/fetch/resources/image-load.py: Added. 15 (main): 16 1 17 2019-07-24 Devin Rousso <drousso@apple.com> 2 18 -
trunk/Source/WebKit/ChangeLog
r247804 r247806 1 2019-07-24 Youenn Fablet <youenn@apple.com> 2 3 Disable speculative loading if cache is not to be used for the load 4 https://bugs.webkit.org/show_bug.cgi?id=199644 5 6 Reviewed by Alex Christensen. 7 8 When the page is reloaded, loads are instructed to not use the cache. 9 It is therefore unneeded to do speculative revalidation. 10 Allow speculative revalidation if the cache policy is either the default HTTP policy or 11 if policy is to refresh all cache data. 12 Covered by added test. 13 14 * NetworkProcess/cache/NetworkCache.cpp: 15 (WebKit::NetworkCache::cachePolicyValidForSpeculativeRevalidation): 16 (WebKit::NetworkCache::canRequestUseSpeculativeRevalidation): 17 1 18 2019-07-24 Priyanka Agarwal <pagarwal999@apple.com> 2 19 -
trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
r247567 r247806 276 276 return false; 277 277 278 if ( cachePolicyAllowsExpired(request.cachePolicy()))278 if (request.requester() == ResourceRequest::Requester::XHR || request.requester() != ResourceRequest::Requester::Fetch) 279 279 return false; 280 280 281 return request.requester() != ResourceRequest::Requester::XHR && request.requester() != ResourceRequest::Requester::Fetch; 281 switch (request.cachePolicy()) { 282 case WebCore::ResourceRequestCachePolicy::ReturnCacheDataElseLoad: 283 case WebCore::ResourceRequestCachePolicy::ReturnCacheDataDontLoad: 284 case WebCore::ResourceRequestCachePolicy::ReloadIgnoringCacheData: 285 return false; 286 case WebCore::ResourceRequestCachePolicy::UseProtocolCachePolicy: 287 case WebCore::ResourceRequestCachePolicy::RefreshAnyCacheData: 288 return true; 289 case WebCore::ResourceRequestCachePolicy::DoNotUseAnyCache: 290 ASSERT_NOT_REACHED(); 291 return false; 292 } 293 return false; 282 294 } 283 295 #endif
Note: See TracChangeset
for help on using the changeset viewer.