Index: Source/core/html/HTMLImageElement.cpp |
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp |
index f236266a651d13830a5dd6e38c292f095bb1c0ae..c12b866073233e62c31c645cf43c141568710a22 100644 |
--- a/Source/core/html/HTMLImageElement.cpp |
+++ b/Source/core/html/HTMLImageElement.cpp |
@@ -161,6 +161,7 @@ void HTMLImageElement::parseAttribute(const QualifiedName& name, const AtomicStr |
effectiveSize = SizesAttributeParser::findEffectiveSize(fastGetAttribute(sizesAttr), MediaValuesCached::create(document())); |
ImageCandidate candidate = bestFitSourceForImageAttributes(document().devicePixelRatio(), effectiveSize, fastGetAttribute(srcAttr), fastGetAttribute(srcsetAttr)); |
m_bestFitImageURL = candidate.toAtomicString(); |
+ m_currentSrc = AtomicString(document().completeURL(imageSourceURL()).string()); |
float candidateScaleFactor = candidate.scaleFactor(); |
// FIXME: Make this ">0" part match the spec, once it settles. |
if (candidateScaleFactor > 0) |
@@ -315,7 +316,7 @@ int HTMLImageElement::naturalHeight() const |
const AtomicString& HTMLImageElement::currentSrc() const |
{ |
- return m_bestFitImageURL; |
+ return m_currentSrc; |
} |
bool HTMLImageElement::isURLAttribute(const Attribute& attribute) const |