| Index: Source/core/html/HTMLImageElement.cpp
|
| diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
|
| index 2c3e81bccccf9f0a8de6b19c88014fb46acdf243..b0ac25d0d140acb5b7210d42591440b067e90787 100644
|
| --- a/Source/core/html/HTMLImageElement.cpp
|
| +++ b/Source/core/html/HTMLImageElement.cpp
|
| @@ -158,10 +158,10 @@ void HTMLImageElement::setBestFitURLAndDPRFromImageCandidate(const ImageCandidat
|
| {
|
| m_bestFitImageURL = candidate.url();
|
| m_currentSrc = AtomicString(document().completeURL(imageSourceURL()).string());
|
| - float candidateScaleFactor = candidate.scaleFactor();
|
| + float candidateDensity = candidate.density();
|
| // FIXME: Make this ">0" part match the spec, once it settles.
|
| - if (candidateScaleFactor > 0)
|
| - m_imageDevicePixelRatio = 1 / candidateScaleFactor;
|
| + if (candidateDensity > 0)
|
| + m_imageDevicePixelRatio = 1 / candidateDensity;
|
| if (renderer() && renderer()->isImage())
|
| toRenderImage(renderer())->setImageDevicePixelRatio(m_imageDevicePixelRatio);
|
| }
|
|
|