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

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

Issue 19856004: Adds WebElement::imageContents() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: move imageContents() call down to WebElement Created 7 years, 5 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
Index: Source/core/html/HTMLImageElement.cpp
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
index 709a0ee270ac32aa79e5cc6deb6e36468c97214b..0ea74c820d2095a170f07bf71baf2dbc17162481 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -357,4 +357,12 @@ bool HTMLImageElement::isServerMap() const
return document()->completeURL(stripLeadingAndTrailingHTMLSpaces(usemap)).isEmpty();
}
+Image* HTMLImageElement::imageContents()
+{
+ if (!m_imageLoader.imageComplete())
+ return 0;
+
+ return m_imageLoader.image()->image();
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698