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

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

Issue 2826213003: Don't lower priority for scripts inserted by doc.write (Closed)
Patch Set: Fixed duplicate URLs in Layout test Created 3 years, 8 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 aa0d19ece0b2f86d58c78966365c2a4bd66fbdf9..71c4353b488f041478036f3c4f42a84566d0afb8 100644
--- a/third_party/WebKit/Source/core/html/parser/PreloadRequest.cpp
+++ b/third_party/WebKit/Source/core/html/parser/PreloadRequest.cpp
@@ -77,7 +77,13 @@ Resource* PreloadRequest::Start(Document* document) {
params.SetCharset(charset_.IsEmpty() ? document->characterSet().GetString()
: charset_);
}
- params.SetSpeculativePreload(true, discovery_time_);
+ FetchParameters::SpeculativePreloadType speculative_preload_type =
+ FetchParameters::SpeculativePreloadType::kInDocument;
+ if (from_insertion_scanner_) {
+ speculative_preload_type =
+ FetchParameters::SpeculativePreloadType::kInserted;
+ }
+ params.SetSpeculativePreloadType(speculative_preload_type, discovery_time_);
return document->Loader()->StartPreload(resource_type_, params);
}

Powered by Google App Engine
This is Rietveld 408576698