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

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

Issue 19539003: Introduce toSVGUseElement(), use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased 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
« 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 a1aeec23052a080675cc05e79df7793466b2dee6..87f7faf6fab37321170cf2fce5a6dd5f6e26e7d0 100644
--- a/Source/core/svg/SVGUseElement.cpp
+++ b/Source/core/svg/SVGUseElement.cpp
@@ -270,7 +270,7 @@ static void dumpInstanceTree(unsigned int& depth, String& text, SVGElementInstan
ASSERT(element);
if (element->hasTagName(SVGNames::useTag)) {
- if (static_cast<SVGUseElement*>(element)->cachedDocumentIsStillLoading())
+ if (toSVGUseElement(element)->cachedDocumentIsStillLoading())
return;
}
@@ -579,7 +579,7 @@ void SVGUseElement::buildInstanceTree(SVGElement* target, SVGElementInstance* ta
bool targetHasUseTag = target->hasTagName(SVGNames::useTag);
SVGElement* newTarget = 0;
if (targetHasUseTag) {
- foundProblem = hasCycleUseReferencing(static_cast<SVGUseElement*>(target), targetInstance, newTarget);
+ foundProblem = hasCycleUseReferencing(toSVGUseElement(target), targetInstance, newTarget);
if (foundProblem)
return;
@@ -625,7 +625,7 @@ void SVGUseElement::buildInstanceTree(SVGElement* target, SVGElementInstance* ta
if (!targetHasUseTag || !newTarget)
return;
- RefPtr<SVGElementInstance> newInstance = SVGElementInstance::create(this, static_cast<SVGUseElement*>(target), newTarget);
+ RefPtr<SVGElementInstance> newInstance = SVGElementInstance::create(this, toSVGUseElement(target), newTarget);
SVGElementInstance* newInstancePtr = newInstance.get();
targetInstance->appendChild(newInstance.release());
buildInstanceTree(newTarget, newInstancePtr, foundProblem, foundUse);
@@ -702,7 +702,7 @@ void SVGUseElement::expandUseElementsInShadowTree(Node* element)
// actual shadow tree (after the special case modification for svg/symbol) we have
// to walk it completely and expand all <use> elements.
if (element->hasTagName(SVGNames::useTag)) {
- SVGUseElement* use = static_cast<SVGUseElement*>(element);
+ SVGUseElement* use = toSVGUseElement(element);
ASSERT(!use->cachedDocumentIsStillLoading());
Element* targetElement = SVGURIReference::targetElementFromIRIString(use->hrefCurrentValue(), referencedDocument());
« 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