Made changes for GetBounds to GetClientBounds conversion
git-svn-id: svn://10.0.0.236/trunk@14104 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
eb644191a7
commit
f3596d389e
@ -1209,7 +1209,7 @@ void nsView :: List(FILE* out, PRInt32 aIndent) const
|
||||
fprintf(out, "%p ", this);
|
||||
if (nsnull != mWindow) {
|
||||
nsRect windowBounds;
|
||||
mWindow->GetBounds(windowBounds);
|
||||
mWindow->GetClientBounds(windowBounds);
|
||||
fprintf(out, "(widget=%p pos={%d,%d,%d,%d}) ",
|
||||
mWindow,
|
||||
windowBounds.x, windowBounds.y,
|
||||
|
||||
@ -294,7 +294,7 @@ void nsViewManager :: Refresh(nsIView *aView, nsIRenderingContext *aContext, nsI
|
||||
{
|
||||
nsIWidget* widget;
|
||||
aView->GetWidget(widget);
|
||||
widget->GetBounds(wrect);
|
||||
widget->GetClientBounds(wrect);
|
||||
wrect.x = wrect.y = 0;
|
||||
NS_RELEASE(widget);
|
||||
ds = GetDrawingSurface(*localcx, wrect);
|
||||
@ -380,7 +380,8 @@ void nsViewManager :: Refresh(nsIView *aView, nsIRenderingContext *aContext, con
|
||||
|
||||
if (aUpdateFlags & NS_VMREFRESH_DOUBLE_BUFFER)
|
||||
{
|
||||
mRootWindow->GetBounds(wrect);
|
||||
mRootWindow->GetClientBounds(wrect);
|
||||
wrect.x = wrect.y = 0;
|
||||
ds = GetDrawingSurface(*localcx, wrect);
|
||||
localcx->SelectOffScreenDrawingSurface(ds);
|
||||
}
|
||||
@ -570,6 +571,8 @@ NS_IMETHODIMP nsViewManager :: DispatchEvent(nsGUIEvent *aEvent, nsEventStatus &
|
||||
|
||||
nscoord width = ((nsSizeEvent*)aEvent)->windowSize->width;
|
||||
nscoord height = ((nsSizeEvent*)aEvent)->windowSize->height;
|
||||
width = ((nsSizeEvent*)aEvent)->mWinWidth;
|
||||
height = ((nsSizeEvent*)aEvent)->mWinHeight;
|
||||
|
||||
// The root view may not be set if this is the resize associated with
|
||||
// window creation
|
||||
|
||||
@ -102,7 +102,7 @@ public:
|
||||
PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h,
|
||||
nsScrollPreference aScrolling = nsScrollPreference_kAuto,
|
||||
PRBool aAllowPlugins = PR_TRUE,
|
||||
PRBool aIsSunkenBorder = PR_TRUE) = 0;
|
||||
PRBool aIsSunkenBorder = PR_FALSE) = 0;
|
||||
|
||||
/**
|
||||
* Notify the WebShell that its parent's window is being destroyed. After
|
||||
|
||||
@ -914,7 +914,7 @@ nsBrowserWindow::Init(nsIAppShell* aAppShell,
|
||||
nsRect r(0, 0, aBounds.width, aBounds.height);
|
||||
mWindow->Create((nsIWidget*)NULL, r, HandleBrowserEvent,
|
||||
nsnull, aAppShell, nsnull, &initData);
|
||||
mWindow->GetBounds(r);
|
||||
mWindow->GetClientBounds(r);
|
||||
|
||||
// Create web shell
|
||||
rv = nsRepository::CreateInstance(kWebShellCID, nsnull,
|
||||
@ -926,7 +926,7 @@ nsBrowserWindow::Init(nsIAppShell* aAppShell,
|
||||
r.x = r.y = 0;
|
||||
rv = mWebShell->Init(mWindow->GetNativeData(NS_NATIVE_WIDGET),
|
||||
r.x, r.y, r.width, r.height,
|
||||
nsScrollPreference_kAuto, aAllowPlugins);
|
||||
nsScrollPreference_kAuto, aAllowPlugins, PR_TRUE);
|
||||
mWebShell->SetContainer((nsIWebShellContainer*) this);
|
||||
mWebShell->SetObserver((nsIStreamObserver*)this);
|
||||
mWebShell->SetPrefs(aPrefs);
|
||||
@ -937,7 +937,7 @@ nsBrowserWindow::Init(nsIAppShell* aAppShell,
|
||||
if (NS_OK != rv) {
|
||||
return rv;
|
||||
}
|
||||
mWindow->GetBounds(r);
|
||||
mWindow->GetClientBounds(r);
|
||||
r.x = r.y = 0;
|
||||
}
|
||||
|
||||
@ -985,7 +985,7 @@ nsBrowserWindow::Init(nsIAppShell* aAppShell,
|
||||
nsRect r(0, 0, aBounds.width, aBounds.height);
|
||||
mWindow->Create((nsIWidget*)NULL, r, HandleBrowserEvent,
|
||||
nsnull, aAppShell);
|
||||
mWindow->GetBounds(r);
|
||||
mWindow->GetClientBounds(r);
|
||||
|
||||
// Create web shell
|
||||
rv = nsRepository::CreateInstance(kWebShellCID, nsnull,
|
||||
@ -1008,7 +1008,7 @@ nsBrowserWindow::Init(nsIAppShell* aAppShell,
|
||||
if (NS_OK != rv) {
|
||||
return rv;
|
||||
}
|
||||
mWindow->GetBounds(r);
|
||||
mWindow->GetClientBounds(r);
|
||||
r.x = r.y = 0;
|
||||
}
|
||||
|
||||
@ -1179,14 +1179,14 @@ nsBrowserWindow::Layout(PRInt32 aWidth, PRInt32 aHeight)
|
||||
if (mLocation && NS_OK == mLocation->QueryInterface(kIWidgetIID,(void**)&locationWidget)) {
|
||||
if (mChromeMask & NS_CHROME_TOOL_BAR_ON) {
|
||||
if (mThrobber) {
|
||||
locationWidget->Resize(2*BUTTON_WIDTH, 0,
|
||||
locationWidget->Resize(2*BUTTON_WIDTH, 0,
|
||||
aWidth - (2*BUTTON_WIDTH + THROBBER_WIDTH),
|
||||
BUTTON_HEIGHT,
|
||||
PR_TRUE);
|
||||
mThrobber->MoveTo(aWidth - THROBBER_WIDTH, 0);
|
||||
mThrobber->MoveTo(aWidth - THROBBER_WIDTH, 0);
|
||||
}
|
||||
else {
|
||||
locationWidget->Resize(2*BUTTON_WIDTH, 0,
|
||||
locationWidget->Resize(2*BUTTON_WIDTH, 0,
|
||||
aWidth - 2*BUTTON_WIDTH,
|
||||
BUTTON_HEIGHT,
|
||||
PR_TRUE);
|
||||
@ -1248,7 +1248,7 @@ nsBrowserWindow::SizeTo(PRInt32 aWidth, PRInt32 aHeight)
|
||||
NS_IMETHODIMP
|
||||
nsBrowserWindow::GetBounds(nsRect& aBounds)
|
||||
{
|
||||
mWindow->GetBounds(aBounds);
|
||||
mWindow->GetClientBounds(aBounds);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -1307,7 +1307,7 @@ nsBrowserWindow::SetChrome(PRUint32 aChromeMask)
|
||||
{
|
||||
mChromeMask = aChromeMask;
|
||||
nsRect r;
|
||||
mWindow->GetBounds(r);
|
||||
mWindow->GetClientBounds(r);
|
||||
Layout(r.width, r.height);
|
||||
|
||||
return NS_OK;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user