зеркало из https://github.com/mozilla/gecko-dev.git
Bug 969035 - Outparamdel NS_NewContentViewer; r=bz
This commit is contained in:
Родитель
e9fea6452c
Коммит
f29b03ad4c
|
@ -458,14 +458,11 @@ private:
|
|||
//------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------
|
||||
nsresult
|
||||
NS_NewContentViewer(nsIContentViewer** aResult)
|
||||
already_AddRefed<nsIContentViewer>
|
||||
NS_NewContentViewer()
|
||||
{
|
||||
*aResult = new nsDocumentViewer();
|
||||
|
||||
NS_ADDREF(*aResult);
|
||||
|
||||
return NS_OK;
|
||||
nsRefPtr<nsDocumentViewer> viewer = new nsDocumentViewer();
|
||||
return viewer.forget();
|
||||
}
|
||||
|
||||
void nsDocumentViewer::PrepareToStartLoad()
|
||||
|
|
|
@ -47,8 +47,7 @@ static NS_DEFINE_IID(kVideoDocumentCID, NS_VIDEODOCUMENT_CID);
|
|||
static NS_DEFINE_IID(kImageDocumentCID, NS_IMAGEDOCUMENT_CID);
|
||||
static NS_DEFINE_IID(kXULDocumentCID, NS_XULDOCUMENT_CID);
|
||||
|
||||
nsresult
|
||||
NS_NewContentViewer(nsIContentViewer** aResult);
|
||||
already_AddRefed<nsIContentViewer> NS_NewContentViewer();
|
||||
|
||||
// XXXbz if you change the MIME types here, be sure to update
|
||||
// nsIParser.h and DetermineParseMode in nsParser.cpp and
|
||||
|
@ -281,12 +280,10 @@ nsContentDLF::CreateInstanceForDocument(nsISupports* aContainer,
|
|||
const char *aCommand,
|
||||
nsIContentViewer** aContentViewer)
|
||||
{
|
||||
nsCOMPtr<nsIContentViewer> contentViewer;
|
||||
nsresult rv = NS_NewContentViewer(getter_AddRefs(contentViewer));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsIContentViewer> contentViewer = NS_NewContentViewer();
|
||||
|
||||
// Bind the document to the Content Viewer
|
||||
rv = contentViewer->LoadStart(aDocument);
|
||||
nsresult rv = contentViewer->LoadStart(aDocument);
|
||||
contentViewer.forget(aContentViewer);
|
||||
return rv;
|
||||
}
|
||||
|
@ -396,9 +393,7 @@ nsContentDLF::CreateDocument(const char* aCommand,
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Create the content viewer XXX: could reuse content viewer here!
|
||||
nsCOMPtr<nsIContentViewer> contentViewer;
|
||||
rv = NS_NewContentViewer(getter_AddRefs(contentViewer));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsIContentViewer> contentViewer = NS_NewContentViewer();
|
||||
|
||||
doc->SetContainer(static_cast<nsDocShell*>(aContainer));
|
||||
|
||||
|
@ -428,9 +423,7 @@ nsContentDLF::CreateXULDocument(const char* aCommand,
|
|||
nsCOMPtr<nsIDocument> doc = do_CreateInstance(kXULDocumentCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIContentViewer> contentViewer;
|
||||
rv = NS_NewContentViewer(getter_AddRefs(contentViewer));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsCOMPtr<nsIContentViewer> contentViewer = NS_NewContentViewer();
|
||||
|
||||
nsCOMPtr<nsIURI> aURL;
|
||||
rv = aChannel->GetURI(getter_AddRefs(aURL));
|
||||
|
|
|
@ -472,7 +472,7 @@ nsresult NS_NewCanvasRenderingContextWebGL(nsIDOMWebGLRenderingContext** aResult
|
|||
nsresult NS_CreateFrameTraversal(nsIFrameTraversal** aResult);
|
||||
|
||||
nsresult NS_NewDomSelection(nsISelection** aResult);
|
||||
nsresult NS_NewContentViewer(nsIContentViewer** aResult);
|
||||
already_AddRefed<nsIContentViewer> NS_NewContentViewer();
|
||||
nsresult NS_NewGenRegularIterator(nsIContentIterator** aResult);
|
||||
nsresult NS_NewGenSubtreeIterator(nsIContentIterator** aInstancePtrResult);
|
||||
nsresult NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult);
|
||||
|
@ -546,7 +546,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(inCSSValueSearch)
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMUtils)
|
||||
|
||||
MAKE_CTOR(CreateNameSpaceManager, nsINameSpaceManager, NS_GetNameSpaceManager)
|
||||
MAKE_CTOR(CreateContentViewer, nsIContentViewer, NS_NewContentViewer)
|
||||
MAKE_CTOR2(CreateContentViewer, nsIContentViewer, NS_NewContentViewer)
|
||||
MAKE_CTOR(CreateHTMLDocument, nsIDocument, NS_NewHTMLDocument)
|
||||
MAKE_CTOR(CreateXMLDocument, nsIDocument, NS_NewXMLDocument)
|
||||
MAKE_CTOR(CreateSVGDocument, nsIDocument, NS_NewSVGDocument)
|
||||
|
|
Загрузка…
Ссылка в новой задаче