fixes for RegUnRegAccessKey

git-svn-id: svn://10.0.0.236/trunk@70033 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mjudge%netscape.com
2000-05-16 12:18:36 +00:00
parent b48cb878a4
commit d852583364
3 changed files with 35 additions and 6 deletions

View File

@@ -508,15 +508,20 @@ nsGfxTextControlFrame2::nsGfxTextControlFrame2()
nsGfxTextControlFrame2::~nsGfxTextControlFrame2()
{
nsFormControlFrame::RegUnRegAccessKey(nsnull, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
}
NS_IMETHODIMP
nsGfxTextControlFrame2::Destroy(nsIPresContext* aPresContext)
{
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE);
if (mFormFrame) {
mFormFrame->RemoveFormControlFrame(*this);
mFormFrame = nsnull;
}
return nsHTMLContainerFrame::Destroy(aPresContext);
}
// XXX: wouldn't it be nice to get this from the style context!
PRBool nsGfxTextControlFrame2::IsSingleLineTextControl() const
{
@@ -1158,7 +1163,7 @@ NS_IMETHODIMP nsGfxTextControlFrame2::Reflow(nsIPresContext* aPresConte
}
else if (eReflowReason_Initial == aReflowState.reason)
{
nsFormControlFrame::RegUnRegAccessKey(nsnull, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
nsFormFrame::AddFormControlFrame(aPresContext, *NS_STATIC_CAST(nsIFrame*, this));
nsCOMPtr<nsIHTMLContent> htmlContent;
nsString value;