bug 856779 - kill NS_NewPresShell() r=bz

This commit is contained in:
Trevor Saunders 2013-03-31 16:39:27 -04:00
Родитель d93f593627
Коммит 617729fa2f
5 изменённых файлов: 4 добавлений и 38 удалений

Просмотреть файл

@ -66,7 +66,7 @@
#include "nsContentCID.h"
#include "nsError.h"
#include "nsIPresShell.h"
#include "nsPresShell.h"
#include "nsPresContext.h"
#include "nsIJSON.h"
#include "nsThreadUtils.h"
@ -3322,13 +3322,8 @@ nsDocument::doCreateShell(nsPresContext* aContext,
FillStyleSet(aStyleSet);
nsCOMPtr<nsIPresShell> shell;
nsresult rv = NS_NewPresShell(getter_AddRefs(shell));
if (NS_FAILED(rv)) {
return rv;
}
rv = shell->Init(this, aContext, aViewManager, aStyleSet, aCompatMode);
nsRefPtr<PresShell> shell = new PresShell;
nsresult rv = shell->Init(this, aContext, aViewManager, aStyleSet, aCompatMode);
NS_ENSURE_SUCCESS(rv, rv);
// Note: we don't hold a ref to the shell (it holds a ref to us)
@ -3338,7 +3333,7 @@ nsDocument::doCreateShell(nsPresContext* aContext,
MaybeRescheduleAnimationFrameNotifications();
shell.swap(*aInstancePtrResult);
shell.forget(aInstancePtrResult);
return NS_OK;
}

Просмотреть файл

@ -1515,11 +1515,4 @@ protected:
nscoord mMaxLineBoxWidth;
};
/**
* Create a new empty presentation shell. Upon success, call Init
* before attempting to use the shell.
*/
nsresult
NS_NewPresShell(nsIPresShell** aInstancePtrResult);
#endif /* nsIPresShell_h___ */

Просмотреть файл

@ -686,20 +686,6 @@ nsIPresShell::FrameSelection()
//----------------------------------------------------------------------
nsresult
NS_NewPresShell(nsIPresShell** aInstancePtrResult)
{
NS_PRECONDITION(nullptr != aInstancePtrResult, "null ptr");
if (!aInstancePtrResult)
return NS_ERROR_NULL_POINTER;
*aInstancePtrResult = new PresShell();
NS_ADDREF(*aInstancePtrResult);
return NS_OK;
}
static bool sSynthMouseMove = true;
PresShell::PresShell()

Просмотреть файл

@ -18,10 +18,6 @@
#define NS_FRAME_UTIL_CID \
{ 0xa6cf90d5, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
// {E6FD9940-899D-11d2-8EAE-00805F29F370}
#define NS_PRESSHELL_CID \
{ 0xe6fd9940, 0x899d, 0x11d2, { 0x8e, 0xae, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
#define NS_DOMSELECTION_CID \
{/* {C87A37FC-8109-4ce2-A322-8CDEC925379F}*/ \
0xc87a37fc, 0x8109, 0x4ce2, { 0xa3, 0x22, 0x8c, 0xde, 0xc9, 0x25, 0x37, 0x9f } }

Просмотреть файл

@ -34,7 +34,6 @@
#include "nsINodeInfo.h"
#include "nsIObserver.h"
#include "nsIObserverService.h"
#include "nsIPresShell.h"
#include "nsIScriptNameSpaceManager.h"
#include "nsISelection.h"
#include "nsCaret.h"
@ -517,7 +516,6 @@ MAKE_CTOR(CreateNewLayoutDebugger, nsILayoutDebugger, NS_NewLay
#endif
MAKE_CTOR(CreateNewFrameTraversal, nsIFrameTraversal, NS_CreateFrameTraversal)
MAKE_CTOR(CreateNewPresShell, nsIPresShell, NS_NewPresShell)
MAKE_CTOR(CreateNewBoxObject, nsIBoxObject, NS_NewBoxObject)
#ifdef MOZ_XUL
@ -699,7 +697,6 @@ NS_DEFINE_NAMED_CID(NS_FRAME_UTIL_CID);
NS_DEFINE_NAMED_CID(NS_LAYOUT_DEBUGGER_CID);
#endif
NS_DEFINE_NAMED_CID(NS_FRAMETRAVERSAL_CID);
NS_DEFINE_NAMED_CID(NS_PRESSHELL_CID);
NS_DEFINE_NAMED_CID(NS_BOXOBJECT_CID);
#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(NS_LISTBOXOBJECT_CID);
@ -987,7 +984,6 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
{ &kNS_LAYOUT_DEBUGGER_CID, false, NULL, CreateNewLayoutDebugger },
#endif
{ &kNS_FRAMETRAVERSAL_CID, false, NULL, CreateNewFrameTraversal },
{ &kNS_PRESSHELL_CID, false, NULL, CreateNewPresShell },
{ &kNS_BOXOBJECT_CID, false, NULL, CreateNewBoxObject },
#ifdef MOZ_XUL
{ &kNS_LISTBOXOBJECT_CID, false, NULL, CreateNewListBoxObject },