Index: Source/core/svg/SVGURIReference.cpp |
diff --git a/Source/core/svg/SVGURIReference.cpp b/Source/core/svg/SVGURIReference.cpp |
index 270e2616102ec742236294c2f59c973e9400788c..4152c151c322f5ddf0cd5dd711d623007daa7490 100644 |
--- a/Source/core/svg/SVGURIReference.cpp |
+++ b/Source/core/svg/SVGURIReference.cpp |
@@ -43,23 +43,21 @@ bool SVGURIReference::isKnownAttribute(const QualifiedName& attrName) |
return attrName.matches(XLinkNames::hrefAttr); |
} |
-String SVGURIReference::fragmentIdentifierFromIRIString(const String& url, Document* document) |
+String SVGURIReference::fragmentIdentifierFromIRIString(const String& url, const Document& document) |
{ |
- ASSERT(document); |
size_t start = url.find('#'); |
if (start == notFound) |
return emptyString(); |
- KURL base = start ? KURL(document->baseURI(), url.substring(0, start)) : document->baseURI(); |
- if (equalIgnoringFragmentIdentifier(base, document->url())) |
+ KURL base = start ? KURL(document.baseURI(), url.substring(0, start)) : document.baseURI(); |
+ if (equalIgnoringFragmentIdentifier(base, document.url())) |
return url.substring(start + 1); |
return emptyString(); |
} |
-static inline KURL urlFromIRIStringWithFragmentIdentifier(const String& url, Document* document, String& fragmentIdentifier) |
+static inline KURL urlFromIRIStringWithFragmentIdentifier(const String& url, const Document& document, String& fragmentIdentifier) |
{ |
- ASSERT(document); |
size_t startOfFragmentIdentifier = url.find('#'); |
if (startOfFragmentIdentifier == notFound) |
return KURL(); |
@@ -67,14 +65,14 @@ static inline KURL urlFromIRIStringWithFragmentIdentifier(const String& url, Doc |
// Exclude the '#' character when determining the fragmentIdentifier. |
fragmentIdentifier = url.substring(startOfFragmentIdentifier + 1); |
if (startOfFragmentIdentifier) { |
- KURL base(document->baseURI(), url.substring(0, startOfFragmentIdentifier)); |
+ KURL base(document.baseURI(), url.substring(0, startOfFragmentIdentifier)); |
return KURL(base, url.substring(startOfFragmentIdentifier)); |
} |
- return KURL(document->baseURI(), url.substring(startOfFragmentIdentifier)); |
+ return KURL(document.baseURI(), url.substring(startOfFragmentIdentifier)); |
} |
-Element* SVGURIReference::targetElementFromIRIString(const String& iri, Document* document, String* fragmentIdentifier, Document* externalDocument) |
+Element* SVGURIReference::targetElementFromIRIString(const String& iri, const Document& document, String* fragmentIdentifier, Document* externalDocument) |
{ |
// If there's no fragment identifier contained within the IRI string, we can't lookup an element. |
String id; |
@@ -98,7 +96,7 @@ Element* SVGURIReference::targetElementFromIRIString(const String& iri, Document |
if (isExternalURIReference(iri, document)) |
return 0; |
- return document->getElementById(id); |
+ return document.getElementById(id); |
} |
void SVGURIReference::addSupportedAttributes(HashSet<QualifiedName>& supportedAttributes) |