Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Unified Diff: Source/core/html/HTMLImageElement.cpp

Issue 290803002: Return an absolute URL for HTMLImageElement.currentSrc (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase and review nits Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLImageElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLImageElement.cpp
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
index 9735bf4a8dd4a5af6b31b7715a6747d1aa29d92e..b8972b983f6aca78c46148b1e41b5eb59e706b63 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -157,6 +157,7 @@ void HTMLImageElement::resetFormOwner()
void HTMLImageElement::setBestFitURLAndDPRFromImageCandidate(const ImageCandidate& candidate)
{
m_bestFitImageURL = candidate.url();
+ 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)
@@ -376,8 +377,7 @@ int HTMLImageElement::naturalHeight() const
const AtomicString& HTMLImageElement::currentSrc() const
{
- // FIXME: Need to absolutize the returned value.
- return m_bestFitImageURL;
+ return m_currentSrc;
}
bool HTMLImageElement::isURLAttribute(const Attribute& attribute) const
« no previous file with comments | « Source/core/html/HTMLImageElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698