From c50284c06b0c2a3f53b99bc8380ff76c5be73e7a Mon Sep 17 00:00:00 2001 From: "buster%netscape.com" Date: Mon, 6 Mar 2000 04:08:05 +0000 Subject: [PATCH] fixed bug 29837 and part of bug 29790 (the part about the url bar ceasing to respond) r=rods, brade a=jar git-svn-id: svn://10.0.0.236/trunk@62258 18797224-902f-48f8-a5cc-f745e15eee43 --- .../layout/html/forms/src/nsGfxTextControlFrame.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp b/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp index 77b99dfeadc..ff6b09aa4f3 100644 --- a/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp @@ -1374,10 +1374,11 @@ void nsGfxTextControlFrame::SetTextControlFrameState(const nsString& aValue) } } else { - if (mCachedState) delete mCachedState; - mCachedState = new nsString(aValue); - NS_ASSERTION(mCachedState, "Error: new nsString failed!"); - //if (!mCachedState) rv = NS_ERROR_OUT_OF_MEMORY; + if (mCachedState == nsnull) { + mCachedState = new nsString(aValue); + } else { + *mCachedState = aValue; + } if (mDisplayContent) { const PRUnichar *text = mCachedState->GetUnicode(); @@ -1626,6 +1627,8 @@ nsGfxTextControlFrame::CreateWebShell(nsIPresContext* aPresContext, ); if (NS_FAILED(rv)) { return rv; } NS_RELEASE(widget); + // move the view to the proper location + viewMan->MoveViewTo(view, origin.x, origin.y); #ifdef NEW_WEBSHELL_INTERFACES mWebShell->SetDocLoaderObserver(mTempObserver); @@ -2388,6 +2391,8 @@ nsGfxTextControlFrame::Reflow(nsIPresContext* aPresContext, printf("%p mDisplayFrame resized to: x=%d, y=%d, w=%d, h=%d\n", mDisplayFrame, subBounds.x, subBounds.y, subBounds.width, subBounds.height); #endif mDisplayFrame->SetRect(aPresContext, subBounds); + // finish the reflow + mDisplayFrame->DidReflow(aPresContext, NS_FRAME_REFLOW_FINISHED); } } }