Chromium Code Reviews| Index: Source/core/html/parser/HTMLPreloadScanner.cpp |
| diff --git a/Source/core/html/parser/HTMLPreloadScanner.cpp b/Source/core/html/parser/HTMLPreloadScanner.cpp |
| index dc692f6eca2add78fbac9385ef29171cd8a2527b..90739d9a6cd4c8afcf6a2436f260a2fb7586c717 100644 |
| --- a/Source/core/html/parser/HTMLPreloadScanner.cpp |
| +++ b/Source/core/html/parser/HTMLPreloadScanner.cpp |
| @@ -171,16 +171,17 @@ private: |
| else if (match(attributeName, crossoriginAttr)) |
| setCrossOriginAllowed(attributeValue); |
| } else if (match(m_tagImpl, imgTag)) { |
| + int effectiveSize = -1; // FIXME - hook up the real value from `sizes` |
| if (match(attributeName, srcAttr) && !m_encounteredImgSrc) { |
| m_encounteredImgSrc = true; |
| - setUrlToLoad(bestFitSourceForImageAttributes(m_mediaValues->devicePixelRatio(), attributeValue, m_srcsetImageCandidate), AllowURLReplacement); |
| + setUrlToLoad(bestFitSourceForImageAttributes(m_mediaValues->devicePixelRatio(), effectiveSize, attributeValue, m_srcsetImageCandidate), AllowURLReplacement); |
| } else if (match(attributeName, crossoriginAttr)) { |
| setCrossOriginAllowed(attributeValue); |
| } else if (RuntimeEnabledFeatures::srcsetEnabled() |
|
eseidel
2014/04/10 16:42:19
Is srcset disabled by default? Or will this affec
|
| && match(attributeName, srcsetAttr) |
| && m_srcsetImageCandidate.isEmpty()) { |
| - m_srcsetImageCandidate = bestFitSourceForSrcsetAttribute(m_mediaValues->devicePixelRatio(), attributeValue); |
| - setUrlToLoad(bestFitSourceForImageAttributes(m_mediaValues->devicePixelRatio(), m_urlToLoad, m_srcsetImageCandidate), AllowURLReplacement); |
| + m_srcsetImageCandidate = bestFitSourceForSrcsetAttribute(m_mediaValues->devicePixelRatio(), effectiveSize, attributeValue); |
| + setUrlToLoad(bestFitSourceForImageAttributes(m_mediaValues->devicePixelRatio(), effectiveSize, m_urlToLoad, m_srcsetImageCandidate), AllowURLReplacement); |
| } |
| } else if (match(m_tagImpl, linkTag)) { |
| if (match(attributeName, hrefAttr)) |