Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Unified Diff: third_party/WebKit/Source/core/loader/LinkLoader.cpp

Issue 2072613002: Make ResourceLoadPriority calculation simpler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/LinkResource.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/LinkLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/LinkLoader.cpp b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
index eb58c35ce12e76d34fc70a3266582634b811175b..9a681f9f824b8147859fc0a43e27c2f7ef06dc31 100644
--- a/third_party/WebKit/Source/core/loader/LinkLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
@@ -297,7 +297,8 @@ static Resource* preloadIfNeeded(const LinkRelAttribute& relAttribute, const KUR
document.addConsoleMessage(ConsoleMessage::create(OtherMessageSource, DebugMessageLevel, String("Preload triggered for " + href.host() + href.path())));
linkRequest.setForPreload(true, monotonicallyIncreasingTime());
linkRequest.setLinkPreload(true);
- linkRequest.setPriority(document.fetcher()->loadPriority(resourceType, linkRequest));
+ if (resourceType == Resource::LinkPreload)
+ linkRequest.setDefer(FetchRequest::LazyLoad);
return document.loader()->startPreload(resourceType, linkRequest);
}
« no previous file with comments | « third_party/WebKit/Source/core/html/LinkResource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698