Bug 253889: DeCOMtaminate nsIPresShell - Rev IID and remove NS_NewPresShell. r=roc

--HG--
extra : rebase_source : 55acb1008a92cd6c13760591c086c52ac9cb3e74
This commit is contained in:
Craig Topper 2010-03-31 08:47:25 -04:00
parent c61d158305
commit 0a69c7d1ea
2 changed files with 26 additions and 28 deletions

View File

@ -127,8 +127,8 @@ typedef struct CapturingContentInfo {
} CapturingContentInfo;
#define NS_IPRESSHELL_IID \
{ 0xc8f0b83e, 0x7457, 0x4367, \
{ 0xa9, 0x82, 0xe1, 0xfa, 0x11, 0xf9, 0x60, 0xbc } }
{ 0x1ebeb94c, 0x2112, 0x431d, \
{ 0xac, 0x6b, 0xdf, 0x26, 0x13, 0x83, 0xea, 0xfb } }
// Constants for ScrollContentIntoView() function
#define NS_PRESSHELL_SCROLL_TOP 0
@ -240,12 +240,9 @@ public:
nsIViewManager* GetViewManager() const { return mViewManager; }
#ifdef _IMPL_NS_LAYOUT
nsStyleSet* StyleSet() { return mStyleSet; }
nsStyleSet* StyleSet() const { return mStyleSet; }
nsCSSFrameConstructor* FrameConstructor()
{
return mFrameConstructor;
}
nsCSSFrameConstructor* FrameConstructor() const { return mFrameConstructor; }
nsFrameManager* FrameManager() const {
return reinterpret_cast<nsFrameManager*>
@ -260,7 +257,7 @@ public:
// XXX these could easily be inlined, but there is a circular #include
// problem with nsStyleSet.
NS_HIDDEN_(void) SetAuthorStyleDisabled(PRBool aDisabled);
NS_HIDDEN_(PRBool) GetAuthorStyleDisabled();
NS_HIDDEN_(PRBool) GetAuthorStyleDisabled() const;
/*
* Called when stylesheets are added/removed/enabled/disabled to rebuild
@ -301,7 +298,7 @@ public:
* ConstFrameSelection returns an object which methods are safe to use for
* example in nsIFrame code.
*/
const nsFrameSelection* ConstFrameSelection() { return mSelection; }
const nsFrameSelection* ConstFrameSelection() const { return mSelection; }
// Make shell be a document observer. If called after Destroy() has
// been called on the shell, this will be ignored.
@ -561,8 +558,8 @@ public:
* in the specified direction
*/
virtual nsRectVisibility GetRectVisibility(nsIFrame *aFrame,
const nsRect &aRect,
nscoord aMinTwips) = 0;
const nsRect &aRect,
nscoord aMinTwips) const = 0;
/**
* Suppress notification of the frame manager that frames are
@ -580,12 +577,12 @@ public:
/**
* Get link location.
*/
virtual NS_HIDDEN_(nsresult) GetLinkLocation(nsIDOMNode* aNode, nsAString& aLocation) = 0;
virtual NS_HIDDEN_(nsresult) GetLinkLocation(nsIDOMNode* aNode, nsAString& aLocation) const = 0;
/**
* Get the caret, if it exists. AddRefs it.
*/
virtual NS_HIDDEN_(already_AddRefed<nsCaret>) GetCaret() = 0;
virtual NS_HIDDEN_(already_AddRefed<nsCaret>) GetCaret() const = 0;
/**
* Invalidate the caret's current position if it's outside of its frame's

View File

@ -731,13 +731,13 @@ public:
PRIntn aHPercent,
PRUint32 aFlags);
virtual nsRectVisibility GetRectVisibility(nsIFrame *aFrame,
const nsRect &aRect,
nscoord aMinTwips);
const nsRect &aRect,
nscoord aMinTwips) const;
virtual NS_HIDDEN_(void) SetIgnoreFrameDestruction(PRBool aIgnore);
virtual NS_HIDDEN_(void) NotifyDestroyingFrame(nsIFrame* aFrame);
virtual NS_HIDDEN_(nsresult) GetLinkLocation(nsIDOMNode* aNode, nsAString& aLocationString);
virtual NS_HIDDEN_(nsresult) GetLinkLocation(nsIDOMNode* aNode, nsAString& aLocationString) const;
virtual NS_HIDDEN_(nsresult) CaptureHistoryState(nsILayoutHistoryState** aLayoutHistoryState, PRBool aLeavingPage);
@ -809,7 +809,7 @@ public:
NS_IMETHOD_(void) ClearMouseCapture(nsIView* aView);
// caret handling
virtual NS_HIDDEN_(already_AddRefed<nsCaret>) GetCaret();
virtual NS_HIDDEN_(already_AddRefed<nsCaret>) GetCaret() const;
virtual NS_HIDDEN_(void) MaybeInvalidateCaretPosition();
NS_IMETHOD SetCaretEnabled(PRBool aInEnable);
NS_IMETHOD SetCaretReadOnly(PRBool aReadOnly);
@ -1492,15 +1492,16 @@ nsresult
NS_NewPresShell(nsIPresShell** aInstancePtrResult)
{
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
if (nsnull == aInstancePtrResult) {
if (!aInstancePtrResult)
return NS_ERROR_NULL_POINTER;
}
PresShell* it = new PresShell();
if (nsnull == it) {
*aInstancePtrResult = new PresShell();
if (!*aInstancePtrResult)
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(NS_GET_IID(nsIPresShell),
(void **) aInstancePtrResult);
NS_ADDREF(*aInstancePtrResult);
return NS_OK;
}
PresShell::PresShell()
@ -1948,7 +1949,7 @@ nsIPresShell::SetAuthorStyleDisabled(PRBool aStyleDisabled)
}
PRBool
nsIPresShell::GetAuthorStyleDisabled()
nsIPresShell::GetAuthorStyleDisabled() const
{
return mStyleSet->GetAuthorStyleDisabled();
}
@ -4154,8 +4155,8 @@ PresShell::ScrollFrameRectIntoView(nsIFrame* aFrame,
nsRectVisibility
PresShell::GetRectVisibility(nsIFrame* aFrame,
const nsRect &aRect,
nscoord aMinTwips)
const nsRect &aRect,
nscoord aMinTwips) const
{
nsIFrame* rootFrame = FrameManager()->GetRootFrame();
NS_ASSERTION(rootFrame,
@ -4191,7 +4192,7 @@ PresShell::GetRectVisibility(nsIFrame* aFrame,
}
// GetLinkLocation: copy link location to clipboard
nsresult PresShell::GetLinkLocation(nsIDOMNode* aNode, nsAString& aLocationString)
nsresult PresShell::GetLinkLocation(nsIDOMNode* aNode, nsAString& aLocationString) const
{
#ifdef DEBUG_dr
printf("dr :: PresShell::GetLinkLocation\n");