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

Unified Diff: third_party/WebKit/Source/core/html/parser/PreloadRequest.cpp

Issue 1987413002: Add link preload as=document support Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: crash fix Created 4 years, 3 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
Index: third_party/WebKit/Source/core/html/parser/PreloadRequest.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/PreloadRequest.cpp b/third_party/WebKit/Source/core/html/parser/PreloadRequest.cpp
index 0071af1cd4e60e556b5764f3870f69afc639eb61..90576b9f6fd92440144586481c0bfcae44f2a0ce 100644
--- a/third_party/WebKit/Source/core/html/parser/PreloadRequest.cpp
+++ b/third_party/WebKit/Source/core/html/parser/PreloadRequest.cpp
@@ -35,6 +35,8 @@ FetchRequest PreloadRequest::resourceRequest(Document* document)
ResourceRequest resourceRequest(completeURL(document));
resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer(m_referrerPolicy, resourceRequest.url(), document->outgoingReferrer()));
ResourceFetcher::determineRequestContext(resourceRequest, m_resourceType, false);
+ if (m_resourceType == Resource::MainResource)
+ resourceRequest.setFrameType(WebURLRequest::FrameTypePreload);
FetchRequest request(resourceRequest, initiatorInfo);
if (m_resourceType == Resource::ImportResource) {
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp ('k') | third_party/WebKit/Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698