| Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
|
| diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
|
| index 471f98fae3e9992d44a7f91549ee9d60213933c6..f5896e1a5b15109bff421bd0fdcbc1ffdc3077ea 100644
|
| --- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
|
| +++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
|
| @@ -146,11 +146,13 @@ ResourceLoadPriority ResourceFetcher::computeLoadPriority(Resource::Type type, c
|
| if (type == Resource::Image)
|
| m_imageFetched = true;
|
|
|
| - // Special handling for scripts.
|
| - // Default/Parser-Blocking/Preload early in document: High (set in typeToPriority)
|
| - // Async/Defer: Low Priority (applies to both preload and parser-inserted)
|
| - // Preload late in document: Medium
|
| - if (type == Resource::Script) {
|
| + if (FetchRequest::IdleLoad == request.defer()) {
|
| + priority = ResourceLoadPriorityVeryLow;
|
| + } else if (type == Resource::Script) {
|
| + // Special handling for scripts.
|
| + // Default/Parser-Blocking/Preload early in document: High (set in typeToPriority)
|
| + // Async/Defer: Low Priority (applies to both preload and parser-inserted)
|
| + // Preload late in document: Medium
|
| if (FetchRequest::LazyLoad == request.defer())
|
| priority = ResourceLoadPriorityLow;
|
| else if (request.forPreload() && m_imageFetched)
|
|
|