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

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

Issue 1388093002: Fix SVGUseElement "instance tree loading" status check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « third_party/WebKit/LayoutTests/svg/custom/use-nested-extern-href-non-existent-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGUseElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGUseElement.cpp b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
index 555b2cd00e8dcb2ad47fc461bc5beaa29e0ab679..43a30d1135d2c0217c01dc2701ae22555b2d5b3e 100644
--- a/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
@@ -797,19 +797,13 @@ void SVGUseElement::notifyFinished(Resource* resource)
bool SVGUseElement::resourceIsStillLoading() const
{
- if (m_resource && m_resource->isLoading())
- return true;
- return false;
+ return m_resource && m_resource->isLoading();
}
bool SVGUseElement::instanceTreeIsLoading(const SVGElement* targetInstance)
{
- for (const SVGElement* element = Traversal<SVGElement>::firstChild(*targetInstance); element; element = Traversal<SVGElement>::nextSibling(*element)) {
- if (const SVGUseElement* use = element->correspondingUseElement()) {
- if (use->resourceIsStillLoading())
- return true;
- }
- if (element->hasChildren() && instanceTreeIsLoading(element))
+ for (const SVGElement* element = targetInstance; element; element = Traversal<SVGElement>::next(*element, targetInstance)) {
+ if (isSVGUseElement(*element) && toSVGUseElement(*element).resourceIsStillLoading())
return true;
}
return false;
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/custom/use-nested-extern-href-non-existent-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698