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

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

Issue 134263003: Followup fixes for bug 332066. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 11 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/svg/SVGUseElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGUseElement.cpp
diff --git a/Source/core/svg/SVGUseElement.cpp b/Source/core/svg/SVGUseElement.cpp
index 4a542322f55870b779777f4f0a2939602a0361b4..40c4cdcf3dfd8d757ce094140b7ea74c1edaba16 100644
--- a/Source/core/svg/SVGUseElement.cpp
+++ b/Source/core/svg/SVGUseElement.cpp
@@ -167,10 +167,10 @@ Node::InsertionNotificationRequest SVGUseElement::insertedInto(ContainerNode* ro
if (!m_wasInsertedByParser) {
buildPendingResource();
- m_haveFiredLoadEvent = true;
- sendSVGLoadEventIfPossibleAsynchronously();
+ if (!isStructurallyExternal()) {
+ sendSVGLoadEventIfPossibleAsynchronously();
+ }
}
-
return InsertionDone;
}
@@ -934,10 +934,14 @@ void SVGUseElement::notifyFinished(Resource* resource)
if (resource->errorOccurred())
dispatchEvent(Event::create(EventTypeNames::error));
else if (!resource->wasCanceled()) {
- if (!m_wasInsertedByParser)
- ASSERT(m_haveFiredLoadEvent);
- else if (m_haveFiredLoadEvent)
+ if (m_wasInsertedByParser && m_haveFiredLoadEvent)
return;
+ if (!isStructurallyExternal())
+ return;
+
+ ASSERT(!m_haveFiredLoadEvent);
+ m_haveFiredLoadEvent = true;
+ sendSVGLoadEventIfPossible();
}
}
@@ -964,7 +968,6 @@ bool SVGUseElement::instanceTreeIsLoading(SVGElementInstance* targetElementInsta
void SVGUseElement::finishParsingChildren()
{
SVGGraphicsElement::finishParsingChildren();
- m_haveFiredLoadEvent = true;
if (m_wasInsertedByParser) {
buildPendingResource();
m_wasInsertedByParser = false;
« no previous file with comments | « Source/core/svg/SVGUseElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698