The SVGDocument interface: SVG 1.0/1.1 interface member testcases: 70 // nsIDOMSVGDocument methods: 71 72 /* readonly attribute DOMString title; */ 73 NS_IMETHODIMP 74 nsSVGDocument::GetTitle(nsAString& aTitle) 75 { 76 return nsXMLDocument::GetTitle(aTitle); 77 } 78 79 /* readonly attribute DOMString referrer; */ 80 NS_IMETHODIMP 81 nsSVGDocument::GetReferrer(nsAString& aReferrer) 82 { 83 return nsDocument::GetReferrer(aReferrer); 84 } 85 86 /* readonly attribute DOMString domain; */ 87 NS_IMETHODIMP 88 nsSVGDocument::GetDomain(nsAString& aDomain) 89 { 90 SetDOMStringToNull(aDomain); 91 92 if (mDocumentURI) { 93 nsCAutoString domain; 94 nsresult rv = mDocumentURI->GetHost(domain); 95 if (domain.IsEmpty() || NS_FAILED(rv)) 96 return rv; 97 CopyUTF8toUTF16(domain, aDomain); 98 } 99 100 return NS_OK; 101 } 102 103 /* readonly attribute DOMString URL; */ 104 NS_IMETHODIMP 105 nsSVGDocument::GetURL(nsAString& aURL) 106 { 107 SetDOMStringToNull(aURL); 108 109 if (mDocumentURI) { 110 nsCAutoString url; 111 nsresult rv = mDocumentURI->GetSpec(url); 112 if (url.IsEmpty() || NS_FAILED(rv)) 113 return rv; 114 CopyUTF8toUTF16(url, aURL); 115 } 116 117 return NS_OK; 118 } 119 120 /* readonly attribute SVGSVGElement rootElement; */ 121 NS_IMETHODIMP 122 nsSVGDocument::GetRootElement(nsIDOMSVGSVGElement** aRootElement) 123 { 124 return CallQueryInterface(mRootContent, aRootElement); 125 }