Changeset 247314 in webkit
- Timestamp:
- Jul 10, 2019 11:17:59 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r247313 r247314 1 2019-07-10 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 Chris Dumez. 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-10 Youenn Fablet <youenn@apple.com> 2 18 -
trunk/Source/WebKit/ChangeLog
r247308 r247314 1 2019-07-10 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 Chris Dumez. 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-10 Alex Christensen <achristensen@webkit.org> 2 19 -
trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
r247276 r247314 271 271 272 272 #if ENABLE(NETWORK_CACHE_SPECULATIVE_REVALIDATION) 273 static bool cachePolicyValidForSpeculativeRevalidation(WebCore::ResourceRequestCachePolicy policy) 274 { 275 switch (policy) { 276 case WebCore::ResourceRequestCachePolicy::ReturnCacheDataElseLoad: 277 case WebCore::ResourceRequestCachePolicy::ReturnCacheDataDontLoad: 278 case WebCore::ResourceRequestCachePolicy::ReloadIgnoringCacheData: 279 return false; 280 case WebCore::ResourceRequestCachePolicy::UseProtocolCachePolicy: 281 case WebCore::ResourceRequestCachePolicy::RefreshAnyCacheData: 282 return true; 283 case WebCore::ResourceRequestCachePolicy::DoNotUseAnyCache: 284 ASSERT_NOT_REACHED(); 285 return false; 286 } 287 return false; 288 } 289 273 290 static bool inline canRequestUseSpeculativeRevalidation(const ResourceRequest& request) 274 291 { … … 276 293 return false; 277 294 278 if (cachePolicy AllowsExpired(request.cachePolicy()))295 if (cachePolicyValidForSpeculativeRevalidation(request.cachePolicy())) 279 296 return false; 280 297
Note: See TracChangeset
for help on using the changeset viewer.