CachedResourceRequest should not need to store defer and preload options
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Oct 2016 06:00:10 +0000 (06:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Oct 2016 06:00:10 +0000 (06:00 +0000)
commitf85ff1ecdf521e96224eccee93fa7e5bf491203d
tree767860e49721edbafcbff080d6a15daae8a6f8f8
parent082601b4fd36bd0fe11f0e425824fe2dbe57f1b6
CachedResourceRequest should not need to store defer and preload options
https://bugs.webkit.org/show_bug.cgi?id=163004

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-06
Reviewed by Alex Christensen.

No change of behavior.

Removing CachedResourceRequest defer and preload fields.
These fields are computed inside CachedResourceLoader instead.

Updated setting of priority from CachedResourceRequest to CachedResource.
Priority is set for any new resource (this covers all cases where no cached resource can be reused from the memory cache).
Priority is set for a cached resource if the request is not a preload request.

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::preloadIfNeeded):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
(WebCore::CachedResourceLoader::requestPreload):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::CachedResourceRequest):
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::priority):
(WebCore::CachedResourceRequest::forPreload): Deleted.
(WebCore::CachedResourceRequest::setForPreload): Deleted.
(WebCore::CachedResourceRequest::defer): Deleted.
(WebCore::CachedResourceRequest::setDefer): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/LinkLoader.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/cache/CachedResourceLoader.h
Source/WebCore/loader/cache/CachedResourceRequest.cpp
Source/WebCore/loader/cache/CachedResourceRequest.h