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
Родитель 0b300e4c2d
Коммит a712054ca9
8 изменённых файлов: 0 добавлений и 56 удалений

Просмотреть файл

@ -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
//----------------------------------------------------

Просмотреть файл

@ -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;

Просмотреть файл

@ -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();

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -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

Просмотреть файл

@ -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.

Просмотреть файл

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