From 389ee6e6a0344d30feaf4ccb4dbb2300d56c7023 Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Wed, 2 Aug 2000 22:12:11 +0000 Subject: [PATCH] moved the RegUnRegAccessKey to the Destroy method b=47302 r=kmcclusk git-svn-id: svn://10.0.0.236/trunk@75430 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsFormControlFrame.cpp | 8 +++++++- mozilla/layout/forms/nsFormControlFrame.h | 2 ++ mozilla/layout/forms/nsLegendFrame.cpp | 8 +++++++- mozilla/layout/forms/nsLegendFrame.h | 1 + mozilla/layout/html/forms/src/nsFormControlFrame.cpp | 8 +++++++- mozilla/layout/html/forms/src/nsFormControlFrame.h | 2 ++ mozilla/layout/html/forms/src/nsLegendFrame.cpp | 8 +++++++- mozilla/layout/html/forms/src/nsLegendFrame.h | 1 + 8 files changed, 34 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/forms/nsFormControlFrame.cpp b/mozilla/layout/forms/nsFormControlFrame.cpp index dc4053127fe..67077c83435 100644 --- a/mozilla/layout/forms/nsFormControlFrame.cpp +++ b/mozilla/layout/forms/nsFormControlFrame.cpp @@ -126,7 +126,13 @@ nsFormControlFrame::~nsFormControlFrame() mFormFrame->RemoveRadioControlFrame(this); 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 diff --git a/mozilla/layout/forms/nsFormControlFrame.h b/mozilla/layout/forms/nsFormControlFrame.h index e4dc50bc152..41a8710d2e3 100644 --- a/mozilla/layout/forms/nsFormControlFrame.h +++ b/mozilla/layout/forms/nsFormControlFrame.h @@ -117,6 +117,8 @@ public: const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); + NS_IMETHOD Destroy(nsIPresContext *aPresContext); + // new behavior /** diff --git a/mozilla/layout/forms/nsLegendFrame.cpp b/mozilla/layout/forms/nsLegendFrame.cpp index a3ec978ee24..115192eb0c7 100644 --- a/mozilla/layout/forms/nsLegendFrame.cpp +++ b/mozilla/layout/forms/nsLegendFrame.cpp @@ -66,7 +66,13 @@ 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 diff --git a/mozilla/layout/forms/nsLegendFrame.h b/mozilla/layout/forms/nsLegendFrame.h index 88cc1a8d5ad..19101c463db 100644 --- a/mozilla/layout/forms/nsLegendFrame.h +++ b/mozilla/layout/forms/nsLegendFrame.h @@ -50,6 +50,7 @@ public: const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); + NS_IMETHOD Destroy(nsIPresContext *aPresContext); #ifdef NS_DEBUG NS_IMETHOD GetFrameName(nsString& aResult) const; diff --git a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp index dc4053127fe..67077c83435 100644 --- a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp @@ -126,7 +126,13 @@ nsFormControlFrame::~nsFormControlFrame() mFormFrame->RemoveRadioControlFrame(this); 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 diff --git a/mozilla/layout/html/forms/src/nsFormControlFrame.h b/mozilla/layout/html/forms/src/nsFormControlFrame.h index e4dc50bc152..41a8710d2e3 100644 --- a/mozilla/layout/html/forms/src/nsFormControlFrame.h +++ b/mozilla/layout/html/forms/src/nsFormControlFrame.h @@ -117,6 +117,8 @@ public: const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); + NS_IMETHOD Destroy(nsIPresContext *aPresContext); + // new behavior /** diff --git a/mozilla/layout/html/forms/src/nsLegendFrame.cpp b/mozilla/layout/html/forms/src/nsLegendFrame.cpp index a3ec978ee24..115192eb0c7 100644 --- a/mozilla/layout/html/forms/src/nsLegendFrame.cpp +++ b/mozilla/layout/html/forms/src/nsLegendFrame.cpp @@ -66,7 +66,13 @@ 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 diff --git a/mozilla/layout/html/forms/src/nsLegendFrame.h b/mozilla/layout/html/forms/src/nsLegendFrame.h index 88cc1a8d5ad..19101c463db 100644 --- a/mozilla/layout/html/forms/src/nsLegendFrame.h +++ b/mozilla/layout/html/forms/src/nsLegendFrame.h @@ -50,6 +50,7 @@ public: const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); + NS_IMETHOD Destroy(nsIPresContext *aPresContext); #ifdef NS_DEBUG NS_IMETHOD GetFrameName(nsString& aResult) const;