From f7fc69df540191ef06ee2e1aee73197561fbff04 Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Tue, 6 Jul 1999 18:53:41 +0000 Subject: [PATCH] Trying to fix build bustage. git-svn-id: svn://10.0.0.236/trunk@38408 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/xul/document/src/nsXULDocument.cpp | 11 ++++++++++- mozilla/rdf/content/src/nsXULDocument.cpp | 11 ++++++++++- mozilla/xpfe/appshell/src/nsWebShellWindow.cpp | 7 +++++++ mozilla/xpfe/appshell/src/nsWebShellWindow.h | 1 + 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/mozilla/content/xul/document/src/nsXULDocument.cpp b/mozilla/content/xul/document/src/nsXULDocument.cpp index ecb2bd3ba21..b3c83f7373c 100644 --- a/mozilla/content/xul/document/src/nsXULDocument.cpp +++ b/mozilla/content/xul/document/src/nsXULDocument.cpp @@ -108,6 +108,7 @@ #include "rdf.h" #include "nsIFrameReflow.h" +#include "nsIBrowserWindow.h" #include "nsIDOMXULFocusTracker.h" #include "nsIXULFocusTracker.h" #include "nsIDOMEventCapturer.h" @@ -3960,6 +3961,7 @@ XULDocumentImpl::StartLayout(void) nsCOMPtr cx; shell->GetPresContext(getter_AddRefs(cx)); + PRBool intrinsic = PR_FALSE; if (cx) { nsCOMPtr container; cx->GetContainer(getter_AddRefs(container)); @@ -3968,13 +3970,20 @@ XULDocumentImpl::StartLayout(void) webShell = do_QueryInterface(container); if (webShell) { webShell->SetScrolling(NS_STYLE_OVERFLOW_HIDDEN); + nsCOMPtr webShellContainer; + webShell->GetContainer(*getter_AddRefs(webShellContainer)); + if (webShellContainer) { + nsCOMPtr browser = do_QueryInterface(webShellContainer); + if (browser) + browser->IsIntrinsicallySized(intrinsic); + } } } } nsRect r; cx->GetVisibleArea(r); - if (r.width < 5 || r.height < 5) { + if (intrinsic) { // Flow at an unconstrained width and height r.width = NS_UNCONSTRAINEDSIZE; r.height = NS_UNCONSTRAINEDSIZE; diff --git a/mozilla/rdf/content/src/nsXULDocument.cpp b/mozilla/rdf/content/src/nsXULDocument.cpp index ecb2bd3ba21..b3c83f7373c 100644 --- a/mozilla/rdf/content/src/nsXULDocument.cpp +++ b/mozilla/rdf/content/src/nsXULDocument.cpp @@ -108,6 +108,7 @@ #include "rdf.h" #include "nsIFrameReflow.h" +#include "nsIBrowserWindow.h" #include "nsIDOMXULFocusTracker.h" #include "nsIXULFocusTracker.h" #include "nsIDOMEventCapturer.h" @@ -3960,6 +3961,7 @@ XULDocumentImpl::StartLayout(void) nsCOMPtr cx; shell->GetPresContext(getter_AddRefs(cx)); + PRBool intrinsic = PR_FALSE; if (cx) { nsCOMPtr container; cx->GetContainer(getter_AddRefs(container)); @@ -3968,13 +3970,20 @@ XULDocumentImpl::StartLayout(void) webShell = do_QueryInterface(container); if (webShell) { webShell->SetScrolling(NS_STYLE_OVERFLOW_HIDDEN); + nsCOMPtr webShellContainer; + webShell->GetContainer(*getter_AddRefs(webShellContainer)); + if (webShellContainer) { + nsCOMPtr browser = do_QueryInterface(webShellContainer); + if (browser) + browser->IsIntrinsicallySized(intrinsic); + } } } } nsRect r; cx->GetVisibleArea(r); - if (r.width < 5 || r.height < 5) { + if (intrinsic) { // Flow at an unconstrained width and height r.width = NS_UNCONSTRAINEDSIZE; r.height = NS_UNCONSTRAINEDSIZE; diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index cb3c545d7c6..4654138eb3a 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -2855,3 +2855,10 @@ nsWebShellWindow::HandleUrl(const PRUnichar * aCommand, const PRUnichar * aURLSp return NS_OK; } + +NS_IMETHODIMP +nsWebShellWindow::IsIntrinsicallySized(PRBool& aResult) +{ + aResult = mIntrinsicallySized; + return NS_OK; +} diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.h b/mozilla/xpfe/appshell/src/nsWebShellWindow.h index cd4bc68113e..2176b2e1eb3 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.h +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.h @@ -232,6 +232,7 @@ public: NS_IMETHOD SizeWindowTo(PRInt32 aWidth, PRInt32 aHeight); NS_IMETHOD GetContentBounds(nsRect& aResult); NS_IMETHOD GetWindowBounds(nsRect& aResult); + NS_IMETHOD IsIntrinsicallySized(PRBool& aResult); NS_IMETHOD Show() { Show(PR_TRUE); return NS_OK; } NS_IMETHOD Hide() { Show(PR_FALSE); return NS_OK; } NS_IMETHOD SetChrome(PRUint32 aNewChromeMask);