From afb0729ff52ce4a44cf23424edef5ca39f4d6bee Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Mon, 2 Nov 1998 22:19:08 +0000 Subject: [PATCH] Added an extra parameter to the Init to tell it whether it should have a sunken border git-svn-id: svn://10.0.0.236/trunk@13919 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 8 +++++--- mozilla/webshell/public/nsIWebShell.h | 3 ++- mozilla/webshell/src/nsWebShell.cpp | 8 +++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 41a91717986..fd05c6f413d 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -126,7 +126,8 @@ public: NS_IMETHOD Init(nsNativeWidget aNativeParent, PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h, nsScrollPreference aScrolling = nsScrollPreference_kAuto, - PRBool aAllowPlugins = PR_TRUE); + PRBool aAllowPlugins = PR_TRUE, + PRBool aIsSunkenBorder = PR_TRUE); NS_IMETHOD Destroy(void); NS_IMETHOD GetBounds(PRInt32 &x, PRInt32 &y, PRInt32 &w, PRInt32 &h); NS_IMETHOD SetBounds(PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h); @@ -562,7 +563,8 @@ NS_IMETHODIMP nsWebShell::Init(nsNativeWidget aNativeParent, PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h, nsScrollPreference aScrolling, - PRBool aAllowPlugins) + PRBool aAllowPlugins, + PRBool aIsSunkenBorder) { //XXX make sure plugins have started up. this really needs to //be associated with the nsIContentViewerContainer interfaces, @@ -632,7 +634,7 @@ nsWebShell::Init(nsNativeWidget aNativeParent, } widgetInit.clipChildren = PR_FALSE; - widgetInit.mBorderStyle = eBorderStyle_3DChildWindow; + widgetInit.mBorderStyle = aIsSunkenBorder ? eBorderStyle_3DChildWindow : eBorderStyle_none; mWindow->Create(aNativeParent, aBounds, nsWebShell::HandleEvent, mDeviceContext, nsnull, nsnull, &widgetInit); diff --git a/mozilla/webshell/public/nsIWebShell.h b/mozilla/webshell/public/nsIWebShell.h index 3963e7ba6af..4f53c13445e 100644 --- a/mozilla/webshell/public/nsIWebShell.h +++ b/mozilla/webshell/public/nsIWebShell.h @@ -95,7 +95,8 @@ public: NS_IMETHOD Init(nsNativeWidget aNativeParent, PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h, nsScrollPreference aScrolling = nsScrollPreference_kAuto, - PRBool aAllowPlugins = PR_TRUE) = 0; + PRBool aAllowPlugins = PR_TRUE, + PRBool aIsSunkenBorder = PR_TRUE) = 0; NS_IMETHOD Destroy() = 0; diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 41a91717986..fd05c6f413d 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -126,7 +126,8 @@ public: NS_IMETHOD Init(nsNativeWidget aNativeParent, PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h, nsScrollPreference aScrolling = nsScrollPreference_kAuto, - PRBool aAllowPlugins = PR_TRUE); + PRBool aAllowPlugins = PR_TRUE, + PRBool aIsSunkenBorder = PR_TRUE); NS_IMETHOD Destroy(void); NS_IMETHOD GetBounds(PRInt32 &x, PRInt32 &y, PRInt32 &w, PRInt32 &h); NS_IMETHOD SetBounds(PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h); @@ -562,7 +563,8 @@ NS_IMETHODIMP nsWebShell::Init(nsNativeWidget aNativeParent, PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h, nsScrollPreference aScrolling, - PRBool aAllowPlugins) + PRBool aAllowPlugins, + PRBool aIsSunkenBorder) { //XXX make sure plugins have started up. this really needs to //be associated with the nsIContentViewerContainer interfaces, @@ -632,7 +634,7 @@ nsWebShell::Init(nsNativeWidget aNativeParent, } widgetInit.clipChildren = PR_FALSE; - widgetInit.mBorderStyle = eBorderStyle_3DChildWindow; + widgetInit.mBorderStyle = aIsSunkenBorder ? eBorderStyle_3DChildWindow : eBorderStyle_none; mWindow->Create(aNativeParent, aBounds, nsWebShell::HandleEvent, mDeviceContext, nsnull, nsnull, &widgetInit);