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

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: Patch for landing. 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..083d2a8103ce0a1f1eb71116010561b1f5fd57cd 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.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