From ec2ea12bcc78946a64cd6c3be580eb764aa8346c Mon Sep 17 00:00:00 2001 From: "tor%cs.brown.edu" Date: Thu, 14 Oct 2004 16:20:37 +0000 Subject: [PATCH] Bug 264370 - implement SVGDocument.rootElement. r=afri --- content/svg/document/src/nsSVGDocument.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/content/svg/document/src/nsSVGDocument.cpp b/content/svg/document/src/nsSVGDocument.cpp index a192c9f477b1..dd58906e1805 100644 --- a/content/svg/document/src/nsSVGDocument.cpp +++ b/content/svg/document/src/nsSVGDocument.cpp @@ -43,6 +43,8 @@ #include "nsString.h" #include "nsLiteralString.h" #include "nsReadableUtils.h" +#include "nsIDOMSVGSVGElement.h" +#include "nsCOMPtr.h" NS_INTERFACE_MAP_BEGIN(nsSVGDocument) NS_INTERFACE_MAP_ENTRY(nsIDOMSVGDocument) @@ -103,9 +105,10 @@ nsSVGDocument::GetURL(nsAString& aURL) { NS_IMETHODIMP nsSVGDocument::GetRootElement(nsIDOMSVGSVGElement** aRootElement) { - NS_NOTYETIMPLEMENTED("nsSVGDocument::GetRootElement"); - // XXX - writeme - return NS_ERROR_NOT_IMPLEMENTED; + nsCOMPtr root = do_QueryInterface(mRootContent); + *aRootElement = root; + NS_IF_ADDREF(*aRootElement); + return NS_OK; } nsresult