Bug 328926. Remove aPresContext parameter from nsIFrame::Destroy, nsIFrame::SetInitialChildList and nsIFrame::RemovedAsPrimaryFrame. patch by Marc Liddell, r+sr=roc

git-svn-id: svn://10.0.0.236/trunk@193976 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu
2006-04-10 00:16:29 +00:00
parent 5a0aae6de3
commit b6ebd9961d
109 changed files with 548 additions and 696 deletions

View File

@@ -1912,7 +1912,7 @@ nsComboboxControlFrame::CreateFrameFor(nsPresContext* aPresContext,
nsresult rv = mDisplayFrame->Init(mContent, this, nsnull);
if (NS_FAILED(rv)) {
mDisplayFrame->Destroy(aPresContext);
mDisplayFrame->Destroy();
mDisplayFrame = nsnull;
return rv;
}
@@ -1926,20 +1926,20 @@ nsComboboxControlFrame::CreateFrameFor(nsPresContext* aPresContext,
// initialize the text frame
rv = mTextFrame->Init(aContent, mDisplayFrame, nsnull);
if (NS_FAILED(rv)) {
mDisplayFrame->Destroy(aPresContext);
mDisplayFrame->Destroy();
mDisplayFrame = nsnull;
mTextFrame->Destroy(aPresContext);
mTextFrame->Destroy();
mTextFrame = nsnull;
return rv;
}
mDisplayFrame->SetInitialChildList(aPresContext, nsnull, mTextFrame);
mDisplayFrame->SetInitialChildList(nsnull, mTextFrame);
*aFrame = mDisplayFrame;
return NS_OK;
}
NS_IMETHODIMP
nsComboboxControlFrame::Destroy(nsPresContext* aPresContext)
void
nsComboboxControlFrame::Destroy()
{
// Revoke queued RedisplayTextEvents
nsCOMPtr<nsIEventQueue> eventQueue;
@@ -1950,7 +1950,7 @@ nsComboboxControlFrame::Destroy(nsPresContext* aPresContext)
eventQueue->RevokeEvents(this);
}
nsFormControlFrame::RegUnRegAccessKey(GetPresContext(), NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
nsFormControlFrame::RegUnRegAccessKey(NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
if (mDroppedDown) {
// Get parent view
@@ -1967,9 +1967,9 @@ nsComboboxControlFrame::Destroy(nsPresContext* aPresContext)
}
// Cleanup frames in popup child list
mPopupFrames.DestroyFrames(aPresContext);
mPopupFrames.DestroyFrames();
return nsAreaFrame::Destroy(aPresContext);
nsAreaFrame::Destroy();
}
@@ -1983,15 +1983,14 @@ nsComboboxControlFrame::GetFirstChild(nsIAtom* aListName) const
}
NS_IMETHODIMP
nsComboboxControlFrame::SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList)
nsComboboxControlFrame::SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList)
{
nsresult rv = NS_OK;
if (nsLayoutAtoms::popupList == aListName) {
mPopupFrames.SetFrames(aChildList);
} else {
rv = nsAreaFrame::SetInitialChildList(aPresContext, aListName, aChildList);
rv = nsAreaFrame::SetInitialChildList(aListName, aChildList);
for (nsIFrame * child = aChildList; child;
child = child->GetNextSibling()) {

View File

@@ -124,11 +124,10 @@ public:
#ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
NS_IMETHOD Destroy(nsPresContext* aPresContext);
virtual void Destroy();
virtual nsIFrame* GetFirstChild(nsIAtom* aListName) const;
NS_IMETHOD SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList);
NS_IMETHOD SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList);
virtual nsIAtom* GetAdditionalChildListName(PRInt32 aIndex) const;
virtual nsIFrame* GetContentInsertionFrame();

View File

@@ -70,8 +70,7 @@ public:
nsFieldSetFrame(nsStyleContext* aContext);
NS_IMETHOD SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
NS_IMETHOD SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList);
NS_IMETHOD Reflow(nsPresContext* aPresContext,
@@ -146,8 +145,7 @@ nsFieldSetFrame::IsContainingBlock() const
}
NS_IMETHODIMP
nsFieldSetFrame::SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
nsFieldSetFrame::SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList)
{
// Get the content and legend frames.
@@ -160,7 +158,7 @@ nsFieldSetFrame::SetInitialChildList(nsPresContext* aPresContext,
}
// Queue up the frames for the content frame
return nsHTMLContainerFrame::SetInitialChildList(aPresContext, nsnull, aChildList);
return nsHTMLContainerFrame::SetInitialChildList(nsnull, aChildList);
}
class nsDisplayFieldSetBorderBackground : public nsDisplayItem {
@@ -644,12 +642,12 @@ nsFieldSetFrame::RemoveFrame(nsIAtom* aListName,
NS_ASSERTION(!aListName, "Unexpected frame list when removing legend frame");
NS_ASSERTION(mLegendFrame->GetParent() == this, "Legend Parent has wrong parent");
NS_ASSERTION(mLegendFrame->GetNextSibling() == mContentFrame, "mContentFrame is not next sibling");
nsPresContext* presContext = GetPresContext();
mFrames.DestroyFrame(presContext, mLegendFrame);
mFrames.DestroyFrame(mLegendFrame);
mLegendFrame = nsnull;
AddStateBits(NS_FRAME_IS_DIRTY);
if (GetParent()) {
GetParent()->ReflowDirtyChild(presContext->GetPresShell(), this);
GetParent()->ReflowDirtyChild(GetPresContext()->GetPresShell(), this);
}
return NS_OK;
}

View File

@@ -111,7 +111,7 @@ nsFileControlFrame::~nsFileControlFrame()
}
void
nsFileControlFrame::PreDestroy(nsPresContext* aPresContext)
nsFileControlFrame::PreDestroy()
{
// Toss the value into the control from the anonymous content, which is about
// to get lost. Note that if the page is being torn down then the anonymous
@@ -135,21 +135,21 @@ nsFileControlFrame::PreDestroy(nsPresContext* aPresContext)
mDidPreDestroy = PR_TRUE;
}
NS_IMETHODIMP
nsFileControlFrame::Destroy(nsPresContext* aPresContext)
void
nsFileControlFrame::Destroy()
{
if (!mDidPreDestroy) {
PreDestroy(aPresContext);
PreDestroy();
}
mTextFrame = nsnull;
return nsAreaFrame::Destroy(aPresContext);
nsAreaFrame::Destroy();
}
void
nsFileControlFrame::RemovedAsPrimaryFrame(nsPresContext* aPresContext)
nsFileControlFrame::RemovedAsPrimaryFrame()
{
if (!mDidPreDestroy) {
PreDestroy(aPresContext);
PreDestroy();
}
#ifdef DEBUG
else {
@@ -458,11 +458,10 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsPresContext* aPresContext,
/*
NS_IMETHODIMP
nsFileControlFrame::SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList)
nsFileControlFrame::SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList)
{
nsresult r = nsAreaFrame::SetInitialChildList(aPresContext, aListName, aChildList);
nsAreaFrame::SetInitialChildList(aListName, aChildList);
// given that the CSS frame constructor created all our frames. We need to find the text field
// so we can get info from it.

View File

@@ -75,9 +75,9 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
virtual void RemovedAsPrimaryFrame(nsPresContext* aPresContext);
virtual void RemovedAsPrimaryFrame();
NS_IMETHOD Destroy(nsPresContext *aPresContext);
virtual void Destroy();
#ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
@@ -197,7 +197,7 @@ private:
* We call this when we are being destroyed or removed from the PFM.
* @param aPresContext the current pres context
*/
void PreDestroy(nsPresContext* aPresContext);
void PreDestroy();
NS_IMETHOD_(nsrefcnt) AddRef() { return 1; }
NS_IMETHOD_(nsrefcnt) Release() { return 1; }

View File

@@ -56,13 +56,13 @@ nsFormControlFrame::~nsFormControlFrame()
{
}
NS_IMETHODIMP
nsFormControlFrame::Destroy(nsPresContext *aPresContext)
void
nsFormControlFrame::Destroy()
{
// XXXldb Do we really need to do this? Shouldn't only those frames
// that use it do it?
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
return nsLeafFrame::Destroy(aPresContext);
nsFormControlFrame::RegUnRegAccessKey(NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
nsLeafFrame::Destroy();
}
// Frames are not refcounted, no need to AddRef
@@ -263,8 +263,7 @@ nsFormControlFrame::DidReflow(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsFormControlFrame::SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
nsFormControlFrame::SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList)
{
return NS_OK;
@@ -280,7 +279,7 @@ nsFormControlFrame::Reflow(nsPresContext* aPresContext,
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (!mDidInit) {
RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
RegUnRegAccessKey(NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
mDidInit = PR_TRUE;
}
@@ -294,17 +293,20 @@ nsFormControlFrame::Reflow(nsPresContext* aPresContext,
}
nsresult
nsFormControlFrame::RegUnRegAccessKey(nsPresContext* aPresContext, nsIFrame * aFrame, PRBool aDoReg)
nsFormControlFrame::RegUnRegAccessKey(nsIFrame * aFrame, PRBool aDoReg)
{
NS_ASSERTION(aPresContext, "aPresContext is NULL in RegUnRegAccessKey!");
NS_ENSURE_ARG_POINTER(aFrame);
nsPresContext* presContext = aFrame->GetPresContext();
NS_ASSERTION(presContext, "aPresContext is NULL in RegUnRegAccessKey!");
nsAutoString accessKey;
nsIContent* content = aFrame->GetContent();
content->GetAttr(kNameSpaceID_None, nsHTMLAtoms::accesskey, accessKey);
if (!accessKey.IsEmpty()) {
nsIEventStateManager *stateManager = aPresContext->EventStateManager();
nsIEventStateManager *stateManager = presContext->EventStateManager();
if (aDoReg) {
return stateManager->RegisterAccessKey(content, (PRUint32)accessKey.First());
} else {

View File

@@ -92,8 +92,7 @@ public:
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
NS_IMETHOD SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList);
NS_IMETHOD DidReflow(nsPresContext* aPresContext,
@@ -109,7 +108,7 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD Destroy(nsPresContext *aPresContext);
virtual void Destroy();
// new behavior
@@ -146,7 +145,7 @@ public:
PRBool& aBailOnWidth,
PRBool& aBailOnHeight);
// AccessKey Helper function
static nsresult RegUnRegAccessKey(nsPresContext* aPresContext, nsIFrame * aFrame, PRBool aDoReg);
static nsresult RegUnRegAccessKey(nsIFrame * aFrame, PRBool aDoReg);
/**
* Helper routine to that returns the height of the screen

View File

@@ -157,7 +157,7 @@ nsGfxButtonControlFrame::CreateFrameFor(nsPresContext* aPresContext,
// initialize the text frame
newFrame->Init(content, parentFrame, nsnull);
newFrame->SetInitialChildList(aPresContext, nsnull, nsnull);
newFrame->SetInitialChildList(nsnull, nsnull);
rv = NS_OK;
}
}

View File

@@ -90,11 +90,11 @@ nsHTMLButtonControlFrame::~nsHTMLButtonControlFrame()
{
}
NS_IMETHODIMP
nsHTMLButtonControlFrame::Destroy(nsPresContext *aPresContext)
void
nsHTMLButtonControlFrame::Destroy()
{
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
return nsHTMLContainerFrame::Destroy(aPresContext);
nsFormControlFrame::RegUnRegAccessKey(NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
nsHTMLContainerFrame::Destroy();
}
NS_IMETHODIMP
@@ -253,7 +253,7 @@ nsHTMLButtonControlFrame::Reflow(nsPresContext* aPresContext,
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (eReflowReason_Initial == aReflowState.reason) {
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
nsFormControlFrame::RegUnRegAccessKey(NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
}
#if 0

View File

@@ -64,7 +64,7 @@ public:
~nsHTMLButtonControlFrame();
NS_IMETHOD Destroy(nsPresContext *aPresContext);
virtual void Destroy();
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);

View File

@@ -72,7 +72,7 @@ public:
nsImageControlFrame(nsStyleContext* aContext);
~nsImageControlFrame();
NS_IMETHOD Destroy(nsPresContext *aPresContext);
virtual void Destroy();
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
NS_IMETHOD Reflow(nsPresContext* aPresContext,
@@ -125,12 +125,11 @@ nsImageControlFrame::~nsImageControlFrame()
{
}
NS_IMETHODIMP
nsImageControlFrame::Destroy(nsPresContext *aPresContext)
void
nsImageControlFrame::Destroy()
{
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
return nsImageControlFrameSuper::Destroy(aPresContext);
nsFormControlFrame::RegUnRegAccessKey(NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
nsImageControlFrameSuper::Destroy();
}
nsIFrame*
@@ -204,7 +203,7 @@ nsImageControlFrame::Reflow(nsPresContext* aPresContext,
DO_GLOBAL_REFLOW_COUNT("nsImageControlFrame", aReflowState.reason);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (aReflowState.reason == eReflowReason_Initial) {
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
nsFormControlFrame::RegUnRegAccessKey(NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
}
return nsImageControlFrameSuper::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
}

View File

@@ -71,11 +71,11 @@ nsLegendFrame::GetType() const
return nsLayoutAtoms::legendFrame;
}
NS_IMETHODIMP
nsLegendFrame::Destroy(nsPresContext *aPresContext)
void
nsLegendFrame::Destroy()
{
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
return nsAreaFrame::Destroy(aPresContext);
nsFormControlFrame::RegUnRegAccessKey(NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
nsAreaFrame::Destroy();
}
// Frames are not refcounted, no need to AddRef
@@ -102,7 +102,7 @@ nsLegendFrame::Reflow(nsPresContext* aPresContext,
DO_GLOBAL_REFLOW_COUNT("nsLegendFrame", aReflowState.reason);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (eReflowReason_Initial == aReflowState.reason) {
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
nsFormControlFrame::RegUnRegAccessKey(NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
}
return nsAreaFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
}

View File

@@ -63,7 +63,7 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD Destroy(nsPresContext *aPresContext);
virtual void Destroy();
virtual nsIAtom* GetType() const;

View File

@@ -315,8 +315,8 @@ nsListControlFrame::~nsListControlFrame()
}
// for Bug 47302 (remove this comment later)
NS_IMETHODIMP
nsListControlFrame::Destroy(nsPresContext *aPresContext)
void
nsListControlFrame::Destroy()
{
// get the receiver interface from the browser button's content node
nsCOMPtr<nsIDOMEventReceiver> receiver(do_QueryInterface(mContent));
@@ -338,8 +338,8 @@ nsListControlFrame::Destroy(nsPresContext *aPresContext)
mEventListener),
NS_GET_IID(nsIDOMKeyListener));
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
return nsHTMLScrollFrame::Destroy(aPresContext);
nsFormControlFrame::RegUnRegAccessKey(NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
nsHTMLScrollFrame::Destroy();
}
NS_IMETHODIMP
@@ -751,7 +751,7 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
// Add the list frame as a child of the form
if (eReflowReason_Initial == aReflowState.reason) {
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
nsFormControlFrame::RegUnRegAccessKey(NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
}
//--Calculate a width just big enough for the scrollframe to shrink around the
@@ -1391,8 +1391,7 @@ nsListControlFrame::HandleEvent(nsPresContext* aPresContext,
//---------------------------------------------------------
NS_IMETHODIMP
nsListControlFrame::SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
nsListControlFrame::SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList)
{
// First check to see if all the content has been added
@@ -1401,7 +1400,7 @@ nsListControlFrame::SetInitialChildList(nsPresContext* aPresContext,
mIsAllFramesHere = PR_FALSE;
mHasBeenInitialized = PR_FALSE;
}
nsresult rv = nsHTMLScrollFrame::SetInitialChildList(aPresContext, aListName, aChildList);
nsresult rv = nsHTMLScrollFrame::SetInitialChildList(aListName, aChildList);
// If all the content is here now check
// to see if all the frames have been created

View File

@@ -89,8 +89,7 @@ public:
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
NS_IMETHOD SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList);
NS_IMETHOD Reflow(nsPresContext* aCX,
@@ -105,7 +104,7 @@ public:
NS_IMETHOD DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus);
NS_IMETHOD Destroy(nsPresContext *aPresContext);
virtual void Destroy();
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,

View File

@@ -1051,7 +1051,7 @@ SuppressEventHandlers(nsPresContext* aPresContext)
}
void
nsTextControlFrame::PreDestroy(nsPresContext* aPresContext)
nsTextControlFrame::PreDestroy()
{
// notify the editor that we are going away
if (mEditor)
@@ -1076,7 +1076,7 @@ nsTextControlFrame::PreDestroy(nsPresContext* aPresContext)
// Clean up the controller
if (!SuppressEventHandlers(aPresContext))
if (!SuppressEventHandlers(GetPresContext()))
{
nsCOMPtr<nsIControllers> controllers;
nsCOMPtr<nsIDOMNSHTMLInputElement> inputElement = do_QueryInterface(mContent);
@@ -1117,7 +1117,7 @@ nsTextControlFrame::PreDestroy(nsPresContext* aPresContext)
//unregister self from content
mTextListener->SetFrame(nsnull);
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
nsFormControlFrame::RegUnRegAccessKey(NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
if (mTextListener)
{
nsCOMPtr<nsIDOMEventReceiver> erP = do_QueryInterface(mContent);
@@ -1146,22 +1146,22 @@ nsTextControlFrame::PreDestroy(nsPresContext* aPresContext)
mDidPreDestroy = PR_TRUE;
}
NS_IMETHODIMP
nsTextControlFrame::Destroy(nsPresContext* aPresContext)
void
nsTextControlFrame::Destroy()
{
nsContentUtils::UnregisterPrefCallback(PREF_DEFAULT_SPELLCHECK,
nsTextControlFrame::RealTimeSpellCallback, this);
if (!mDidPreDestroy) {
PreDestroy(aPresContext);
PreDestroy();
}
return nsBoxFrame::Destroy(aPresContext);
nsBoxFrame::Destroy();
}
void
nsTextControlFrame::RemovedAsPrimaryFrame(nsPresContext* aPresContext)
nsTextControlFrame::RemovedAsPrimaryFrame()
{
if (!mDidPreDestroy) {
PreDestroy(aPresContext);
PreDestroy();
}
else NS_ASSERTION(PR_FALSE, "RemovedAsPrimaryFrame called after PreDestroy");
}
@@ -1831,7 +1831,7 @@ nsTextControlFrame::Reflow(nsPresContext* aPresContext,
// make sure the the form registers itself on the initial/first reflow
if (mState & NS_FRAME_FIRST_REFLOW) {
nsFormControlFrame::RegUnRegAccessKey(aPresContext, this, PR_TRUE);
nsFormControlFrame::RegUnRegAccessKey(this, PR_TRUE);
}
nsresult rv = nsStackFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
@@ -2828,11 +2828,10 @@ nsTextControlFrame::SetValue(const nsAString& aValue)
NS_IMETHODIMP
nsTextControlFrame::SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList)
nsTextControlFrame::SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList)
{
nsresult rv = nsBoxFrame::SetInitialChildList(aPresContext, aListName, aChildList);
nsresult rv = nsBoxFrame::SetInitialChildList(aListName, aChildList);
if (mEditor)
mEditor->PostCreate();
//look for scroll view below this frame go along first child list
@@ -2863,7 +2862,7 @@ nsTextControlFrame::SetInitialChildList(nsPresContext* aPresContext,
rv = erP->AddEventListenerByIID(NS_STATIC_CAST(nsIDOMFocusListener *,mTextListener), NS_GET_IID(nsIDOMFocusListener));
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register focus listener");
// XXXbryner do we need to check for a null presshell here?
if (!aPresContext->GetPresShell())
if (!GetPresContext()->GetPresShell())
return NS_ERROR_FAILURE;
}

View File

@@ -75,9 +75,9 @@ public:
nsTextControlFrame(nsIPresShell* aShell, nsStyleContext* aContext);
virtual ~nsTextControlFrame();
virtual void RemovedAsPrimaryFrame(nsPresContext* aPresContext);
virtual void RemovedAsPrimaryFrame();
NS_IMETHOD Destroy(nsPresContext* aPresContext);
virtual void Destroy();
NS_IMETHOD Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
@@ -113,9 +113,8 @@ public:
// Utility methods to set current widget state
void SetValue(const nsAString& aValue);
NS_IMETHOD SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList);
NS_IMETHOD SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList);
//==== BEGIN NSIFORMCONTROLFRAME
virtual void SetFocus(PRBool aOn , PRBool aRepaint);
@@ -230,7 +229,7 @@ protected:
* We call this when we are being destroyed or removed from the PFM.
* @param aPresContext the current pres context
*/
void PreDestroy(nsPresContext* aPresContext);
void PreDestroy();
/**
* Fire the onChange event.
*/