Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp |
| diff --git a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp |
| index 01b52462b2cb4fdd8fa468a035ef476442b0cea4..1cb0661a96c90c95802fd19a4180b38e8fa0b607 100644 |
| --- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp |
| +++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp |
| @@ -205,12 +205,15 @@ public: |
| PassOwnPtr<PreloadRequest> createPreloadRequest(const KURL& predictedBaseURL, const SegmentedString& source, const ClientHintsPreferences& clientHintsPreferences, const PictureData& pictureData, const ReferrerPolicy documentReferrerPolicy) |
| { |
| PreloadRequest::RequestType requestType = PreloadRequest::RequestTypePreload; |
| - if (shouldPreconnect()) |
| + if (shouldPreconnect()) { |
| requestType = PreloadRequest::RequestTypePreconnect; |
| - else if (isLinkRelPreload()) |
| - requestType = PreloadRequest::RequestTypeLinkRelPreload; |
| - else if (!shouldPreload() || !m_matchedMediaAttribute) |
| + } else if (!shouldPreload() || !m_matchedMediaAttribute) { |
| return nullptr; |
| + } |
| + |
| + if (isLinkRelPreload()) { |
|
Nate Chapin
2016/05/17 17:16:55
Which of these cases really should be mutually exc
Yoav Weiss
2016/05/17 21:45:48
Good point. I changed the conditions to represent
|
| + requestType = PreloadRequest::RequestTypeLinkRelPreload; |
| + } |
| TextPosition position = TextPosition(source.currentLine(), source.currentColumn()); |
| FetchRequest::ResourceWidth resourceWidth; |