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

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

Issue 121173004: Make calls to AtomicString(const String&) explicit in svg/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Take feedback into consideration Created 6 years, 12 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/SVGURIReference.cpp ('k') | Source/core/svg/SVGViewSpec.cpp » ('j') | 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 80d36bf97f3725329374c1cf185c093cfa549ea5..18aa5147a1eff4278efeef3d1d6af361f582ec4d 100644
--- a/Source/core/svg/SVGUseElement.cpp
+++ b/Source/core/svg/SVGUseElement.cpp
@@ -400,7 +400,7 @@ void SVGUseElement::buildPendingResource()
if (!inDocument())
return;
- String id;
+ AtomicString id;
Element* target = SVGURIReference::targetElementFromIRIString(hrefCurrentValue(), document(), &id, externalDocument());
if (!target || !target->inDocument()) {
// If we can't find the target of an external element, just give up.
@@ -826,12 +826,13 @@ void SVGUseElement::associateInstancesWithShadowTreeElements(Node* target, SVGEl
if (originalElement->hasTagName(SVGNames::useTag)) {
// <use> gets replaced by <g>
- ASSERT(target->nodeName() == SVGNames::gTag);
+ ASSERT(AtomicString(target->nodeName()) == SVGNames::gTag);
} else if (originalElement->hasTagName(SVGNames::symbolTag)) {
// <symbol> gets replaced by <svg>
- ASSERT(target->nodeName() == SVGNames::svgTag);
- } else
- ASSERT(target->nodeName() == originalElement->nodeName());
+ ASSERT(AtomicString(target->nodeName()) == SVGNames::svgTag);
+ } else {
+ ASSERT(AtomicString(target->nodeName()) == originalElement->nodeName());
+ }
SVGElement* element = 0;
if (target->isSVGElement())
« no previous file with comments | « Source/core/svg/SVGURIReference.cpp ('k') | Source/core/svg/SVGViewSpec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698