moved the RegUnRegAccessKey to the Destroy method

b=47302 r=kmcclusk
This commit is contained in:
rods@netscape.com
2000-08-02 22:12:11 +00:00
parent 65f4853ae2
commit 785525d14e
8 changed files with 34 additions and 4 deletions

View File

@@ -126,7 +126,13 @@ nsFormControlFrame::~nsFormControlFrame()
mFormFrame->RemoveRadioControlFrame(this); mFormFrame->RemoveRadioControlFrame(this);
mFormFrame = nsnull; mFormFrame = nsnull;
} }
RegUnRegAccessKey(mPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE); }
NS_IMETHODIMP
nsFormControlFrame::Destroy(nsIPresContext *aPresContext)
{
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
return nsLeafFrame::Destroy(aPresContext);
} }
// Frames are not refcounted, no need to AddRef // Frames are not refcounted, no need to AddRef

View File

@@ -117,6 +117,8 @@ public:
const nsHTMLReflowState& aReflowState, const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus); nsReflowStatus& aStatus);
NS_IMETHOD Destroy(nsIPresContext *aPresContext);
// new behavior // new behavior
/** /**

View File

@@ -66,7 +66,13 @@ nsLegendFrame::nsLegendFrame()
nsLegendFrame::~nsLegendFrame() nsLegendFrame::~nsLegendFrame()
{ {
nsFormControlFrame::RegUnRegAccessKey(mPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE); }
NS_IMETHODIMP
nsLegendFrame::Destroy(nsIPresContext *aPresContext)
{
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
return nsAreaFrame::Destroy(aPresContext);
} }
// Frames are not refcounted, no need to AddRef // Frames are not refcounted, no need to AddRef

View File

@@ -50,6 +50,7 @@ public:
const nsHTMLReflowState& aReflowState, const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus); nsReflowStatus& aStatus);
NS_IMETHOD Destroy(nsIPresContext *aPresContext);
#ifdef NS_DEBUG #ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsString& aResult) const; NS_IMETHOD GetFrameName(nsString& aResult) const;

View File

@@ -126,7 +126,13 @@ nsFormControlFrame::~nsFormControlFrame()
mFormFrame->RemoveRadioControlFrame(this); mFormFrame->RemoveRadioControlFrame(this);
mFormFrame = nsnull; mFormFrame = nsnull;
} }
RegUnRegAccessKey(mPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE); }
NS_IMETHODIMP
nsFormControlFrame::Destroy(nsIPresContext *aPresContext)
{
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
return nsLeafFrame::Destroy(aPresContext);
} }
// Frames are not refcounted, no need to AddRef // Frames are not refcounted, no need to AddRef

View File

@@ -117,6 +117,8 @@ public:
const nsHTMLReflowState& aReflowState, const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus); nsReflowStatus& aStatus);
NS_IMETHOD Destroy(nsIPresContext *aPresContext);
// new behavior // new behavior
/** /**

View File

@@ -66,7 +66,13 @@ nsLegendFrame::nsLegendFrame()
nsLegendFrame::~nsLegendFrame() nsLegendFrame::~nsLegendFrame()
{ {
nsFormControlFrame::RegUnRegAccessKey(mPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE); }
NS_IMETHODIMP
nsLegendFrame::Destroy(nsIPresContext *aPresContext)
{
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
return nsAreaFrame::Destroy(aPresContext);
} }
// Frames are not refcounted, no need to AddRef // Frames are not refcounted, no need to AddRef

View File

@@ -50,6 +50,7 @@ public:
const nsHTMLReflowState& aReflowState, const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus); nsReflowStatus& aStatus);
NS_IMETHOD Destroy(nsIPresContext *aPresContext);
#ifdef NS_DEBUG #ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsString& aResult) const; NS_IMETHOD GetFrameName(nsString& aResult) const;