Bug 504109 remove mPreferredWidth and mPreferredHeight from nsWindow

r=neil
This commit is contained in:
timeless@mozdev.org 2009-07-22 17:31:02 -05:00
parent dc7b9b276c
commit 351383887d
8 changed files with 0 additions and 56 deletions

View File

@ -287,8 +287,6 @@ nsIMEBeOS *nsIMEBeOS::beosIME = 0;
nsWindow::nsWindow() : nsBaseWidget()
{
mView = 0;
mPreferredWidth = 0;
mPreferredHeight = 0;
mFontMetrics = nsnull;
mIsShiftDown = PR_FALSE;
mIsControlDown = PR_FALSE;
@ -2674,27 +2672,6 @@ NS_METHOD nsWindow::SetTitle(const nsAString& aTitle)
return NS_OK;
}
//----------------------------------------------------
//
// Get/Set the preferred size
//
//----------------------------------------------------
NS_METHOD nsWindow::GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight)
{
// TODO: Check to see how often this is called. If too much, leave as is,
// otherwise, call mView->GetPreferredSize
aWidth = mPreferredWidth;
aHeight = mPreferredHeight;
return NS_ERROR_FAILURE;
}
NS_METHOD nsWindow::SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight)
{
mPreferredWidth = aWidth;
mPreferredHeight = aHeight;
return NS_OK;
}
//----------------------------------------------------
// Special Sub-Class
//----------------------------------------------------

View File

@ -167,8 +167,6 @@ public:
NS_IMETHOD ScreenToWidget(const nsRect& aOldRect, nsRect& aNewRect);
NS_IMETHOD BeginResizingChildren(void);
NS_IMETHOD EndResizingChildren(void);
NS_IMETHOD GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight);
NS_IMETHOD SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus);
NS_IMETHOD HideWindowChrome(PRBool aShouldHide);
@ -225,8 +223,6 @@ protected:
nsIFontMetrics* mFontMetrics;
nsViewBeOS* mView;
PRInt32 mPreferredWidth;
PRInt32 mPreferredHeight;
window_feel mBWindowFeel;
window_look mBWindowLook;

View File

@ -452,10 +452,6 @@ protected:
// shouldn't be automatically set to 0,0 for first show.
PRPackedBool mPlaced;
// Preferred sizes
PRUint32 mPreferredWidth;
PRUint32 mPreferredHeight;
private:
void GetToplevelWidget(GtkWidget **aWidget);
GtkWidget *GetMozContainerWidget();

View File

@ -266,8 +266,6 @@ protected:
PFNWP GetPrevWP() const { return mPrevWndProc; }
// nglayout data members
PRInt32 mPreferredHeight;
PRInt32 mPreferredWidth;
nsToolkit *mOS2Toolkit;
PRInt32 mWindowState;
nsRefPtr<gfxOS2Surface> mThebesSurface;

View File

@ -120,8 +120,6 @@ nsWidget::nsWidget()
mWidget = nsnull;
mParent = nsnull;
mPreferredWidth = 0;
mPreferredHeight = 0;
mShown = PR_FALSE;
mBounds.x = 0;
mBounds.y = 0;

View File

@ -169,20 +169,6 @@ public:
return NS_OK;
}
inline NS_IMETHOD GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight)
{
aWidth = mPreferredWidth;
aHeight = mPreferredHeight;
return (mPreferredWidth != 0 && mPreferredHeight != 0)?NS_OK:NS_ERROR_FAILURE;
}
inline NS_IMETHOD SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight)
{
mPreferredWidth = aWidth;
mPreferredHeight = aHeight;
return NS_OK;
}
// Use this to set the name of a widget for normal widgets.. not the same as the nsWindow version
inline NS_IMETHOD SetTitle(const nsAString& aTitle) { return NS_OK; }
@ -339,7 +325,6 @@ protected:
nsIWidget *mParent;
PRBool mShown;
PRUint32 mPreferredWidth, mPreferredHeight;
PRBool mListenForResizes;
// Focus used global variable

View File

@ -240,10 +240,6 @@ protected:
// shouldn't be automatically set to 0,0 for first show.
PRBool mPlaced;
// Preferred sizes
PRUint32 mPreferredWidth;
PRUint32 mPreferredHeight;
/**
* Event handlers (proxied from the actual qwidget).
* They follow normal Qt widget semantics.

View File

@ -431,8 +431,6 @@ protected:
char mLeadByte;
PRUint32 mBlurSuppressLevel;
nsContentType mContentType;
PRInt32 mPreferredWidth;
PRInt32 mPreferredHeight;
PRInt32 mMenuCmdId;
HDWP mDeferredPositioner;
DWORD_PTR mOldStyle;