From fdaf1a49b4727f7f27abd6c9b2c24394bfad9131 Mon Sep 17 00:00:00 2001 From: "sfraser%netscape.com" Date: Thu, 22 Jul 1999 23:48:48 +0000 Subject: [PATCH] Fix for GFX ender text widgets; don't parent nsIWebShells that the text widget creates, because you don't want them to interfere with window.frames[]. --- .../html/forms/src/nsGfxTextControlFrame.cpp | 25 +++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/layout/html/forms/src/nsGfxTextControlFrame.cpp b/layout/html/forms/src/nsGfxTextControlFrame.cpp index 2f9e7b37917..3d6c74e9236 100644 --- a/layout/html/forms/src/nsGfxTextControlFrame.cpp +++ b/layout/html/forms/src/nsGfxTextControlFrame.cpp @@ -533,6 +533,7 @@ nsGfxTextControlFrame::PaintTextControl(nsIPresContext& aPresContext, void nsGfxTextControlFrame::GetTextControlFrameState(nsString& aValue) { aValue = ""; // initialize out param + if (PR_TRUE==IsInitialized()) { nsString format ("text/html"); mEditor->OutputToString(aValue, format, 0); @@ -628,6 +629,8 @@ nsGfxTextControlFrame::CreateWebShell(nsIPresContext& aPresContext, mWebShell->SetMarginHeight(0); nsCompatibility mode; aPresContext.GetCompatibilityMode(&mode); + +#if 0 mWebShell->SetIsFrame(PR_TRUE); /* XXX @@ -657,27 +660,6 @@ nsGfxTextControlFrame::CreateWebShell(nsIPresContext& aPresContext, NS_RELEASE(outerContainer); } -#ifdef INCLUDE_XUL - nsWebShellType parentType; - outerShell->GetWebShellType(parentType); - nsIAtom* typeAtom = NS_NewAtom("type"); - nsAutoString value; - content->GetAttribute(kNameSpaceID_None, typeAtom, value); - if (value.EqualsIgnoreCase("content")) { - // The web shell's type is content. - mWebShell->SetWebShellType(nsWebShellContent); - nsCOMPtr shellAsContainer; - shellAsContainer = do_QueryInterface(mWebShell); - shellAsContainer->ContentShellAdded(mWebShell, content); - } - else { - // Inherit our type from our parent webshell. If it is - // chrome, we'll be chrome. If it is content, we'll be - // content. - mWebShell->SetWebShellType(parentType); - } -#endif // INCLUDE_XUL - nsIPref* outerPrefs = nsnull; // connect the prefs outerShell->GetPrefs(outerPrefs); if (nsnull != outerPrefs) @@ -689,6 +671,7 @@ nsGfxTextControlFrame::CreateWebShell(nsIPresContext& aPresContext, } NS_RELEASE(container); } +#endif float t2p; aPresContext.GetTwipsToPixels(&t2p);