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

Unified Diff: Source/core/svg/SVGImageElement.cpp

Issue 191933003: [SVG] Missing image loader update on re-insert. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « LayoutTests/svg/custom/image-reinsert-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGImageElement.cpp
diff --git a/Source/core/svg/SVGImageElement.cpp b/Source/core/svg/SVGImageElement.cpp
index 4d9ec89f4b8735056233f713d1c4487492f01f3a..1dc68d6a61f619afc3bfc852f2d61e31d66c1249 100644
--- a/Source/core/svg/SVGImageElement.cpp
+++ b/Source/core/svg/SVGImageElement.cpp
@@ -208,6 +208,11 @@ Node::InsertionNotificationRequest SVGImageElement::insertedInto(ContainerNode*
if (m_needsLoaderURIUpdate) {
m_imageLoader.updateFromElementIgnoringPreviousError();
m_needsLoaderURIUpdate = false;
+ } else {
+ // A previous loader update may have failed to actually fetch the image if the document
+ // was inactive. In that case, force a re-update (but don't clear previous errors).
+ if (!m_imageLoader.image() || !m_imageLoader.image()->hasImage())
pdr. 2014/03/09 00:12:41 The !m_imageLoader.image() check looks right to me
f(malita) 2014/03/09 01:35:20 Not for this particular failure - it's me getting
+ m_imageLoader.updateFromElement();
}
return InsertionDone;
« no previous file with comments | « LayoutTests/svg/custom/image-reinsert-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698