Index: Source/core/html/HTMLImageElement.cpp |
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp |
index 74e7d1350790183f293fd66801efb85ce4ee3ea6..1a560463f9ce47fadb196d4802b7b86a6f023c52 100644 |
--- a/Source/core/html/HTMLImageElement.cpp |
+++ b/Source/core/html/HTMLImageElement.cpp |
@@ -309,7 +309,7 @@ ImageCandidate HTMLImageElement::findBestFitImageFromPictureParent() |
SizesAttributeParser parser = SizesAttributeParser(MediaValuesDynamic::create(document()), sizes); |
float effectiveSize = parser.length(); |
m_effectiveSizeViewportDependant = parser.viewportDependant(); |
- ImageCandidate candidate = bestFitSourceForSrcsetAttribute(document().devicePixelRatio(), effectiveSize, source->fastGetAttribute(srcsetAttr)); |
+ ImageCandidate candidate = bestFitSourceForSrcsetAttribute(document().devicePixelRatio(), effectiveSize, source->fastGetAttribute(srcsetAttr), &document()); |
if (candidate.isEmpty()) |
continue; |
return candidate; |
@@ -644,7 +644,7 @@ void HTMLImageElement::selectSourceURL(ImageLoader::UpdateFromElementBehavior be |
effectiveSize = parser.length(); |
m_effectiveSizeViewportDependant = parser.viewportDependant(); |
} |
- ImageCandidate candidate = bestFitSourceForImageAttributes(document().devicePixelRatio(), effectiveSize, fastGetAttribute(srcAttr), fastGetAttribute(srcsetAttr)); |
+ ImageCandidate candidate = bestFitSourceForImageAttributes(document().devicePixelRatio(), effectiveSize, fastGetAttribute(srcAttr), fastGetAttribute(srcsetAttr), &document()); |
setBestFitURLAndDPRFromImageCandidate(candidate); |
} |
if (m_intrinsicSizingViewportDependant && m_effectiveSizeViewportDependant && !m_listener) { |