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

Unified Diff: Source/core/svg/SVGURIReference.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.h ('k') | Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGURIReference.cpp
diff --git a/Source/core/svg/SVGURIReference.cpp b/Source/core/svg/SVGURIReference.cpp
index 02cd99fa022909d4cb39a53c0808ebb169611ad9..2a2c9c894de5fde6dbe926a0dba20fd4349e56f6 100644
--- a/Source/core/svg/SVGURIReference.cpp
+++ b/Source/core/svg/SVGURIReference.cpp
@@ -42,27 +42,27 @@ bool SVGURIReference::isKnownAttribute(const QualifiedName& attrName)
return attrName.matches(XLinkNames::hrefAttr);
}
-String SVGURIReference::fragmentIdentifierFromIRIString(const String& url, const Document& document)
+AtomicString SVGURIReference::fragmentIdentifierFromIRIString(const String& url, const Document& document)
{
size_t start = url.find('#');
if (start == kNotFound)
- return emptyString();
+ return emptyAtom;
KURL base = start ? KURL(document.baseURI(), url.substring(0, start)) : document.baseURI();
if (equalIgnoringFragmentIdentifier(base, document.url()))
- return url.substring(start + 1);
+ return AtomicString(url.substring(start + 1));
- return emptyString();
+ return emptyAtom;
}
-static inline KURL urlFromIRIStringWithFragmentIdentifier(const String& url, const Document& document, String& fragmentIdentifier)
+static inline KURL urlFromIRIStringWithFragmentIdentifier(const String& url, const Document& document, AtomicString& fragmentIdentifier)
{
size_t startOfFragmentIdentifier = url.find('#');
if (startOfFragmentIdentifier == kNotFound)
return KURL();
// Exclude the '#' character when determining the fragmentIdentifier.
- fragmentIdentifier = url.substring(startOfFragmentIdentifier + 1);
+ fragmentIdentifier = AtomicString(url.substring(startOfFragmentIdentifier + 1));
if (startOfFragmentIdentifier) {
KURL base(document.baseURI(), url.substring(0, startOfFragmentIdentifier));
return KURL(base, url.substring(startOfFragmentIdentifier));
@@ -71,10 +71,10 @@ static inline KURL urlFromIRIStringWithFragmentIdentifier(const String& url, con
return KURL(document.baseURI(), url.substring(startOfFragmentIdentifier));
}
-Element* SVGURIReference::targetElementFromIRIString(const String& iri, const Document& document, String* fragmentIdentifier, Document* externalDocument)
+Element* SVGURIReference::targetElementFromIRIString(const String& iri, const Document& document, AtomicString* fragmentIdentifier, Document* externalDocument)
{
// If there's no fragment identifier contained within the IRI string, we can't lookup an element.
- String id;
+ AtomicString id;
KURL url = urlFromIRIStringWithFragmentIdentifier(iri, document, id);
if (url == KURL())
return 0;
« no previous file with comments | « Source/core/svg/SVGURIReference.h ('k') | Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698