Index: Source/core/html/parser/HTMLPreloadScanner.cpp |
diff --git a/Source/core/html/parser/HTMLPreloadScanner.cpp b/Source/core/html/parser/HTMLPreloadScanner.cpp |
index 16607134a3acb3d091721e8515031c8ee8c105b4..0411f97df82f3335bfeeecb083715da8ae5cc825 100644 |
--- a/Source/core/html/parser/HTMLPreloadScanner.cpp |
+++ b/Source/core/html/parser/HTMLPreloadScanner.cpp |
@@ -168,7 +168,12 @@ public: |
return nullptr; |
TextPosition position = TextPosition(source.currentLine(), source.currentColumn()); |
- OwnPtr<PreloadRequest> request = PreloadRequest::create(initiatorFor(m_tagImpl), position, m_urlToLoad, predictedBaseURL, resourceType()); |
+ FetchRequest::ResourceWidth resourceWidth; |
+ if (m_sourceSizeSet) { |
+ resourceWidth.width = m_sourceSize; |
+ resourceWidth.isSet = true; |
+ } |
+ OwnPtr<PreloadRequest> request = PreloadRequest::create(initiatorFor(m_tagImpl), position, m_urlToLoad, predictedBaseURL, resourceType(), resourceWidth); |
if (isCORSEnabled()) |
request->setCrossOriginEnabled(allowStoredCredentials()); |
request->setCharset(charset()); |