diff --git a/layout/generic/nsFrameFrame.cpp b/layout/generic/nsFrameFrame.cpp index 1f68462674aa..43a805f7bf76 100644 --- a/layout/generic/nsFrameFrame.cpp +++ b/layout/generic/nsFrameFrame.cpp @@ -664,27 +664,10 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext, parentContainer = do_QueryInterface(presContainer); if (parentContainer) { parentContainer->ChildShellAdded(&mWebShell, content); - if (mWebShell) { - 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); - } - else { - // Inherit our type from our parent webshell. If it is - // chrome, we'll be chrome. If it is content, we'll be - // content. - nsWebShellType parentType; - parentShell->GetWebShellType(parentType); - mWebShell->SetWebShellType(parentType); - } - } } } } - } + } #endif // INCLUDE_XUL if (mWebShell == nsnull) { @@ -728,6 +711,24 @@ nsHTMLFrameInnerFrame::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); + } + 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) { diff --git a/layout/html/document/src/nsFrameFrame.cpp b/layout/html/document/src/nsFrameFrame.cpp index 1f68462674aa..43a805f7bf76 100644 --- a/layout/html/document/src/nsFrameFrame.cpp +++ b/layout/html/document/src/nsFrameFrame.cpp @@ -664,27 +664,10 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext, parentContainer = do_QueryInterface(presContainer); if (parentContainer) { parentContainer->ChildShellAdded(&mWebShell, content); - if (mWebShell) { - 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); - } - else { - // Inherit our type from our parent webshell. If it is - // chrome, we'll be chrome. If it is content, we'll be - // content. - nsWebShellType parentType; - parentShell->GetWebShellType(parentType); - mWebShell->SetWebShellType(parentType); - } - } } } } - } + } #endif // INCLUDE_XUL if (mWebShell == nsnull) { @@ -728,6 +711,24 @@ nsHTMLFrameInnerFrame::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); + } + 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) { diff --git a/xpfe/appshell/src/nsWebShellWindow.cpp b/xpfe/appshell/src/nsWebShellWindow.cpp index c99fd00ff04a..9373d15b63fc 100644 --- a/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/xpfe/appshell/src/nsWebShellWindow.cpp @@ -928,7 +928,7 @@ nsWebShellWindow::SetNewWebShellInfo(const nsString& aName, const nsString& anUR dummyShell->SetContainer(this); // Cache our webshell info. - newWindow->AddWebShellInfo("content-frame", aName, anURL, aOpenerShell, dummyShell); + newWindow->AddWebShellInfo("content", aName, anURL, aOpenerShell, dummyShell); return NS_OK; } diff --git a/xpfe/browser/src/contentframe.html b/xpfe/browser/src/contentframe.html index 8588c879b5de..2c04e7ce11e9 100644 --- a/xpfe/browser/src/contentframe.html +++ b/xpfe/browser/src/contentframe.html @@ -4,9 +4,7 @@ - - - + diff --git a/xpfe/browser/src/navigator.css b/xpfe/browser/src/navigator.css index 635d18d7e919..d10f522b744e 100644 --- a/xpfe/browser/src/navigator.css +++ b/xpfe/browser/src/navigator.css @@ -157,6 +157,8 @@ box#outer-box { } iframe#content-frame { + min-width: 10px; + min-height: 10px; width: 100px; height: 100px; } diff --git a/xpfe/browser/src/navigator.xul b/xpfe/browser/src/navigator.xul index 3865a4fd7210..f1e4fd823f5b 100644 --- a/xpfe/browser/src/navigator.xul +++ b/xpfe/browser/src/navigator.xul @@ -32,7 +32,7 @@ appCore.setContentWindow( window.frames[0].frames[1] ); // Call in to BrowserAppcore to load initial page. - appCore.loadInitialPage(); + //appCore.loadInitialPage(); } else { // Try again. dump("Scheduling later attempt to set content window\n"); @@ -728,7 +728,7 @@ - +